Lumberyard
User Guide (Version 1.15)

Area Light

Component entity system is in preview release and is subject to change.

Use the Area Light component on an entity to light an area.

The Area Light component has the following settings:

Visible

Shows the light.

On initially

When created, the light is on by default.

General Settings

See the following general settings:

Color

The color of the light.

Default value: 0xFFFFFFFF

Diffuse multiplier

Sets the strength of the diffuse color.

Default value: 1

Specular multiplier

Sets the strength of the specular brightness.

Default value: 1

Ambient

Light acts as a multiplier for cubemap values.

Area Light Settings

See the following area light settings:

Area width

Width of the area light in meters.

Default value: 5

Area Height

Height of the area light in meters.

Default value: 5

Max Distance

Maximum distance in meters that the area light extends.

Default value: 2

FOV

Field of View (FOV) in degrees.

Default value: 45.0 degrees

Options

See the following options:

View distance multiplier

Adjusts the maximum view distance. For example, 1.0 uses the default and 1.1 is 10% farther than the default.

Default value: 1

Minimum spec

Minimum specification value at which the light is enabled.

Default value: Low

Cast shadow spec

The minimum specification at which shadows are cast.

Default value: Never

Voxel GI mode

Mode for light interaction with voxel global illumination (GI). Choose None, Static, or Dynamic.

Default value: None

Use VisAreas

Light uses visible areas. If unselected, light ignores visible areas.

Indoor only

Light is only rendered indoors.

Affects this area only

Light affects only the immediate area.

Volumetric fog only

Light affects only volumetric fog.

Volumetric fog

Light affects volumetric fog and surrounding area.

Shadow Settings

See the following shadow settings:

Terrain Shadows

Includes the terrain in the shadow casters for this light.

Animation

See the following animation settings:

Style

Enter a number to specify a preset light animation curve to play as defined in the Light.cfx file. Valid values are 0 to 48. You can also use values 40 to 48 for testing and debugging.

Default value: 0

Speed

Multiple of the base animation rate. For example, a value of 2.0 makes an animation play twice as fast.

Default value: 1

Phase

Animation start offset from 0 to 1. A value of 0.1 is 10% into the animation. For example, you can use this setting, for to prevent lights in the same scene, with the same animation, from being animated in unison.

Default value: 0

EBus Request Bus Interface

Use the following request functions with the EBus interface to communicate with other components of your game.

For more information about using the event bus (EBus) interface, see Working with the Event Bus (EBus) System.

SetLightState

Turns the light on or off.

Parameters

On or Off

Return

None

Scriptable

Yes

TurnOnLight

Turns the light on.

Parameters

None

Return

None

Scriptable

Yes

TurnOffLight

Turns off the light.

Parameters

None

Return

None

Scriptable

Yes

ToggleLight

Toggles the light state from on to off, or off to on.

Parameters

None

Return

None

Scriptable

Yes

EBus Notification Bus Interface

Use the following notification functions with the EBus interface to communicate with other components of your game.

For more information, see Working with the Event Bus (EBus) System.

LightTurnedOn

Sends a signal when the light is turned on.

Parameters

None

Return

None

Scriptable

Yes

LightTurnedOff

Sends a signal when the light is turned off.

Parameters

None

Return

None

Scriptable

Yes

The following is an example of script using the Request Bus Interface.

function example:OnActivate() LightComponentRequestBus.Event.TurnOnLight(self.entityId) LightComponentRequestBus.Event.TurnOffLight(self.entityId) LightComponentRequestBus.Event.ToggleLight(self.entityId) end