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 |
---|---|---|---|
| Required | The name of the light. | Unique light name. |
| Optional | Whether this light is enabled. | If not set, defaults to |
| Required | An |
|
| Required | Position and direction of the light. | |
| Required | Normalised light colour. | |
| Required | HDR colour strength. | |
| 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 |
| Optional | HDR colour strength. | If desired, the colour of the bounce light can be different to the direct colour. If not set, defaults to |
| Optional | Near plane. Used by spotlights and pointlights only. | |
| 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 |
| Optional | The radius inside which intensity is clamped to the given value. | Specified in scene units. Unused for directional lights. |
| Optional | Epsilon value used in the shadow map depth comparison. | |
| Optional | The half radius of the spotlight. | A positive float. |
| Optional | The half radius of the spotlight's full brightness region. | A positive float. |
| Optional | The half angle in the secondary axis of a frustum or boxspot light (in radians). | A positive float. |
| Optional | The half angle in the secondary axis of a frustum or boxspot light's full brightness region (in radians). | A positive float. |
| Optional |
| |
| Optional | The falloff exponent of the light. | A positive float. |
| Optional | A value by which this light's radiosity will be multiplied. | |
| Optional | Whether to cast shadows. |
|
| Optional | Resolution of the shadow map to use for this light. Only used in GeoViewer (not GeoRadiosity). | A positive integer. |
| Optional | Disable direct light contribution of this light for baking. | Boolean, (default |
| Optional | Enable generation of light mask for light. | Boolean, (default |
| Optional | Shadow bias to offset the sample point in the direction to the light source for the shadow test. | Positive float |
| Optional | Defines the radius around a point light to which to compute visibility. | Used only for baking. |
| Optional | Defines the radius around a directional light to which to compute visibility. | |
| Optional | The height of a rectangular area light. | Defined in world units. |
| Optional | The width of a rectangular area light. | Defined in world units. |
| Optional | How this light will be used: | |
| 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.