GTA4: Lights

GTA San Andreas and GTA Vice City discussion.

Moderator: Oleg

User avatar
Oleg
Site Admin
Posts: 14022
Joined: Fri Feb 06, 2004 3:54 am
Contact:

GTA4: Lights

Post by Oleg »

GTA4 user-defined light sources in WFT and WDR models.

GTA4 supports addition of user-defined light sources to your model. At the moment, these lights doesn't seem to be attached to parts and set constantly on it's place. You should place ZModeler light sources under associated dummy node that you will export. For example, you should place lights under schafter.wft node if you will export schafter.wft model file.

WDR models (guns) contain additional "root" dummy point in a hierarchy, and it could be moved away. You should place your lights under this dummy point. Thus, for example, lights should be under "M4" dummy; "M4" dummy should be under "m4.wdr" dummy.

Point/Omny and Spot lights only are supported. Once you create a light, you can switch it to manipulators level to adjust it's properties. Range is very significant.

Light objects can have additional GTA-significant options, they are in light's properties in User-defined options box. You can add them manually, or remove/edit them if they are available after import.

SHADOWS - will force game to compute dynamic shadows for the light. Avoid using this too much, since dynamic shadows give a major performance penalty. Point/Omni light with shadows is way slower than Spot light with shadows

DAYLIT - will force light to lit in daytime too.

CORONA with value in range 0.0 ... 10.0 will create a "corona" effect in a point of light location. the value is a size of corona effect

FLAGS other flags values (some of them are still unknown). Avoid using or keep set it to 0.

MODE is light shine/flashing mode. Currently the following modes are known:

Code: Select all

// 0, 6  = generic. constant lit. 
// 1, 2  = long lit, random flash, long lit. 
// 3, 14 = hazard flash; 
// 4     = slow hazard flash; 
// 5     = very slow hazard flash; 
// 7, 8  = off. condition light? 
// 9     = very fast hazard flash; 
// 11,12 = very slow fade in, very slow fade out; 
// 13    = slow fade in, slow fade out; 
// 15    = tiny flickering 
// 16    = short rare flash 



Light color and spot-light cones are significant.

Using too much lights will give a major performance penalty!