This is the documentation for Enlighten.
Simplified UVs with a target mesh
It's sometimes difficult to manually unwrap simplified lightmap UVs for a mesh with many small geometric details. Enlighten mesh projection provides an alternative way to generate lightmap UVs using a dedicated target mesh. With this technique, you create a simplified proxy mesh that approximates the original. Enlighten generates lightmap UVs by projecting the original mesh onto the proxy target mesh.
Target meshes are never drawn, and their associated mesh data isn't used in game mode.
Target meshes can be an effective way to generate simplified lightmap UVs for use with Enlighten. However, modeling target meshes requires some practice.
When to use a target mesh
You should only use target meshes when all of the following are true:
- The mesh is large enough that it's not a good candidate for sharing a lightmap with other nearby meshes.
- The mesh can't be lit efficiently using probes.
- The Auto UV algorithm produces poor lightmap UVs for the mesh.
- It's difficult to manually unwrap the UVs because the mesh is complex.
Give your mesh a target
To add a dedicated target mesh to your static mesh asset:
- In your modeling software, give the target mesh the same name as the render mesh with the prefix ENL_ (eg ENL_RenderMeshName). This is similar to the workflow for UE4 collision (UE4 Documentation).
- Export the FBX and import it into UE4 in the usual way.
- Open the mesh in the Static Mesh Editor. It's displayed as the Enlighten Target in the list of mesh LODs.
Good target meshes
A good target mesh is one for which mesh projection produces efficient lightmap UVs for the projected meshes.
For complete control, you can manually author a lightmap UV channel for the target mesh. See Lightmap UVs for details of how to set this up.
The target mesh can be much simpler than the original detail mesh. Details that protrude from the mesh can be reduced to a simple smooth surface:
After you import the mesh into Unreal, to see the UV, open the mesh in the Static Mesh Editor and click the Charts button.
Iterate on the target mesh until you get a good result.