Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 1.58 KB

lightmapping.md

File metadata and controls

21 lines (13 loc) · 1.58 KB

Lightmapping

Baking Lightmaps in Flax

Flax supports baking lightmap textures using a custom algorithm that runs fully on a GPU. In this way, it is highly efficient and does not stall your computer during baking.

During Global Illumination baking, all the static scene geometry and lights are processed to estimate the light transfer through the scene. The light emitted by the lights and emissive objects are bouncing though the scene as in the real world. GI baking calculates the final light passing to every lightmap texel and uses this information later to apply the indirect lighting into the scene rendering.

How to use it

To bake the lighting in your scene simply:

  • ensure that objects and lights for baking are marked with the Lightmap static flag
  • ensure that your models have valid lightmap UVs (the engine warns if the object has missing UVs)
  • adjust the scene lightmap options
  • use Tools -> Bake Lightmaps from the main menu

Lightmap baking uses the GPU and can take from few seconds up to several hours depending on the scene size. The lightmap output textures are always located in the Scene Data folder.

In case of a crash, the baking tool creates a progress snapshot every 5 minutes. If the engine crashes during baking (eg. due to GPU driver hang) you can reopen the project and the editor will ask if you want to restore the baking process and continue from the last snapshot. This can help reduce stress and problems when encountering problems with GPU stability.