Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    2. News

    1. Red Dead Redemption 2

    1. GTA Online

      1. After Hours
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. 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. 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

DexX

Materials and Lighting, General

Recommended Posts

DexX

 

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 File, Import, 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)

user posted image

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;

user posted image

 

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.

 

Players/Peds shadows

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.

 

stream.ini

this is located in your SA root directory, the entry of interest is this one;

pe_lightingbasecap 0.35

this basically "caps" your lighting; if you set it to 0.0, the game is super-bright and saturated (no cap, very low cap?)

Edited by DexX

Share this post


Link to post
Share on other sites
gta_rodney

Can you tell me how to make a "full world reflection" just like the ps2 version graphics ?

 

blush.gif

Share this post


Link to post
Share on other sites
DexX

 

Can you tell me how to make a "full world reflection" just like the ps2 version graphics ?

 

blush.gif

in SA:PC, you can't. its hardcoded into the exe, which is fairly well protected.

Share this post


Link to post
Share on other sites
DexX

someone pm'ed me about this topic, so, minor updates tounge.gif

Share this post


Link to post
Share on other sites
JP3

It is possible to place effect mirror in the texture of the car as in floor of the house of CJ?

user posted image

user posted image

user posted image

Edited by JP3

Share this post


Link to post
Share on other sites
DexX

Can you use the mirror reflections on cars? No. The game is not set up to allow this, or make it workable.

Share this post


Link to post
Share on other sites
JP3

How to make the cars to reflect the world?

example:

user posted image

in gta sa

if it will have some archive that makes it to send me please!

Edited by JP3

Share this post


Link to post
Share on other sites
DexX

Not possible in real time. And i didn't port the VC method to SA.

Share this post


Link to post
Share on other sites
xaviermaster221
It is possible to place effect mirror in the texture of the car as in floor of the house of CJ?

user posted image

user posted image

user posted image

the so called reflections on the floor in sanandeas is just an upside down object under the transparent floor. Also in vicecity mansion. As for the mirror. Thats a mystery.

Share this post


Link to post
Share on other sites
MrGTAmodsgerman
It is possible to place effect mirror in the texture of the car as in floor of the house of CJ?

user posted image

user posted image

user posted image

the so called reflections on the floor in sanandeas is just an upside down object under the transparent floor. Also in vicecity mansion. As for the mirror. Thats a mystery.

LOL but what is the name from the object of the mirror? i wanna put the meterial on a car and test it

 

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.