This is the documentation for Enlighten.

Bake lighting configuration


Overview

Light definitions are passed to the Bake API by means of the .lights XML file. This file is the same format used for runtime lighting in GeoRadiosity, where each light has a few additional properties that apply only to the baking. The output from a given lights file goes into its own output directory, so it is possible to create multiple light configurations and switch between them without recalculating the scene. Multiple lighting configurations also share the precompute and other data, significantly reducing the time taken to generate baked output.

Lights properties

The .lights file has an XML schema available in the SDK (next to the ones for meshes, geometries and other properties). For each <light> element, there are a number of attributes, most of which are required (even if they are not applicable to the light type in question).

Parameter

Usage

Brief

Description

name

Required

The name of the light.

Unique light name.

enabled

Optional

Whether this light is enabled.

If not set, defaults to true

type

Required

An Enlighten::eLightType value.

0 for spot; 1 for point; 2 for directional; 3 for rectangular.

matrix

Required

Position and direction of the light.


colour

Required

Normalised light colour.


intensity

Required

HDR colour strength.


indirectColour

Optional

Normalised light colour for indirect component.

If desired, the colour of the bounce light can be different to the direct colour. If not set, defaults to colour.

indirectIntensity

Optional

HDR colour strength.

If desired, the colour of the bounce light can be different to the direct colour. If not set, defaults to intensity.

near

Optional

Near plane. Used by spotlights and pointlights only.


far

Optional

Far plane. Used by spotlights and pointlights only. For area lights used only in baking.

Tiles that are farther away than this value are not added to BakeVisibilityBuffer: they are not lit in baked light, which speeds up the baking process. If far is set to 0, the influence is infinity.

intensityRadius

Optional

The radius inside which intensity is clamped to the given value.

Specified in scene units. Unused for directional lights.

epsilon

Optional

Epsilon value used in the shadow map depth comparison.


coneAngle

Optional

The half radius of the spotlight.

A positive float.

innerConeAngle

Optional

The half radius of the spotlight's full brightness region.

A positive float.

secondConeAngle

Optional

The half angle in the secondary axis of a frustum or boxspot light (in radians).

A positive float.

secondInnerConeAngle

Optional

The half angle in the secondary axis of a frustum or boxspot light's full brightness region (in radians).

A positive float.

falloffModel

Optional

default (Inverse Squared) or unreal (Unreal Engine 3 compatible)


exponent

Optional

The falloff exponent of the light.

A positive float.

radiosityMultiplier

Optional

A value by which this light's radiosity will be multiplied.


castsShadow

Optional

Whether to cast shadows.

true or false

shadowMapSize

Optional

Resolution of the shadow map to use for this light. Only used in GeoViewer (not GeoRadiosity).

A positive integer. 

disableDirect

Optional

Disable direct light contribution of this light for baking.

Boolean, (default false)

generateLightMask

Optional

Enable generation of light mask for light.

Boolean, (default false)

shadowBias

Optional

Shadow bias to offset the sample point in the direction to the light source for the shadow test.

Positive float

pointRadius

Optional

Defines the radius around a point light to which to compute visibility.

Used only for baking.

directionalSpread

Optional

Defines the radius around a directional light to which to compute visibility.


rectangleHeight

Optional

The height of a rectangular area light.

Defined in world units.

rectangleWidth

Optional

The width of a rectangular area light.

Defined in world units.

lightUsage

Optional

How this light will be used: dynamic or baked.


animDuration

Optional

Defines animation duration. Used only in GeoRadiosity.


Environment block

The <environment> element contains all the attributes related to setting the environment.  Please check the schema file for more details. 

Within it you can set a global environment using the filename attribute. The environment file should be placed next to this XML file, the type of the file content (loaded and saved with the C++ LoadInterface<> call) is Enlighten::CpuEnvironment. You can get one of these objects directly from the High Level Runtime, or construct one yourself from the highest MIP level of your cubemap.Â