Quantcast

Jump to content

» «
Photo

Vertex Prelighting

7 replies to this topic
DeathSquad
  • DeathSquad

    CEO DeathSquad Industries

  • Members
  • Joined: 02 Aug 2003

#1

Posted 18 January 2006 - 03:44 AM Edited by DeathSquad, 01 March 2006 - 04:17 AM.

Vertex Prelighting for Zmod2
By. Deathsquad Industries
Deathsquad Industries Homepage

This will teach you how to prelit your models for San Andreas with Zmodeler 2 by Oleg. I have not explored this in Vice City or even GTA III yet, so for the moment this is for SA only. I would also like to thank Oleg who told me how to do this, since I couldn't figure it out.

[ STEP 1 ]

In zmod2, load up the model you wish to prelit, for this tutorial I am going to use a map model I have made for San Andreas, which is the support tower to a suspension bridge. For this tutorial your model should already be textured and ready to go in game (if not already).

user posted image

[ STEP 2 ]

Open up the material editor and uncheck all the textures to the model. You only need to uncheck the box that has the material, the second checked material that has no material can stay.

user posted image

user posted image

[ STEP 3 ]

Next right click on your model, and select PROPERTIES. In the properties menu select VERTICLES, then FORMAT.

user posted image

Uncheck NORMALS and select both DIFFUSE COLOR and SPECULAR COLOR. For future purposes please note that DIFFUSE COLOR is the prelit color for daytime, and SPECULAR is the prelit color for nighttime.

user posted image

Your model will now become shades of white and gray.

[ STEP 4 ]

On the far right menu, select SURFACE -> PAINT -> PRELIT COLOR.

user posted image

Click on your model, Zmod2 will calculate the prelit effects with the default lighting in Zmod2. A progress bar will appear at the bottom of the screen, and after it is finish the model will change color to a degree, and show signs of being shaded. Please note that this

current view is showing you the DIFFUSE/DAYTIME Shading. Now go back to the side menu and pick SURFACE -> PAINT -> SWAP COLORS and click on your model. The model should return back to the original colors before you prelit, this is because you are now looking at the SPECULAR/NIGHTTIME shading. Once again select PRELIT COLOR and click on your model. The model should shade itself as it did in the DIFFUSE view.

[ STEP 5 ]

Select SWAP COLORS again and click on your model, this will return you to Diffuse/Daytime shading (the model will probably look like it did not change, but it did). Now its time to add the actual coloring to the vertex. You can add shading to the model by selecting groups of vertex and coloring them, this is also (I believe) how you would create lighting effects for nighttime. For this tutorial I will do a generic prelit example.

On the side menu, click on SELECT and ALL. Below these menus click the SELECTED MODE button which will turn red, meaning it is active. Now right click on one of the view windows and your model will be selected.

user posted image

user posted image

Go to the above menu and select the VERTEX box.

user posted image

Left Click on your model so you may select the vertexes, then right click to select them all. Now it is time to pick out a color.

DeathSquad
  • DeathSquad

    CEO DeathSquad Industries

  • Members
  • Joined: 02 Aug 2003

#2

Posted 18 January 2006 - 04:00 AM Edited by Suction Testicle Man, 18 January 2006 - 11:30 AM.

[ STEP 6 ]

The color you pick will determine the "tint" of how your object will appear in the game. I have not explored this area too much as of yet, so I hope to make additions on this in the future. If you are looking to match the colors to an already in game object, I suggest exporting that object's dff out and bringing it into Zmod, and remove the textures, it will show you the prelit colors already used. For this generic test and with most of my objects, I have picked colors from a piece of road. To actually determine the color I took a screen shot of the model, then placed it in Paint Shop Pro and used the color dropper to get the color code. I will use the generic colors I have come up with from this.

Now that we have all of the model vertex selected, go to the right side menu and pick SURFACE -> PAINT -> COLOR. Click the box next to COLOR to bring up the full menu.

user posted image

Click on the Color Bar (not Fill Selection) and it will bring up the generic windows coloring menu.

