Main   Class List   Namespace List   Wiki

LightDescription Class Reference
[Lighting]

A helper datablock used by classes (such as shapebase) that submit lights to the scene but do not use actual "LightBase" objects. More...

Inheritance diagram for LightDescription:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void apply ()
 Force an inspectPostApply call for the benefit of tweaking via the console.

Public Attributes

Light Animation

float animationPeriod
 The length of time in seconds for a single playback of the light animation.
float animationPhase
 The phase used to offset the animation start time to vary the animation of nearby lights.
LightAnimData animationType
 Datablock containing light animation information (LightAnimData).
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.
Light

float brightness
 Adjusts the lights power, 0 being off completely.
bool castShadows
 Enables/disabled shadow casts by this light.
ColorF color
 Changes the base color hue of the light.
float range
 Controls the size (radius) of the light.
Misc

float flareScale
 Globally scales all features of the light flare.
LightFlareData flareType
 Datablock containing light flare information (LightFlareData).
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).

Detailed Description

A helper datablock used by classes (such as shapebase) that submit lights to the scene but do not use actual "LightBase" objects.

This datablock stores the properties of that light as fields that can be initialized from script.

Example:
// Declare a light description to be used on a rocket launcher projectile
datablock LightDescription(RocketLauncherLightDesc)
{
   range = 4.0;
   color = "1 1 0";
   brightness = 5.0;
   animationType = PulseLightAnim;
   animationPeriod = 0.25;
};

// Declare a ProjectileDatablock which uses the light description
datablock ProjectileData(RocketLauncherProjectile)
{
   lightDesc = RocketLauncherLightDesc;

   projectileShapeName = "art/shapes/weapons/SwarmGun/rocket.dts";

   directDamage = 30;
   radiusDamage = 30;
   damageRadius = 5;
   areaImpulse = 2500;

   // ... remaining ProjectileData fields not listed for this example
};
See also:
LightBase

Member Function Documentation

void LightDescription::apply (  ) 

Force an inspectPostApply call for the benefit of tweaking via the console.

Normally this functionality is only exposed to objects via the World Editor, once changes have been made. Exposing apply to script allows you to make changes to it on the fly without the World Editor.

Note:
This is intended for debugging and tweaking, not for game play
Example:
// Change a property of the light description
RocketLauncherLightDesc.brightness = 10;

// Make it so
RocketLauncherLightDesc.apply();

Member Data Documentation

The length of time in seconds for a single playback of the light animation.

The phase used to offset the animation start time to vary the animation of nearby lights.

Datablock containing light animation information (LightAnimData).

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

Adjusts the lights power, 0 being off completely.

Enables/disabled shadow casts by this light.

Changes the base color hue of the light.

A custom pattern texture which is projected from the light.

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

Globally scales all features of the light flare.

Datablock containing light flare information (LightFlareData).

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.

Controls the size (radius) of the light.

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.