Lighting¶
The script functionality related to the lighting systems and lights.
Classes¶
Functions¶
-
string
getActiveLightManager
()¶ Returns the active light manager name.
-
String
getLightManagerNames
()¶ Returns a tab seperated list of light manager names.
-
bool
lightScene
(string completeCallbackFn, string mode)¶ Will generate static lighting for the scene if supported by the active light manager. If mode is “forceAlways”, the lightmaps will be regenerated regardless of whether lighting cache files can be written to. If mode is “forceWritable”, then the lightmaps will be regenerated only if the lighting cache files can be written.
Parameters: - completeCallbackFn – The name of the function to execute when the lighting is complete.
- mode – One of “forceAlways”, “forceWritable” or “loadOnly”.
Returns: Returns true if the scene lighting process was started.
-
void
onLightManagerActivate
(string name)¶ A callback called by the engine when a light manager is activated.
Parameters: name – The name of the light manager being activated.
-
void
onLightManagerDeactivate
(string name)¶ A callback called by the engine when a light manager is deactivated.
Parameters: name – The name of the light manager being deactivated.
-
void
resetLightManager
()¶ Deactivates and then activates the currently active light manager.This causes most shaders to be regenerated and is often used when global rendering changes have occured.
-
bool
setLightManager
(string name)¶ Finds and activates the named light manager.
Returns: Returns true if the light manager is found and activated.
Variables¶
-
bool $Light::renderLightFrustums
Toggles rendering of light frustums when the light is selected in the editor.
-
bool $Light::renderViz
Toggles visualization of light object’s radius or cone.
Advanced Lighting¶
The script functionality related to the Advanced Lghting system.
Enumeration¶
-
enum ShadowFilterMode
The shadow filtering modes for Advanced Lighting shadows.
Parameters: - None – Simple point sampled filtering. This is the fastest and lowest quality mode.
- SoftShadow – A variable tap rotated poisson disk soft shadow filter. It performs 4 taps to classify the point as in shadow, out of shadow, or along a shadow edge. Samples on the edge get an additional 8 taps to soften them.
- SoftShadowHighQuality – A 12 tap rotated poisson disk soft shadow filter. It performs all the taps for every point without any early rejection.
-
enum ShadowType
Parameters: - Spot –
- PSSM –
- Paraboloid –
- DualParaboloidSinglePass –
- DualParaboloid –
- CubeMap –
Variables¶
-
float $pref::PSSM::detailAdjustScale
Scales the model LOD when rendering into the PSSM shadow. Use this to reduce the draw calls when rendering the shadow by having meshes LOD out nearer to the camera than normal.
-
bool $Shadows::disable
Used by the editor to disable all shadow rendering.
-
bool $pref::Shadows::disable
Used to disable all shadow rendering.
-
ShadowFilterMode $pref::shadows::filterMode
The filter mode to use for shadows.
-
bool $AL::PSSMDebugRender
Enables debug rendering of the PSSM shadows.
-
float $pref::PSSM::smallestVisiblePixelSize
The smallest pixel size an object can be and still be rendered into the PSSM shadow. Use this to force culling of small objects which contribute little to the final shadow.
-
float $pref::Shadows::textureScalar
Used to scale the shadow texture sizes. This can reduce the shadow quality and texture memory overhead or increase them.
-
bool $AL::UseSSAOMask
Used by the SSAO PostEffect to toggle the sampling of ssaomask texture by the light shaders.
Basic Lighting¶
The script functionality related to the Basic Lghting system.
Variables¶
-
int $BasicLightManagerStats::activePlugins
The number of active Basic Lighting SceneObjectLightingPlugin objects this frame.
-
int $BasicLightManagerStats::elapsedUpdateMs
The number of milliseconds spent this frame updating Basic Lighting shadows.
-
float $pref::ProjectedShadow::fadeEndPixelSize
A size in pixels at which BL shadows are fully faded out. This should be a smaller value than fadeStartPixelSize.
-
float $pref::ProjectedShadow::fadeStartPixelSize
A size in pixels at which BL shadows begin to fade out. This should be a larger value than fadeEndPixelSize.
-
float $BasicLightManager::shadowFilterDistance
The maximum distance in meters that projected shadows will get soft filtering.
-
int $BasicLightManagerStats::shadowsUpdated
The number of Basic Lighting shadows updated this frame.