Now with Limited San Andreas information (shadows and lighting, reflections)
If you think you've seen this tutorial before, or a version of it, your correct. but since im not going to bump my 2-year old, locked, topic, here we are. Its not a cut-paste job either, i did rewrite a significant portion of it, and have plans for expansion.GTA3
cars derive their reflections from the reflection01 image, in the particle.txd. The amount of reflectivity, is controlled by the "Specular" multiplier, in the material. Zmodeler does not provide direct access to this data; either use normal blending, for "normal materials", or "high blend" for chrome.Vice City
cars dont use the reflection01 in the particle.txd. VC vehicles have their own reflection map per material, ie, blista compact would have "blista86speca" or the stallion would have stallion86speca". If your modding the shine of a pre-existing Vice City car, the "shine" is located in the txd of the car you are modding, and typically ends in "speca", so check the vehicle you want to replace, in the txd for said map.
That will work for R*-made cars, if you have a 3rd party downloaded car, that you got off of some site, the author may have named their images differently.San Andreas
uses a combination of the 2 methods above. There are default reflections that every stock SA car uses, in the models/generic/vehicle.txd
of your SA install. However, cars can use any
reflection image you wish besides these 2, as long as the image is included in the vehicle's txd.GTA3/Vice - Step by-step instructions using Zmodeler 1:1.
load desired car into zmodeler. For importing a .dff file, go to F
mport, choose GTA dff filter, from the dropdown list at the bottom right, and find your vehicle. To open a .z3d document...well....file -> open. If you made a car in zmod and don't know how to open it, your either a thief or an idiot.2.
Open the material editor ("E" on the keyboard), and select the material that you want to be shiny. materials are applied in a per-face basis, to the object. Materials for vice cars consist of several properties, they are as follows;Material properties
-Name - name of the material your currently viewing. By adding [prim] or [sec] to the name, you make that material of the vehicle, work with the colors listed in the carcols.dat file, in the game's Data folder. [prim] to work with the first color, and [sec] and to work with the second color.
-Material color - this sets the color of the material. mostly useful for glass effects, and materials that do NOT have a primary texture. if your material has a primary texture, leave the material color at white (255, 255, 255).
Shine/Size - no effect in vice.
-Opacity- controls the opacity of the material, aka Transparency. If the opacity is all the way to the right, the material is totally opaque, and has no transparency. if its all the way to the left, it is totally clear.Alpha Parameters
Set to unused, if your Primary texture will not use an alpha channel, and set it to Glowing, if the primary texture will use an alpha channel. Your reflection map should not use an alpha channel.
If you want your vehicle to have glass-like effects, or to be transparent in any way, you need to sort the materials, so that the transparent materials are last in the material list, and objects that have transparent materials, are last in the objects list.Textures
- The Primary Texture. should be self explanatory, but its the main texture, that this material will use. your car body/interior/engine/whatever texture goes here.
- Reflection map - any image in this slot will act as a "reflection" and make the material appear shiny.
both of these texture slots, have a Checkbox next to them. the Checkbox NEEDS to be enabled.
You do not need a primary texture, in order for the reflection map to work.
-Bumpness and reserved slots are not used.
-On the right of each texture slot, there is a "Apply as" parameter, these should be correct by default. But just in case you mess them up, your primary texture texture should be applied as mix with color, and your reflection map should be applied as a light map.
Now then, that you hopefully have a basic understanding of the material system.3.
Select those faces of the object you want that material on, and hit "Assign to Selection", this will assign the currently selected material, to your currently selected faces.
Press "Apply Changes" in the material editor. keep file and filename of reflection map handy, these will be the name of the texture you use in the TXD, without the .bmp/.tga extension.3.
Once your car has the desired reflection map, assigned to whatever faces you want it on, you are ready to export. So go on, export it, being sure to hit the "Vice City" button when you do.4.
open up or create the txd for the car you are adding, and be sure to have a texture in that txd, that matches the filename of the reflection map you chose, just like any other texture. remember to exclude the .bmp/.tga from the texture name, in the txd, it is NOT necessary.5.
The size of the reflection map you use doesn't matter, it will reflect the same way. The only difference will be the image quality, as you use larger textures. if you want to change the reflection intensity, you'll need to make your image whiter to make it brighter, and blacker, to make it less shiny.
Example: (my trueno, heh)
It will export whatever reflection map you use in zmod, with the model, so you'll have to include the map you use in zmod, with the .txd.
There seems to be problems with importing cars that already have the shine, or have been "converted" to have shine ala VC. so do this:
Import the car as normal. If its shiny, go to step 3. If it has NO shine, go to step 2.
Personally, i have not had this problem, so its hard to diagnose a solution to it. If you really want to alter the vehicle that badly, i suggest you contact the author of the vehicle you are attempting to mod, and perhaps they will send you the original .z3d file, from which you can re-export the car.
If you just want to change how shiny the car is, you don't NEED to go into zmodeler for that, just replace whatever reflection map the author has put in the .txd. More white will make it shinier, more black will make it duller.
One last final note; Vice actually limits the reflection level ingame, its hardcoded, to reduce how shiny your material can be. This can be changed by hacking the game's executable file (i've done it), but if you don't know what you're doing it is probably a lot more work than it is worth. If you look through your dff file (and know where to look at that), you'll notice the reflection levels are set to 1.0 on exported models. Except the exe is limiting it to about 0.75 globally for vehicles. sorry chrome freaks.
SA:PC note on reflection limits - the "75%" limit in vice is gone, and true chrome effects can now be achieved in SA;
Lighting and shadows (San Andreas only):
Cars and Map objects, use different lighting and shadows settings, depending on the quality of the "Visual Effects" you set in the menu.
Cars/Dynamic objects - low setting - shadow "blob" will be used
any setting above "low", and the game will shadow volumes, for the car and map object shadows (only certain map objects). these shadow volumes are cast off of a "shadow mesh, that is stored in the object's collision mesh. only collision meshes that have a shadow mesh, will cast a dynamic shadow.
Same "quality" issue as above, if its on "low" or "medium", the player and peds get the standard shadow "blob". If its on high, the game will cast a dynamic shadow for the player, and blobs for peds. very high, will result in dynamic shadows for all persons onscreen, peds and player alike. Obviously the dynamic shadows look better, as they conform the player/objects movement and animation, but you do take a performance hit.
Map/Static object lighting
Map objects appear do still use vertex lighting, which is not new. what IS new, is that some objects have a second set of vertex colors, that are used for night time lighting.
this is located in your SA root directory, the entry of interest is this one;
this basically "caps" your lighting; if you set it to 0.0, the game is super-bright and saturated (no cap, very low cap?) This post has been edited by DexX on Tuesday, Feb 13 2007, 11:36