Ok, now they can.
San Andreas Vehicle Tech Doc
Model and Texture/Material Layout
San Andreas vehicle technical documentation. This Document contains:
-Model Struture overview, including revised hierarchy layout, object names and descriptions, and class-specific objects (low rider parts for example).
-Textures and Material Guides and settings, including texture sizes, directories and material types.
-Basic Instructions for simple editing, like wheel sizes
There are significant changes between the GTA3 / Vice vehicle layout, and the methodologies implemented in San Andreas, so be sure to read all the way through. This guide will be updated over time as new discoveries are made.
Model Changes - Object Naming Conventions, New objects, and Hierarchies:
The first changes that are noticeable, and very imporant, are the object names. Gone is the "hi" section of all object names.
Example:"door_rf_hi_ok" is now "door_rf_ok". repeat for every part witn "_hi_" in the name.
There are many new possible parts, depending on what vehicle class your your vehicle is. Cars are now upgradeable via the following parts:
Hood upgrades (parent=bonnet_dummy)
Front Bumper (parent=bump_front_dummy)
ug_lights (cosmetic only, will not cast or display actual lights)
Chassis Object/Main Body (parent=chassis)
ug_nitro (the actual nos-kit model when you buy it)
exhaust_ok (tailpipe upgrade)
Additional handling flags set to be set in the handling.cfg forlowriders to correctly use the lowrider pieces.
Those are parts that are upgradeable, but not necessary, to the functioning of the vehicle. The following parts, while new, are much more important, and "useful" for standard cars. Parent objects are listed after the object name
Obj - Parent - Description
Wheel - wheel_rf_dummy: probably the single biggest change, is the elimination of the "wheels.dff", that was formerly in the generic folder. Each car/truck now has its own individual wheel model, stored inside of the car model itself, under the parent object "wheel_rf_dummy". Also important to note that the "vehicles.ide", also has 2 wheel scale values, the first is for the front wheels, and the second is for the rear wheels. the "wheel" on Sa cars (only one per model!) is scaled to be the correct size on the model, as it would be in real life. you'll need to manually change the scale in the vehicles.ide to match the wheel model size.
PC update: the wheels.dff is there, but it still remains unused. dont ask me, but R* threw it there for some reason(or simply forgot to remove it). But the above information still applies!
|QUOTE (Brief Wheel instructions)|
1. To change wheel sizes, open the vehicles.ide, and find the vehicle you will be replacing. That data will look like this:
400, landstal,† landstal,† car,†† LANDSTAL,† LANDSTK,† null, normal,† 10, 0, 0,† -1, 1.0, 1.0,† -1
2. If your using a custom car that was converted from vice, or the wheels look drastically too big in general, change the number in red, from -1, to 0. when this value is set to 0, it tells the game to scale the wheel model, with the next set of values. when this value is -1, it derives the size of the wheel model, directly from the mesh, and the wheel scale values will only affect the wheel collision.
3. the blue values control the actual size of the wheels, front and rear, adjust them as necessary to get the desired size ingame.
thanks to offroader23 for helping with this info.
Cerbera has put together a useful guide for SA handling differences, you can check that out here:
where <carname/root obj> is, is the name of the vehicle your looking at.
Engine - <carname/root obj>: where the engine smoke comes from.
Petrolcap - <carname/root obj>: shoot it and the car explodes. 'nuff said.
Ped_arm - <carname/root obj>: actually I've seen this object in other places in the hierarchy, so this (hierarchy position) may not be applicable to ALL vehicles. or it may not matter at all. Peds now seem to rest their arms on the sides of the car sometimes, I would assume this is where. during driveby's, they also sometimes sit, and lean over the roof of the car to shoot, and it also appears to be where this dummy object is.
Headlights2 - <carname/root obj>: another headlight object. used in conjuntion with the standard headlights object. Yes, you can now have 2 working headlights, same for tails below. This version however, doesnt not give the "cone" effect, that the first headlights object does.
Tailllights2 - <carname/root obj>: another taillight object. used in conjunction with the standard taillights object.
exhaust_ok - chassis: where the tailpipe upgrade piece goes?
plate_front_ok - bump_front_ok: front license plate, undamaged. Its important to have separate objects for the license plates now, as the game will actually generate, and use, text and colors from another file, to produce authentic license plates. Neat!
plate_front_dam - bump_front_dam: same as above, except damaged.
plate_rear_ok - bump_rear_ok: same as above, except for the back.
plate_rear_dam - bump_rear_dam: same as above, except damaged.
See the end of the texturing section (below) section for info on how to make "working" license plates.
Collision files are stored in the same DFF as the vehicle. The collision file not only stores collision data for the model this time, but also a shadow mesh, from where a shadow for the vehicle is generated. Although the .col format is pretty much the same, with the addition of the shadow mesh, the "vehicles.col" is no longer used.
Texturing and Material Methods
Signicant changes From GTA3/Vice to SA
-Local TXD's (<carname.txd>) are still used, But the majority of textures that are repetitive, like damage, headlights and tails, reflections, are stored in a global TXD, "vehicles.txd", that is used by virtually every car in the game. Local txd's are used only for vehicle specific textures.
-Vehicles use Mutilple UV channels. However, the 2nd uv channel is only for reflections. you cannot add a 2nd diffuse map on a different uv channel, and expect it to work. it wont. If a paint job is applied to a car, the diffuse map for the main body material is swapped out, but uses the same UV coordinates.
i did write a Brief Tutorial on how to add paintjobs.
-To compliment the new Wheels system used for the cars, even the wheels themselves are UV mapped differently. While they still use 64x64 textures, they are mapped in such a way, that the mapped image on the object is only 1/4 of the total image (model 1/4 of the wheel, then duplicate/rotate 3 more times), and the end result on the wheel, is equivalent to 128x128 texturing. Being that they are part of the car mesh itself this time around, the wheels also are capable of (some do) using the reflection maps the car uses, depending on the material. This makes it possible to produce more "chrome" effects. The wheels.dff of gta3 and vice did not allow refletion maps on the rims for some reason.
Interestingly, all the tire tread i've come across so far, is in the vehicles.txd, wheras the rimface of the wheel itself, is stored in the local txd's of the vehicles. clever bastards they are.
-There's an additional section to some materials to accomodate the extra reflection map. The 2nd reflection section, vehiclespecdot, tells the game to perform per-vertex specular lighting on the model, similar to that which is done from the xbox mod for the pc vers of VC.
-The "body" texture that is used for 99% of the cars in the vehicle.txd, is more like a "dirt" texture (vehiclegrunge256) that is animated over time. The TV Van in the following screenshot is shown while dirty, and after cleaned (they can only be cleaned at transfender, upgrade shops, and Pay N Spray, Actual car washes do NOT work!!):
PC Update: the cars dont appear to get "dirty" anymore, the 1.01 patch fixes this.
Using Carcol materials on your model
Set the diffuse color of your material to one of the following colors, to have its color ingame, controlled by the carcols.dat file.
RGB colors for each carcol color:
Primary - 60, 255, 0 - This color
Secondary- 255, 0, 175 - This color
Third - 0 255, 255 - This color
Fourth - 255, 0, 255 - This color
To use the third and 4th colors, you need to put your vehicle in the "car4" section, at the end of your carcols.dat file.
In order to get "working" license plates (where the text changes, and the plateback, changes per city) you need to texture the license plate objects a certain way:
the "back" of the license plate, the larger section that IS the plate, needs to be textured using the image "carpback" in your vehicle.txd. the white texture is a placeholder for the images that are used ingame, and they get swapped around from city to city.
The plate "text" needs to be textured using the "carplate" image in your vehicle.txd. The game will render text to that texture, per car, and apply it automatically. the image in the txd is just a placeholder.
Headlight and taillight texturing in San Andreas
-Headlights and taillights. These use one of the global textures from the vehicles.txd (vehiclelights128 and vehiclelightson128). During the game, your car will normally use the first texture, and at night, the game will swap it for the 2nd image, which has pre-illuminated textures. It works well in conjuntion with their improved lighting system overall.
Vehicle-specific headlight and taillight textures are NOT possible (if you still want them to "work" that is). you have to use the images in the vehicle.txd to get fully-functional lights for your car. See below.
This section quoted from Majestic, and slightly edited by me
|the lights now act sort of as [prim] and [sec]. in order to have the lights working you need:|
-assign one of the 4 colors (one for each light)
-assign texture 'vehiclelights128'
This would be done in the material editor of the application your using to export models. The "diffuse color" would be set to one of the options below, which will make alteast 4 distinct materials necessary, one for each light type. -' dexx
this is what happens in game:
-during day, the 'vehiclelights128' texture is used, and color is something like 50% gray.
-during night, the 'vehiclelightson128' texture is used instead, and color becomes 100% diffuse and 100% ambient (or something like that?)
RGB colors for each light:
Left Headlight - 255, 175, 0 - This color
Right Headlight - 0, 255, 200 - This color
Left Taillight - 185, 255, 0 - This color
Right Taillight - 255, 60, 0 - This color
update 1 - first posting, 11-9-04
more to follow. The texturing method has changed, and ill post that next chance i get.
update 2 - Texturing and Materials, 2-14-05
Added info on the texturing and material systems used by the game.
update 3 - Collision methods, 6-10-05
updated existing content for pc version, quick collision mention.
update 4 - Headlight and Tailight sorting, 6-23-05
Sorted instructions on how to properly set up materials, to have illuminated headlight and taillight textures ingame.
update 5 - , 12-29-05, 8-7-06
general overhaul, some corrections, and a little snippet about how to properly do license plates.
Leave any comments you may have.