user posted image

For the daytime generic color I use, I use H: 148, S: 10, L: 149, which is the Hue/Saturation/Limination of the color, this will select a grey color. Now click FILL SELECTION and the model will be shaded. For this color, I click the button three times to get the desired effects, and as said above, selecting small groups of vertex will give shaded like variations in the model.

Now go to the top menu and select the OBJECT box.

user posted image

Go to SURFACE -> PAINT -> SWAP COLORS and click on your model to change the prelit view to SPECULAR/NIGHTTIME. (Make Sure SELECTED MODE is off!). Once again go to SELECT -> ALL and then click the Vertex Box in the above menu. Left click model to highlight, and if needed right click (usually the model is already red/highlighted). Again go to SURFACE -> PAINT -> COLOR and bring up the Windows Color Picker.

Generic Nighttime color I have picked it close to black, but is more within the realm of blue. Use H: 145, S: 96, L: 16. Click FILL SELECTION three times.

[ STEP 7 ]

Once again click the OBJECT BOX in the top menu, and then swap colors to bring you back to the DIFFUSE/DAYTIME coloring. This time the color change in the model will be apparent. Open your material editor and recheck all your textures, and your model is now prelit. Export.

NOTE: It is the collision file and its specifics that determine the brightness of your character or vehicles while on this model. Default your character will appear almost black.

In Collision Editor II, you will go into the EDIT MODE and click the FACE tab. Click ALL which will highlight the collision model, then you can adjust the BRIGHTNESS Bar. I haven't found a good setting for it yet, halfway is a good start. Make sure your collision is type COL3.

user posted image

And that is how you prelit in Zmod2. This isn't a perfect tutorial for it, but its a good start for anyone like myself who was confused on how to do this.

bigrazzer
  • bigrazzer

    Modeller and Texture Artist

  • Members
  • Joined: 26 Sep 2005

#3

Posted 19 January 2006 - 10:26 PM

Great tutorial.. if only i had used zmod to model my buildings.. any idea on how to do this in max??? Thumbs up btw icon14.gif ..........BigRazzer

AleXXX
  • AleXXX

    (-:-)

  • Members
  • Joined: 19 Apr 2004

#4

Posted 03 February 2006 - 04:31 PM

You simply have changed vetex colour. To pre-light your model, it is necessary to use light sources. You can't do it in Zmodeller 1/2, but you can in 3ds max/Blender.
3ds max tutorial
Blender tutorial

Carmo
  • Carmo

    Player Hater

  • Members
  • Joined: 26 Jun 2005

#5

Posted 04 February 2006 - 01:09 PM

when i try to export after doing this i get this message
Scene Root doesn't contain "illsub_c2_r3.dff" node. file:GTAExport.cpp line:60



DeathSquad
  • DeathSquad

    CEO DeathSquad Industries

  • Members
  • Joined: 02 Aug 2003

#6

Posted 05 February 2006 - 01:27 AM

When you go to save the file, you need to save it as "illsub_c2_r3.dff" or else rename the "scene node", which is on the right hand side in the Object Menu, it'd be the top name that starts the hierchy aka "illsub_c2_r3.dff".

Carmo
  • Carmo

    Player Hater

  • Members
  • Joined: 26 Jun 2005

#7

Posted 22 February 2006 - 11:00 AM

Thanks deathsquad for all your help ive got it in the game and it looks fine on the daytime but at night it is the same brightness as during the day and the lights dont glow on it. can u tell me were im going wrong.

pinky
  • pinky

    "Tooled up and chibbin' ye, ya Bass".

  • Members
  • Joined: 06 Jan 2005

#8

Posted 23 February 2006 - 12:38 PM

QUOTE (Carmo @ Feb 22 2006, 11:00)
Thanks deathsquad for all your help ive got it in the game and it looks fine on the daytime but at night it is the same brightness as during the day and the lights dont glow on it. can u tell me were im going wrong.

Zmod2 deosn't export omni lights with the dff filter yet, you would have to use Max I think.
The other problem I don't know how to help.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users