ScatterSky

consoledoc.h

Represents both the sun and sky for scenes with a dynamic time of day.

More...

ScatterSky

Only azimuth and elevation are networked fields. To trigger a full update of all other fields use the applyChanges ConsoleMethod.

float

Global brightness and intensity applied to the sky and objects in the level.

float

Affects the size of the sun's disk.

float

Controls how much the alpha component of colorize brigthens the sky. Setting to 0 returns default behavior.

LinearColorF

Tints the sky the color specified, the alpha controls the brigthness. The brightness is multipled by the value of colorizeAmt.

float

Controls how blue the atmosphere is during the day.

LinearColorF

Modulates the directional color of sunlight.

LinearColorF

Modulates the ambient color of sunlight.

LinearColorF

Modulates the fog color. Note that this overrides the LevelInfo.fogColor property, so you should not use LevelInfo.fogColor if the level contains a ScatterSky object.

float

Controls the contrast of the sky and sun during daytime.

float

Offsets the scatterSky to avoid canvas rendering. Use 5000 or greater for the initial adjustment.

Orbit

float

The horizontal angle of the sun measured clockwise from the positive Y world axis. This field is networked.

float

The elevation angle of the sun above or below the horizon. This field is networked.

float

The horizontal angle of the moon measured clockwise from the positive Y world axis. This is not animated by time or networked.

float

The elevation angle of the moon above or below the horizon. This is not animated by time or networked.

Lighting

bool

Enables/disables shadows cast by objects due to ScatterSky light.

int

static shadow refresh rate (milliseconds)

int

dynamic shadow refresh rate (milliseconds)

float

The brightness of the ScatterSky's light object.

Misc

Datablock for the flare produced by the ScatterSky.

float

Changes the size and intensity of the flare.

Night

LinearColorF

The ambient color during night. Also used for the sky color if useNightCubemap is false.

LinearColorF

The fog color during night.

bool

Enable or disable rendering of the moon sprite during night.

string

Material for the moon sprite.

float

Controls size the moon sprite renders, specified as a fractional amount of the screen height.

LinearColorF

Color of light cast by the directional light during night.

bool

Transition to the nightCubemap during night. If false we use nightColor.

string

Cubemap visible during night.

Advanced Lighting

Point3F

The proportions of constant, linear, and quadratic attenuation to use for the falloff for point and spot lights.

The type of shadow to use on this light.

filename

A custom pattern texture which is projected from the light.

int

The texture size of the shadow map.

Point4F

The ESM shadow darkening factor.

float

The distance from the camera to extend the PSSM shadow.

int

The logrithmic PSSM split distance factor.

float

The logrithmic PSSM split distance factor.

float

Start fading shadows out at this distance. 0 = auto calculate this distance.

bool

This toggles only terrain being rendered to the last split of a PSSM shadow map.

Advanced Lighting Lightmap

bool

This light is represented in lightmaps (static light, default: false)

LinearColorF

The color that should be used to multiply-blend dynamic shadows onto lightmapped geometry (ignored if 'representedInLightmap' is false)

bool

This light should render lightmapped geometry during its shadow-map update (ignored if 'representedInLightmap' is false)

Public Static Attributes

bool

Disables rendering of all instances of this type.

bool

Disables selection of all instances of this type.

Public Functions

void

Apply a full network update of all fields to all clients.

Detailed Description

Represents both the sun and sky for scenes with a dynamic time of day.

ScatterSky renders as a dome shaped mesh which is camera relative and always overhead. It is intended to be part of the background of your scene and renders before all other objects types.

ScatterSky is designed for outdoor scenes which need to transition fluidly between radically different times of day. It will respond to time changes originating from a TimeOfDay object or the elevation field can be directly adjusted.

During day, ScatterSky uses atmosphereic sunlight scattering aproximations to generate a sky gradient and sun corona. It also calculates the fog color, ambient color, and sun color, which are used for scene lighting. This is user controlled by fields within the ScatterSky group.

During night, ScatterSky supports can transition to a night sky cubemap and moon sprite. The user can control this and night time colors used for scene lighting with fields within the Night group.

A scene with a ScatterSky should not have any other sky or sun objects as it already fulfills both roles.

