This is the documentation for Enlighten.
Enlighten probes
We recommend to use the automatic probe placement workflow and provide regions where probes are required.
If you want to use your own implementation of probe placement, provide regular grids or sets of probe positions.
GeoRadiosity provides basic visualization and and debugging for probes in your scene. See the ProbeSets service.
Probe regions
To use the automatic probe placement workflow, when you export the enlighten scene, define the regions of space where probes are required.
In many cases you can determine this region automatically. For example, probes might be required to cover:
- the bounds of static meshes that are lit by probes, and
- the area of terrain where the character can walk.
In some cases you may need the artist to place hints in the world to indicate where probes are required, or to choose a resolution which provides the right balance between quality and cost.
To get up and running quickly, define a single probe region that covers the whole world with a fixed resolution. This is practical in a small test scene, but could cause problems with a large world.
Region objects
Add a probeRegion element to the scene with a unique name attribute.
To construct a region of space, create an object of type IPrecompInputProbeRegion. You must specify the voxelSize parameter to set the maximum resolution (e.g. minimum spacing between probes.) Probes are placed automatically on a sparse voxel grid with this resolution. All probe regions in the scene must use the same voxel size.
Call AddVolume, AddPoints, AddBoxes to define the shape and resolution of the region. The resolution parameter defines the voxel resolutions at which probes are placed to cover the specified shapes. Repeat as many times as you need to build up a single region with a complex shape and to vary resolution in different parts of the region. Where two regions with different resolutions overlap, the higher resolution takes priority.
For example, assuming that your world units are centimeters, to construct a region for a city scene:
- specify voxelSize 200 for all probe regions in the scene,
- call AddBoxes with resolution FULL to define the shapes of building interiors,
- call AddVolume with a larger overlapping volume and resolution HALF to define the shape of exterior areas.
A set of probe regions with voxelSize 200 and resolution FULL result in the same placement of probes as the same regions with voxelSize 100 and resolution HALF.
Save the region object in the scene root folder with the same name as the probeRegion element, and the .ipr extension.
Region groups
Set the zone attribute to group probe regions into as few groups as possible. For a small world, use a single zone for all regions in the scene. If your world is split into chunks for streaming, use the zone attribute to group probe regions into a single zone for each chunk.
Where two zones overlap in space, duplicate probes may be created. Try to avoid significant overlap at the boundary between two zones.
The precompute produces a single probe octree for each zone, and automatically splits this octree into a number of probe sets.
A single zone which covers an extremely large area may cause the precompute to take a long time. To work around this issue, split the zone into more than one zone.
Grids and sets
There are two options for specifying the probe locations: the volume element, or the probeSet element.
To specify a regular grid of probes with a specific location, size and orientation, add a volume element. Add the size, position and basis elements to define the volume and the density of probes placed.
For more accurate probe lighting with regular grids, place volumes close together to completely cover the space that requires probe lighting.
To create a probe set to place probes at specific locations, write code to create an object of type IPrecompInputProbeSet. Save the object in the same directory as the .scene file and add a probeSet element with the same name.
Enlighten does not allow mixing probeRegion with either volume or probeSet in the same scene.
Radiosity parameters
To configure the probe data produced by the precompute, set the probesParamSet attribute to the name of a probesParameterSet element of the radiosity parameters.
All probe regions in the same zone must have the same probesParamSet.