Torque 3D - Script Manual: Sun Class Reference

TorqueScript

Main   Class List   Namespace List   Online

Sun Class Reference
[Atmosphere]

A global light affecting your entire scene and optionally renders a corona effect. More...

Inheritance diagram for Sun:

List of all members.

Public Attributes

void animate
 animate( F32 duration, F32 startAzimuth, F32 endAzimuth, F32 startElevation, F32 endElevation )
void apply
Lighting

ColorF ambient
 Color shading applied to surfaces not in direct contact with light source, such as in the shadows or interiors.
float brightness
 Adjust the Sun's global contrast/intensity.
bool castShadows
 Enables/disables shadows cast by objects due to Sun light.
ColorF color
 Color shading applied to surfaces in direct contact with light source.
Advanced Lighting

Point3F attenuationRatio
 The proportions of constant, linear, and quadratic attenuation to use for the falloff for point and spot lights.
filename cookie
 A custom pattern texture which is projected from the light.
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.
float logWeight
 The logrithmic PSSM split distance factor.
int numSplits
 The logrithmic PSSM split distance factor.
Point4F overDarkFactor
 The ESM shadow darkening factor.
float shadowDistance
 The distance from the camera to extend the PSSM shadow.
float shadowSoftness
ShadowType shadowType
 The type of shadow to use on this light.
int texSize
 The texture size of the shadow map.
Orbit

float azimuth
 The horizontal angle of the sun measured clockwise from the positive Y world axis.
float elevation
 The elevation angle of the sun above or below the horizon.
Corona

bool coronaEnabled
 Enable or disable rendering of the corona sprite.
string coronaMaterial
 Texture for the corona sprite.
float coronaScale
 Controls size the corona sprite renders, specified as a fractional amount of the screen height.
ColorF coronaTint
 Modulates the corona sprite color ( if coronaUseLightColor is false ).
bool coronaUseLightColor
 Modulate the corona sprite color by the color of the light ( overrides coronaTint ).
Misc

float flareScale
 Changes the size and intensity of the flare.
LightFlareData flareType
 Datablock for the flare produced by the Sun.
Advanced Lighting Lightmap

bool includeLightmappedGeometryInShadow
 This light should render lightmapped geometry during its shadow-map update (ignored if 'representedInLightmap' is false).
bool representedInLightmap
 This light is represented in lightmaps (static light, default: false).
ColorF shadowDarkenColor
 The color that should be used to multiply-blend dynamic shadows onto lightmapped geometry (ignored if 'representedInLightmap' is false).

Static Public Attributes

static bool isRenderable
 Disables rendering of all instances of this type.
static bool isSelectable
 Disables selection of all instances of this type.

Detailed Description

A global light affecting your entire scene and optionally renders a corona effect.

Sun is both the directional and ambient light for your entire scene.


Member Data Documentation

ColorF Sun::ambient

Color shading applied to surfaces not in direct contact with light source, such as in the shadows or interiors.

animate( F32 duration, F32 startAzimuth, F32 endAzimuth, F32 startElevation, F32 endElevation )

void Sun::apply

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

float Sun::azimuth

The horizontal angle of the sun measured clockwise from the positive Y world axis.

Adjust the Sun's global contrast/intensity.

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

ColorF Sun::color

Color shading applied to surfaces in direct contact with light source.

filename Sun::cookie

A custom pattern texture which is projected from the light.

Enable or disable rendering of the corona sprite.

Texture for the corona sprite.

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

Modulates the corona sprite color ( if coronaUseLightColor is false ).

Modulate the corona sprite color by the color of the light ( overrides coronaTint ).

The elevation angle of the sun above or below the horizon.

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

Changes the size and intensity of the flare.

Datablock for the flare produced by the Sun.

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

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

The logrithmic PSSM split distance factor.

The logrithmic PSSM split distance factor.

The ESM shadow darkening factor.

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

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

The distance from the camera to extend the PSSM shadow.

The type of shadow to use on this light.

The texture size of the shadow map.



Copyright © GarageGames, LLC. All Rights Reserved.