Software:
Unreal Engine 4.25
The Static Lighting calculation in UE4 is performed by the Lightmass module (UE4’s integrated GI* engine), and the result of this calculation is stored in each object’s Lightmap, an extra texture map used for storing static light and shadow information.
This post provides a list of useful tips and techniques for improving your UE4 scene setup for an efficient light calculation.
Notes:
- The following tips are aimed at achieving a good lighting calculation/solution but they don’t include optimization methods for high performance projects.
Namely, we don’t get into manual Lightmap UV optimizations here. - The following tips don’t take into account the now real-time ray-tracing options that have become available with Nvidia Geforce RTX / DirectX DXR.
Scene Setup:
- Delete unseen polygons from your mesh, so they wont waste Lightmap resolution.
* For example, in an interior Archviz project, delete the outer polygons of the walls. - Set the architectural surfaces to cast shadows from both sides:
Details > Lighting > Shadow Two Sided
- Place “light blockers” around the structure to avoid light licks.
* Wrap the structure on all sides with scaled cubes that have an absolute black material:
- Set the “light blockers” to be invisible in rendering:
- Scale the Lightmass Importance Volume fit around the structure tightly.
Lightmap Resolution:
- Optimize the architectural surfaces (static meshes) Light map resolution.
A higher resolution will allow the Light Map to store more detailed lighting.
The Static Mesh resolution setting is found in:
Static Mesh Edior > Details > General Settings > Light Map Resolution:
* This setting can also be overriden at the actor settings by selecting the actor in the map/level and activating:
Details > Lighting > Override Lightmap Res
- Use the Lightmap Density optimization display mode to inspect the actual Lightmap texel density.
The Lightmap Density display mode also color codes the display to indicate the efficiency of the Lightmap resolution per object (green color being optimal, and warm colors being too dense)
* Note that in many cases of Archviz you may want a higher density than the editor displays as optimal.
Lighmass Settings:
The Lightmass setting are found in:
World Settings > Lightmass
- Decrease the Volumetric Lightmap Detail Cell Size to increase the light calculation accuracy:
* This will increase the calculation time
- Decrease the Indirect Lighting smoothness to get more detailed shadows:
- Disable Compress Lightmaps to avoid banding artifacts in the shadow gradient:
- Use the Lighting Only display mode to evaluate the lighting solution:
- For final quality, set the Light Quality to Production:
Build menu > Lighting Quality > Production
* GI – “Global Illumination” is a term referring to indirect light simulation, namely a calculation of how light reflects and bounces between surfaces.
Related posts:
5 thoughts on “UE4 – Lighting calculation tips for Archviz”