ScatterSky is intended to be used with CloudLayer and TimeOfDay as part of a scene with dynamic lighting. Having a ScatterSky without a changing time of day would unnecessarily give up artistic control compared and fillrate compared to a SkyBox + Sun setup.

ScatterSky

Only azimuth and elevation are networked fields. To trigger a full update of all other fields use the applyChanges ConsoleMethod.

float skyBrightness 

Global brightness and intensity applied to the sky and objects in the level.

float sunSize 

Affects the size of the sun's disk.

float colorizeAmount 

Controls how much the alpha component of colorize brigthens the sky. Setting to 0 returns default behavior.

LinearColorF colorize 

Tints the sky the color specified, the alpha controls the brigthness. The brightness is multipled by the value of colorizeAmt.

float rayleighScattering 

Controls how blue the atmosphere is during the day.

LinearColorF sunScale 

Modulates the directional color of sunlight.

LinearColorF ambientScale 

Modulates the ambient color of sunlight.

LinearColorF fogScale 

Modulates the fog color. Note that this overrides the LevelInfo.fogColor property, so you should not use LevelInfo.fogColor if the level contains a ScatterSky object.

float exposure 

Controls the contrast of the sky and sun during daytime.

float zOffset 

Offsets the scatterSky to avoid canvas rendering. Use 5000 or greater for the initial adjustment.

Orbit

float azimuth 

The horizontal angle of the sun measured clockwise from the positive Y world axis. This field is networked.

float elevation 

The elevation angle of the sun above or below the horizon. This field is networked.

float moonAzimuth 

The horizontal angle of the moon measured clockwise from the positive Y world axis. This is not animated by time or networked.

float moonElevation 

The elevation angle of the moon above or below the horizon. This is not animated by time or networked.

Lighting

bool castShadows 

Enables/disables shadows cast by objects due to ScatterSky light.

int staticRefreshFreq 

static shadow refresh rate (milliseconds)

int dynamicRefreshFreq 

dynamic shadow refresh rate (milliseconds)

float brightness 

The brightness of the ScatterSky's light object.

Misc

LightFlareData flareType 

Datablock for the flare produced by the ScatterSky.

float flareScale 

Changes the size and intensity of the flare.

Night

LinearColorF nightColor 

The ambient color during night. Also used for the sky color if useNightCubemap is false.

LinearColorF nightFogColor 

The fog color during night.

bool moonEnabled 

Enable or disable rendering of the moon sprite during night.

string moonMat 

Material for the moon sprite.

float moonScale 

Controls size the moon sprite renders, specified as a fractional amount of the screen height.

LinearColorF moonLightColor 

Color of light cast by the directional light during night.

bool useNightCubemap 

Transition to the nightCubemap during night. If false we use nightColor.

string nightCubemap 

Cubemap visible during night.

Advanced Lighting

Point3F attenuationRatio 

The proportions of constant, linear, and quadratic attenuation to use for the falloff for point and spot lights.

ShadowType shadowType 

The type of shadow to use on this light.

filename cookie 

A custom pattern texture which is projected from the light.

int texSize 

The texture size of the shadow map.

Point4F overDarkFactor 

The ESM shadow darkening factor.

float shadowDistance 

The distance from the camera to extend the PSSM shadow.

float shadowSoftness 
int numSplits 

The logrithmic PSSM split distance factor.

float logWeight 

The logrithmic PSSM split distance factor.

float fadeStartDistance 

Start fading shadows out at this distance. 0 = auto calculate this distance.

bool lastSplitTerrainOnly 

This toggles only terrain being rendered to the last split of a PSSM shadow map.

Advanced Lighting Lightmap

bool representedInLightmap 

This light is represented in lightmaps (static light, default: false)

LinearColorF shadowDarkenColor 

The color that should be used to multiply-blend dynamic shadows onto lightmapped geometry (ignored if 'representedInLightmap' is false)

bool includeLightmappedGeometryInShadow 

This light should render lightmapped geometry during its shadow-map update (ignored if 'representedInLightmap' is false)

Public Static Attributes

bool isRenderable 

Disables rendering of all instances of this type.

bool isSelectable 

Disables selection of all instances of this type.

Public Functions

applyChanges()

Apply a full network update of all fields to all clients.