This is the documentation for Enlighten.
Shared lightmaps
You can reduce the number of pixels in a lightmap by having two or more static meshes share the same area of the lightmap. This is done through mesh projection. One of the meshes is designated as the target and the other the projected mesh.
For the target mesh, Enlighten creates lightmap UVs in the usual way. The target mesh is always included in the radiosity computation (see How actors interact with Enlighten).
For the projected mesh, Enlighten creates lightmap UVs by projecting its vertices (mesh projection) onto the surface of the target mesh. The projected mesh is excluded and has no effect on the indirect lighting result.
You can do this for any actor which uses a static mesh asset, including foliage and spline meshes.
Meshes in close proximity
A small mesh can share the lightmap of a nearby larger mesh. This is perfect for:
flat objects attached to surfaces, such as decals or posters
- small objects, such as debris
- grass and roads on terrain
For best results when sharing a lightmap, the entirety of the mesh should extend less than one lightmap pixel's width from the surface.Â
Enlighten automatically shares lightmaps between certain kinds of meshes. By default, Instanced Foliage shares the lightmap of the surface onto which you place it. Landscape Grass always shares the lightmap of the Landscape.
Share lightmaps
To share a lightmap between meshes:
- Select the smaller mesh.
- Under Details, under Enlighten, set the Lighting Mode to Detail.
Enlighten automatically chooses which nearby lightmap to share with this mesh by using mesh projection.
With the Lightmap Charts visualization, you can see that the mesh shares its lightmap with another mesh.
When you move a mesh with Detail lighting mode, the lightmap UVs update automatically to match the position.
Before moving mesh | After |
---|---|
Mesh LOD
Each static mesh asset may contain multiple level of detail (LOD) versions of the mesh containing different numbers of triangles. Enlighten doesn't generate separate lightmaps for each LOD. Instead, all LODs share the same lightmap space.
In the Static Mesh Editor, you can choose to use a specific LOD as the target mesh with the Enlighten Target Lod property. When the Enlighten Target Lod is -1, Enlighten chooses the target LOD automatically.
Use a target mesh to produce lightmap UVs
For meshes with a complex topology, it's sometimes difficult to produce efficient lightmap UVs either automatically or manually. For these meshes, you may find it easier to produce lightmap UVs using a simplified target mesh proxy. For more information, see Simplified UVs with a target mesh.
Â