Quantcast

Jump to content

» «
Photo

Materials and Lighting, General

11 replies to this topic
DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#1

Posted 25 April 2005 - 10:43 AM Edited by DexX, 13 February 2007 - 11:36 AM.

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

gta_rodney
  • gta_rodney

  • Members
  • Joined: 15 Jun 2005

#2

Posted 01 November 2005 - 08:46 PM

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

blush.gif

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#3

Posted 10 November 2005 - 10:32 AM

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.

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#4

Posted 13 February 2007 - 11:37 AM

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

JP3
  • JP3

    Crackhead

  • Members
  • Joined: 07 Aug 2007

#5

Posted 06 October 2007 - 02:15 AM Edited by JP3, 06 October 2007 - 02:35 AM.

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

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#6

Posted 06 October 2007 - 03:13 PM

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

JP3
  • JP3

    Crackhead

  • Members
  • Joined: 07 Aug 2007

#7

Posted 06 October 2007 - 11:35 PM Edited by JP3, 06 October 2007 - 11:39 PM.

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!

DexX
  • DexX

    Black Hat

  • Feroci Racing
  • Joined: 16 May 2002

#8

Posted 06 October 2007 - 11:41 PM

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

JP3
  • JP3

    Crackhead

  • Members
  • Joined: 07 Aug 2007

#9

Posted 07 October 2007 - 12:05 AM

http://www.gtaforums...entry1057207365

xaviermaster221
  • xaviermaster221

    Player Hater

  • BUSTED!
  • Joined: 13 May 2008

#10

Posted 14 May 2008 - 07:48 PM

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.

MrGTAmodsgerman
  • MrGTAmodsgerman

    Square Civilian

  • Members
  • Joined: 02 Jan 2012

#11

Posted 02 June 2013 - 10:16 PM

QUOTE (xaviermaster221 @ Wednesday, May 14 2008, 19:48)
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.

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

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#12

Posted 03 June 2013 - 07:40 PM

you quoted a "bullsh*t quote post"
sa mirrors are done by cull.ipl
http://www.gtaforums...0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users