IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

This is for the discussion and releasing of tutorials for modifying GTA. Anything that isn't a tutorial will be deleted without notification.

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


  Reply to this topicStart new topicStart Poll

 Materials and Lighting, General

 [Documentation | GTA3+VC+SA]
 
DexX  
Posted: Monday, Apr 25 2005, 10:43
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




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?)

This post has been edited by DexX on Tuesday, Feb 13 2007, 11:36
PM
  Top
 

 
gta_rodney  
Posted: Tuesday, Nov 1 2005, 20:46
Quote Post



Group Icon
Group: Members
Joined: Jun 15, 2005

XXXXX



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

blush.gif
PM
  Top
 

 
DexX  
Posted: Thursday, Nov 10 2005, 10:32
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




QUOTE (gta_rodney @ Nov 1 2005, 15:46)
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.
PM
  Top
 

 
DexX  
Posted: Tuesday, Feb 13 2007, 11:37
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




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

 
JP3  
Posted: Saturday, Oct 6 2007, 02:15
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Aug 7, 2007

XXXXX



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

This post has been edited by JP3 on Saturday, Oct 6 2007, 02:35
PMMSN
  Top
 

 
DexX  
Posted: Saturday, Oct 6 2007, 15:13
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




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

 
JP3  
Posted: Saturday, Oct 6 2007, 23:35
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Aug 7, 2007

XXXXX



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!

This post has been edited by JP3 on Saturday, Oct 6 2007, 23:39
PMMSN
  Top
 

 
DexX  
Posted: Saturday, Oct 6 2007, 23:41
Quote Post


Black Hat
Group Icon
Group: Retired Staff
Joined: May 16, 2002

Member Award




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

 
JP3  
Posted: Sunday, Oct 7 2007, 00:05
Quote Post


Crackhead
Group Icon
Group: Members
Joined: Aug 7, 2007

XXXXX



PMMSN
  Top
 

 
xaviermaster221  
Posted: Wednesday, May 14 2008, 19:48
Quote Post


Player Hater
Group Icon
Group: BUSTED!
Joined: May 13, 2008

XXXXX



QUOTE (JP3 @ Oct 6 2007, 02:15)
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.
PM
  Top
 

 

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)

0 Members:

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG