This is the documentation for Enlighten.
Baking parameters
Baking parameters are specified in a .bp
XML file, separate to your .scene
file. The format of this file is described below, and the full XML schema definitions for this file are available in <Enlighten_install_directory>\Src\Samples\Libraries\GeoEn2Support\bp.xsd
.
<bakeParamsList>
Your bake parameters must be enclosed in a <bakeParamsList>
element, with the following attributes:
Attribute | Optionality | Description | Value |
---|---|---|---|
| Required | The version of the bake parameters list. |
|
| Optional | Determines whether the application should render albedo textures per- |
|
| Optional | If |
|
<bakeParams>
The <bakeParams>
element contains the parameters to be passed to the EnlightenBake
API, with several optional child elements to govern direct and indirect light baking, as well as solver and AO behaviour.
The <bakeParams>
element supports the following attributes:
Attribute | Optionality | Description | Value |
---|---|---|---|
| Required | The name of the bake parameter set. | String |
| Required | The resolution of the created baked lightmap. | 2-element power-of-two vector |
| Optional | The GUID of the bake parameter set. | String |
| Optional | Push off for ray casting. It is not recommended to change this unless advised by Enlighten support. | Positive float |
| Optional | Determines whether the lightmap UVs of the different instances will be packed. By default, instances have their chart UVs passed to the baking stage unmodified. If they overlap in the | Boolean |
| Optional | The desired type of baking output. The output will always be available as a 2D texture. If |
|
| Optional | Instead of outputing the irradiance, that is the weighted sum of all incoming radiance, the light map will contain an intensity value. If you place a light source in the dominant direction of the lighting, which can be retrieved from the baked directional irradiance map, and use the intensity stored in the light map, the resulting irradiance will be identical to the result Enlighten normally outputs. This allows you to easily use any kind of BRDF to relight surfaces, especially more specular BRDFs. There are certain caveats to look out for when using this mode and we recommend using cube maps when using specular BRDFs. Please contact Enlighten Support if you intend to use this feature. | Boolean |
| Optional | Deprecated: The type of faces that cast shadows in the direct lighting tasks. This flag should represent how your runtime creates shadow maps. |
|
| Optional | Set the tolerance value for marking a pixel as invalid in baking. Behaves similar to the back face tolerance in the radiosity precompute. | Positive float |
| Optional | Enable final gather as a high-quality post-processing step run after the default upsampling. | Boolean |
| Optional | If 'true', will generate directional irradiance maps used for relighting of normal mapped geometry. | Boolean |
| Optional | Deprecated: If 'true', will use the legacy surface relighting model, which had been the default up to Enlighten 3.02. The new relighting model produces better quality with more complex geometry. | Boolean |
| Optional | Deprecated. Has no effect. | Positive float |
| Optional | Deprecated. Has no effect. | 2-element vector |
The <bakeParams>
element supports the following child elements:
<direct>
These properties affect only the direct light baking.
Attribute | Optionality | Description | Value |
---|---|---|---|
| Optional | The number of samples to take per-pixel in order to reduce aliasing. This is the maximum number of times to supersample a lightmap pixel. For preview bakes, a value of | Positive integer |
| Optional | The number of samples to take per-area light in order to capture soft shadowing effects. This is the maximum number of rays to trace to any light with an area. Larger area lights will require more rays to produce noise-free output. The default value works with the majority of scene setups, but you should increase this value if you observe noise. Like | Positive integer |
| Optional | The size of the radius of the post-processing filter in pixels that blurs the direct light baking. The filter is aware of geometry and visibility between pixels and thus no light leaking will occur. The filter allows otherwise sharp shadows to be smoothed without the need to use area light sources. In general, a value in the range of | Positive integer |
| Optional | Threshold value for BakeVisibility tile culling. | Positive float or |
<indirect>
These properties affect only the indirect light baking.
Attribute | Optionality | Description | Value |
---|---|---|---|
| Optional | The maximum number of probes to use when interpolating probes for bounding box corners when lifting indirect lighting from probes into lightmaps. The default is | Positive integer |
| Optional | Whether to enable visibility aware upsampling. This ensures that radiosity upsampling takes the visibility of the sample points of the radiosity samples and the sample points of the baked light map into account. This allows Enlighten to avoid interpolating from radiosity pixels whose samples are on the other side of a wall to the sample points of the baked light map pixel. You can only enable this feature if your light map only contains target meshes. If you enable it on a light map that, for example, contains a detail mesh, the feature will be automatically disabled and a warning generated. | Boolean |
| Optional | The number of rays to cast for each output pixel during final gather. | Positive integer |
| Optional | The number of samples to cast rays from for each output pixel during final gather. | Positive integer |
| Optional | Enable the evaluation of transparency during final gather. Results might be inconsistent with real-time output. | Boolean |
| Optional | Perform filtering after final gather to remove noise. | Boolean |
<ao>
These properties affect the AO baking.
Attribute | Optionality | Description | Value |
---|---|---|---|
| Optional | The distance to search for occluders. This value sets a distance below which a point is considered occluded. When the hemisphere is searched for occlusion, any ray that intersects geometry within this distance adds to the total occlusion value for the point, making it appear darker. You will want to tune this parameter based on the size of your scene. | Positive float |
| Optional | The quality (in number of rays to cast) for the AO. Fewer rays produce a noisier result. Usually, using | Integer (power of 2, min |
| Optional | Threshold value for AO pixel culling. If the visibility is less than this value the pixel is rejected and instead interpolated from nearby valid pixels. AO visibility is the proportion of valid (i.e. front-facing) geometry seen by the pixel, where | Float between |
| Optional | The maximum number of times to supersample a pixel to remove aliasing for AO. Increasing this value does not increase baking times as the number of rays is only defined by the AO quality. Effectively this parameter controls how to distribute the rays in the baking pixel. | Positive integer |
<solver>
Attribute | Optionality | Description | Value |
---|---|---|---|
| Optional | Whether to use white albedo for radiosity computations. Usually the albedo of a surface is defined by the albedo texture provided, or | Boolean |
| Optional | Whether to use emissive lighting for the radiosity. If this property is set, there are no emissive surfaces, no matter what emissive texture was supplied. | Boolean |
Example bake parameters file
<?xml version="1.0" encoding="utf-8"?> <bakeParamsList version="1"> <bakeParams name="Interior" resolution="512 512" unitScale="1.0" pushOff="10.0" packUVs="true"> <direct maxAASamples="8" maxLightSamples="64"/> <ao quality="256" distance="500"/> </bakeParams> </bakeParamsList>