GRAW Lights, Lamps
By: GRIN Wille
Published : 02 July 2006

Since GRAW uses deffered lighting lights are rendered a bit special. You can have basicly as many lights as you want  on screen as long as they dont overlap overlap each other. for example  10 small lights that don't overlap would render  quite fast, 1 big lamp would render also kinda fast, but 5 big lamps that overlap each others lights would be much much slower. Look at how lights are used the levels in the box-fresh game!

----------------------------

Lights in GRAW are the standard lights in 3dsmax such as "omni" and "spotlight" and can be put inside whatever unit you want really.Be it a prop or a house or a weapon or a dog..

Omni lights:

The omni lights use only the "far attenuation" setting in 3dsmax to determine how far out they should reach but this can be animated incase you want a huge explosion that spreads over the land and want dynamic light to follow it;)

"colour" and "multiplier" are both animateable with standard keyframes and can be set to loop by setting their "out of range" to "loop" in the 3dsmax graph/curve editor. This can be used effectivly to make flickering lights or a disco! hehe

 in a rainy thunder-level you could for example but one huge omnilight in the sky and animate it for lightning strikes!

 in the xml the tags for your omni lights would look something like this:

 <light name="omni" type="omni"/> The cheapest kind of omni light 

 <light name="omni" type="omni|specular"/> Having an omni light that affects specular is more expensive to render , use with caution!(as with all lights..)

 <light name="light" type="omni|cube_projection" texture="low_streetlight_projection_df"/>

omni with cube projection can be used for many cool effects, look at the unit "low_street_light" in data\objects\props for an example this!

to play your animations for lights you also have to add

<animation_group name="flicker" playing="true">
        <object name="the name of your light that will be animated"/>
 </animation_group>

 to your xml file! more on animation groups under "animations" , duh!:)

Spot lights:

The kind of spotlight in 3dsmax that you should use is "free", it should not have a target.

The spotlights use only the "far attenuation" setting in 3dsmax to define how far they should reach
and the hotspot/beam setting to decide how wide the spotligh should be.

these settings are animateable with standard keyframes.

"colour" and "multiplier" are both animateable with standard keyframes and can be set to loop by setting their "out of range" to "loop" in the 3dsmax graph/curve editor. This can be used effectivly to make flickering lights or a disco! hehe

You can also ofcourse animate the rotation of the light to create for example a lighthouse or a searchlight from a guard tower.

the xml for a spotlight in your model xml should look something like this

 <light name="name of your light in 3dsmax" type="spot"/> the cheapest kind of spotlight

<light name="name of your light in 3dsmax" type="spot|specular"/> having the spotlight affect specularity is more expensive. dont use this too much.

to have your lights animated you should also paste in this in your xml

<animation_group name="flicker" playing="true">
        <object name="the name of your light that will be animated"/>
 </animation_group>

more on this subject under "animations", duh! :)


© GhostRecon.net