Game Development Reference
In-Depth Information
Reading a LIGHT section
When reading the light section, we get the usual NODE_NAME and
NODE_TM tags to define the name and default position, orientation and
scale. A light has a type; the basic ones are 'Directional', 'Position' or
'Spot'. A light section then has tags to indicate whether to use shadows,
whether the light is active, the shape of a spotlight cone and the source of
the light's ambient level; these are defined by the tags LIGHT_
SHADOWS, LIGHT_USELIGHT, LIGHT_SPOTSHAPE and LIGHT_USE-
GLOBAL respectively. Most of the settings for a light are contained in the
subsection LIGHT_SETTINGS. This subsection will supply the colour of
the light via the LIGHT_COLOR tag and the intensity of the light using the
LIGHT_INTENS tag. The settings subsection provides many other details
for working with shadow maps or projection maps, which we will not be
using in the real-time parser.
*LIGHTOBJECT {
*NODE_NAME "FDirect01"
*LIGHT_TYPE Directional
*NODE_TM {. . .
}
*LIGHT_SHADOWS Off
*LIGHT_USELIGHT 1
*LIGHT_SPOTSHAPE Circle
*LIGHT_USEGLOBAL 0
*LIGHT_ABSMAPBIAS 0
*LIGHT_OVERSHOOT 0
*LIGHT_SETTINGS {
*TIMEVALUE 0
*LIGHT_COLOR 1.0000 1.0000 1.0000
*LIGHT_INTENS 1.0000
*LIGHT_ASPECT 1.0000
*LIGHT_HOTSPOT 43.0000
*LIGHT_FALLOFF 45.0000
*LIGHT_TDIST 240.0000
*LIGHT_MAPBIAS 1.0000
*LIGHT_MAPRANGE 4.0000
*LIGHT_MAPSIZE 512
*LIGHT_RAYBIAS 0.0000
}
}
Search Nedrilad ::




Custom Search