[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] [ Search: ]

4.5.4.3 Engine Configuration

This section describes the configuration keys used by the 3D engine. The default values are stored in ‘CS/data/config/engine.cfg’.

Lighting Options

Engine.Lighting.Ambient.Red = [0..255]
Engine.Lighting.Ambient.Green = [0..255]
Engine.Lighting.Ambient.Blue = [0..255]

These keys set the amount of ambient light that is used when lighting is calculated. This amount of light is present on all textures even if no light source shines on them. Default values are 20 luminosity units.

Engine.Lighting.CosinusFactor = [-1..1]

Control how much the angle of the light with the polygon it hits affects the final light value. Values ranges from -1 to 1. With -1 the polygons will get no light at all. With 0 it will be perfect cosine rule. With 1 the cosine is ignored and it will be like CrystalSpace was in the past. Note that changing this value at runtime only has an effect on dynamic lights. This option corresponds to the -cosfact commandline option and the ‘cosfact’ console command. (default: 0)

Engine.Lighting.Radiosity = <yes/no>

If this option is set to yes, the pseudo-radiosity system will be enabled. This means that the precalculated lighting routines will also reflect light on normal polygons (and not only on mirrors). The number of allowed reflections depends on the ‘Engine.Lighting.Reflections’ variable. Using this flag you get a sort of simulation of radiosity. Note that it greatly increases the time needed for precalculated lighting. This option only has effect in combination with the -relight commandline option. Also note that this option is currently broken (i.e. crashes CS).

Engine.Lighting.Reflections = <number>

This sets the maximum number of reflections for a light beam. More exactly, it sets how often a beam of light may hit a polygon in the same sector. Setting this to 0 would produce totally dark polygons (apart from ambient light). A value of 1 means that light may hit polygons but is not reflected to other polygons. Higher values allow more reflections. This is especially useful in combination with mirrors. If pseudo-radiosity is enabled with the ‘Engine.Lighting.Radiosity’ key, light is also reflected from non-mirror polygons. (default: 1)

Radiosity Options

Engine.Lighting.Radiosity.Enable = <yes/no>

This option activates the new radiosity system. To recalculate radiosity run walktest -relight on the level. (default: no)

Engine.Lighting.Radiosity.StopPriority = <float>

Internally radiosity computes a priority for each polygon. The priority is in the range of 0..256, where 0 means nothing to do. When the highest priority become lower then the stoppriority, radiosity calculation will stop. (Default: 0.1)

Engine.Lighting.Radiosity.StopImprovement = <float>

When the highest priority becomes lower than the highest priority at the start of calculation divided by this value calculation will stop. (Default: 100.0)

Engine.Lighting.Radiosity.StopIterations = <number>

After processing this many polygons the radiosity calculation will stop. This will prevent endless loops. If your level has many polygons you may need to increase the value. (Default: 10000)

Engine.Lighting.Radiosity.SourcePatchSize = <number>

This value will make radiosity calculation use the average of NxN size patches on source polygons when shooting light from one polygon to another (but not on destination polygons). Increasing the value will speed up computation considerably, while reducing quality only slightly. Try values of 1..256, depending on the LightmapSize. Use only powers of two. (Default: 16)

Engine.Lighting.Radiosity.ColourBleed = <float>

This variable controls the amount of color emitted by a polygon. The colour is taken by examining the texture of the polygon. Thus a blue texture will reflect blueishly. So 0.0 will remove texture influence, making the level render as if all white. And high values will make colour more important. Try 0.0-4.0. (Default: 1.0)

Engine.Lighting.Radiosity.DoStaticSpecular = <yesno>

yes will turn on specular lighting using radiosity. Since this is precalculation, only a static 'fake' specular effect can be given. Does not seem to give huge effects, but I left in the code so you can play with it :-). (Default: no)

Engine.Lighting.Radiosity.StaticSpecularAmount = <float>

The amount of specular lighting to add when lighting. Try between 0 and 1. (Default: 0.70)

Engine.Lighting.Radiosity.StaticSpecularTightness = <number>

tightness of the specular highlight. a power of 2 of this variable is used for speed. Thus try 0-10. (Default: 4)


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated using texi2html 1.76.