The baking system is the process of finally generating light maps and applying them in the scene by calculating the influence of all light sources on the object in the engine scene. The purpose of this system is to reduce the calculation of real-time light sources, thereby improving the efficiency of the scene.
Three steps are required to turn on the baking system:
Click the menu button in the top menu bar
Project (Project), click the
Lightmap (light map)button in the pop-up menu bar to pop up the lightmap panel.
Before baking, you need to set the
Bakeableproperty of the light source component to
truein the editor,
Note: currently only one main direction light source is supported.
- In the lightmap panel that pops up, after setting the corresponding parameters, click the
Lightmap Generatebutton and select the corresponding storage folder to generate the lightmap
Note: the storage folder must be under Effective Assets.
During the process of generating baked maps, there will be a generated progress prompt. After the generation, you can view it in the ->
Baked tab in the
Baked result (baked result display panel) shows the lightmap texture after baking,
Lightmap clear (clear button) can delete the generated result of baking, and
information output panel shows the information of each baked image (file name) ,
Note: Only terrain lightmap is supported in v1.1, and the lightmap of the model is also supported after v1.1.1 version, but before the lightmap is enabled, the model needs to include two sets of uv, the second set of uv is used to access the lightmap, and Materials also need to check the lightmap option to apply the shadow information after the model is baked.
The baking process is to calculate the generated results according to the parameters set on the panel, as shown below:
The following table describes the specific meaning of each parameter.
|Multisampling: Has the following values (1, 2, 4, 8)
|Baking map size: has the following values (128, 256, 512, 1024, 2048)
|Gamma correction value
|Global illumination scaling factor
|Global illumination sampling coefficient