Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (84,897 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

JoeVK

[IV] Swapping and scaling wheels in Openformats

Recommended Posts

JoeVK

Wheel diameters and width can be changed in the wheel .childs.

Version 112 2drawable{lodgroup{high 1 wheel_lf_15\wheel_lf_15_high.mesh 1 9999.00000000med 1 wheel_lf_15\wheel_lf_15_med.mesh 2 9999.00000000low none 9999.00000000vlow none 9999.00000000center 0.00017000 0.00000000 0.00000000AABBMin -0.12355700 -0.34414800 -0.34414800AABBMax 0.12379400 0.34414800 0.34414800radius 0.36556200}

The above section is from the wheel_lf_15.child of the SabreGT. The same section in the other three
wheel_xx_xx.child files appear as follows:

Version 112 2drawable{lodgroup{high none 0.00000000med none 0.00000000low none 0.00000000vlow none 0.00000000center 0.00000000 0.00000000 0.00000000AABBMin 0.00000000 0.00000000 0.00000000AABBMax 0.00000000 0.00000000 0.00000000radius 0.00000000}

This is because the left front wheel dummy contains the only wheelmesh this vehicle uses. The game duplicates the
wheelmesh for use at each wheel position. With vehicles that use a different wheelmesh for the rear wheels, the
left rear wheel .child will contain data similar to the vehicle's left front wheel .child.

The sections above appear to tell the game the name of each LOD mesh, where and when to render it, and what the

base dimensions (width, diameter, etc) of them are. I'm assuming this is so the game knows how much to adjust the

mesh to get the final size that is rendered in-game.

-----------------

The data below is the wheel [COL]s in text form. The game uses the wheel [COL]s to scale each wheel to the desired
width and diameter. If you want to widen the rear wheels on a vehicle, like the banshee, for example, this is
where you do it. The AABBMax, AABBMin, and Margin are the lines that control it.

bound{Type BoundCurvedGeometryCentroidPresent 0CGPresent 0Radius 0.50192060WorldRadius 0.00000000AABBMax 0.12350000 0.34400000 0.34400530AABBMin -0.12350000 -0.34400000 -0.34399470Margin 0.12350000 0.12350000 0.12350000Polygons 0VertexScale 0.00000380 0.00000380 0.00001053VertexOffset 0.00000000 0.00000000 0.00000000Vertices 2

Now then, on to the stuff you came to read. The section above is the second section of each wheel's .child, and
the lines you need to change are the AABBMax, AABBMin, and Margin. If you change data in one of those three lines,
you will need to change the data in the other two. The following explains which set of numbers do what.

        width              diameterAABBMax 0.12350000   0.34400000 0.34400530AABBMin -0.12350000  -0.34400000 -0.34399470Margin  0.12350000   0.12350000 0.12350000

The AABBMax and AABBMin lines seem to control the visual size and scale of the wheel, while the Margin appears to
control the physical size. I noticed that when I made all three sets of numbers in the Margin line identical,
the tires floated above the ground. So if you're changing the size of the wheel in any way, you need to make
changes in all three of these lines. If you adjust the AABBMax and AABBMin without adjusting the Margin, you'll
get tires that leave improper width tire marks, and/or will be floating above or sunk into the ground as well as
some objects.

I have not done much research into what the other lines in these sections do, so I couldn't tell you what
VertexScale, VertexOffset, Radius or WorldRadius would do.

Another thing to note is that the wheels on some vehicles simply cannot be altered by the editing the .child.
There appears to be a limit as to how much the game can scale the wheelmesh. I tried to widen the wheels on the
PMP600, but they did not respond to my changes. No matter how radical of a change I made in the .child, the wheels
remained "pizza cutter" skinny. This is likely because the meshes themselves were simply too narrow to be scaled
by the game. In cases like the PMP600, if you want the wheels wider or larger, you'll have to use Zmod2 to do it.

If you don't want the camera bugs or the odd behavior of the doors, boot, and bonnet, you could use Zmod2 to
modify the rims, and export it to .wft as usual. You should also edit the wheel COLs while you're at it, to save
yourself the trouble of doing it in the .childs later. Then, instead of putting the car ingame, you could put it
in a separate .img (I have one in a separate folder, called "vehicletest.img" for checking vehicles before putting
them in the game's files), then export the car to Openformats .oft. Then you can use the process below and use your
newly modified car's wheels on the original, unmodified car, and avoid any bugs.

---------------------------------

As far as replacing wheels go, it's relatively straightforward. Lets say you want the rims from the Bullet on the
SabreGT (I did).

Copy the wheel_lf_9_high.mesh and wheel_lf_9_med.mesh from the Bullet's wheel_lf_9 folder and paste them into
the SabreGT's wheel_lf_15 folder.

Open both of the wheel_lf_xx_high.mesh files to make sure the wheel uses the correct material. The material(s)
used are denoted by a "Mtl X". The "X" will be a number. In this particular case, the Bullet wheel
showed "Mtl 7", while the SabreGT showed "Mtl 4".

Change "Mtl 7" in the Bullet's wheel to "Mtl 4", save and close the .mesh files.

Repeat the process with the wheel_lf_x_med.mesh files.

Once those steps are done, delete the original SabreGT wheel .mesh files and rename the Bullet wheel .mesh
files to match the names of the original SabreGT wheel .mesh files that were just deleted. In this case, the Bullet
wheel .mesh files are wheel_lf_9_high.mesh and wheel_lf_9_med.mesh, while the SabreGT's that got deleted were
wheel_lf_15_high.mesh and wheel_lf_15_med.mesh. So wheel_lf_9_high.mesh becomes wheel_lf_15_high.mesh. Got it?

Now here's where you need to pay more attention. Copy the Bullet's wheel .child files (lf, lr, rf, rr)
and paste them in the SabreGT's folder. Open each "lf" .child and in the BUllet's lf .child, find every place that
says "wheel_lf_9" and change the "9" to "15". Save it and close them both. Repeat this process for the lr, rf and
rr wheel .child files.

Now, delete all of the original SabreGT wheel .child files and rename the Bullet's wheel .child files by
replacing the number in each file with the number the original file had in it's name. If the original lr wheel
.child had a 15 and the new lr had an 9, replace the 9 with 15. It's the same thing that was done with the .mesh
files.

Once that's done, you just need to import the .oft into the .img by clicking New->import Openformats, then selecting
the proper .oft to import. Then you can rebuild the .img and go ingame and check your work.

When I did this, I only replaced the wheel .mesh files. I didn't replace the .child files, nor did I have to edit
them to get the correct size. Sometimes you can do as I did, and replace the wheel .mesh files and leave the
.child files alone and see how it looks ingame, and get lucky. Other times, the wheels won't be the correct size
and will either sink into the ground or float above it. You can do one of two things. You can either replace the
wheel .child files with the ones from the same vehicle you got the wheels from, or edit the existing ones. Editing
them will take some trial and error, and the info above about how to edit them will come in handy. But you will
need to be careful. A little change goes a long way.

Some things to note:
You have to be careful when picking the rims you want for a certain car. If they're too tall already, you'll have
problems getting them to be the right size for the car. So the first thing you want to do is find cars that have
tires that are close to the same overall height as the ones on the car you want to replace. I don't mean rim size,
I mean the tire's outside diameter. Once you find the cars, pick the one with the wheels you want and get to work.

Another thing you'll want to do is change the your car's vehicles.ide line once you replace it's wheels. Why? Well,
if you don't, if and when the tires pop (long burnout or driven on after being shot), it stands a good chance that
the tireless rim will go all screwy. Sometimes you can get away with using the same numbers that the car you took
the wheels from has in it's .ide line, both other times you'll have to find the right numbers by trial and error.
Anyway, the lines you want, incase you don't know are pointed out below between the arrows.

[email protected], [email protected]_LO4_LO4, 50, 999, >>0.3114, 0.3114,<< 0, 5, 1.0,

Please note that the line above is not the full line, and the settings in it are not the settings you need to
change yours to. It is only an example, and I cut out most of it because it wasn't needed to get the point across.
Anyway, the "0.3114, 0.3114" in the example line above are the numbers you need to edit. To put it in simple terms,
they control the wheel diameter when the tire is destroyed, so if the numbers are too low, some of the rim itself
will be missing. If they're too high, the rims will float. Either way, it will just look bad.

Share this post


Link to post
Share on other sites
PhillBellic

Very intriguing reading, JoeVK. Would you be able to include some Images, and perhaps a Video as well?

 

Thank you. :)

Share this post


Link to post
Share on other sites
JoeVK

Video, no, sorry. But images I could do, as soon as I get time. We're short-staffed where I work, and I keep getting called in to work on my days off, so I don't have much lately.

Share this post


Link to post
Share on other sites
klaceyes

Eeee where is this file please? :>

Share this post


Link to post
Share on other sites
JoeVK

The file doesn't exist until you create it. Pick a car, and in OpenIV, export it to Openformats. That creates the .oft file.

Share this post


Link to post
Share on other sites
ashishcw

Thanks mate, really liked the concept. Since, sometimes, the car wheels need a fix specifically when I am using a Cinematic Camera Mod. :lol:

Share this post


Link to post
Share on other sites
unbid

Well, since this thread lack final result pictures, I decided to provide some.

 

The test mule cars are these two:

http://www.gtainside.com/en/gta4/cars/92515-declasse-rancher-xl/

http://www.gtainside.com/en/gta4/cars/90409-albany-stretch/

 

and I decided to swap the rims with the original IV counterpart:

 

mmag7Xr.jpg

Uffzk5e.jpg

HIbWf6y.jpg

wUjI0XC.jpg

 

 

I must say it worked very well if you're too lazy/too noobish to edit it in ZModeler.

Edited by unbid

Share this post


Link to post
Share on other sites
JoeVK

It's not just laziness or noobishness (is that even a word? Oh well, it is now). Zmod messes with the function of hoods, trunks, and doors. I know you know what I'm talking about. I have a Banshee with the big fat rear tires that it should have, a Sabre GT with Bullet wheels, and a police Merit with Merit taxi wheels. Their hoods, trunks, and doors all function properly. The main reason I posted this was because I thought some people would find it interesting, and could put it to use.

Share this post


Link to post
Share on other sites
unbid

I did it again:

 

OmV4FLU.jpg

hMRQ7li.jpg

 

The front wheels clipped while turning.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.