Version: 2021.3
预计算的光照数据
光照数据资源

生成光照数据

在 Unity 中,预计算光照在后台作为自动过程生成或在用户手动启动时生成。在这些过程运行的同时,仍可以在 Editor 中继续工作。

The Editor follows different steps to calculate Enlighten Realtime Global Illumination and Baked Global Illumination. The progress bar displays information about the current process.

光照预计算的阶段如下:

Enlighten Realtime Global Illumination

  1. 创建几何体 (Create Geometry)
  2. 布局系统 (Layout Systems)
  3. 创建系统 (Create Systems)
  4. 创建图集 (Create Atlas)
  5. 聚类(Clustering)
  6. 可见性 (Visibility)
  7. 光线传输 (Light Transport)
  8. 四面体化探针 (Tetrahedralize Probes)
  9. 创建探针集 (Create ProbeSet)

Probes

  1. 环境探针 (Ambient Probes)
  2. 烘焙/实时参考探针 (Baked/Realtime Ref. Probes)

Enlighten Baked Global Illumination

  1. 创建几何体 (Create Geometry)
  2. 镶嵌 (Atlassing)
  3. 创建烘焙系统 (Create Baked Systems)
  4. 烘焙资源 (Baked Resources)
  5. 烘焙 AO (Bake AO)
  6. 导出烘焙纹理 (Export Baked Texture)
  7. 烘焙可见性 (Bake Visibility)
  8. 烘焙直接光照 (Bake Direct)
  9. 环境光和发光 (Ambient and Emissive)
  10. 创建烘焙系统 (Create Bake Systems)
  11. 烘焙运行时 (Bake Runtime)
  12. 上采样可见性 (Upsampling Visibility)
  13. 烘焙间接光照 (Bake Indirect)
  14. 最终收集 (Final Gather)
  15. 烘焙探针集 (Bake ProbesSet)
  16. 合成 (Compositing)

生成数据

Unity’s precomputed lighting solutions only consider static geometry. To begin the lighting precompute process, you need at least one Static GameObject in your Scene.

When you manually initiate a precompute, the Unity Editor evaluates and computes all aspects of your Scene lighting. To recalculate and bake only Reflection Probes, select the Generate Lighting option Reflection Probes Lighting Window.

Before you build

Before building your game, disable the Auto Generate option in the Lighting Window and generate the lighting data manually for all your Scenes, to ensure that you do not lose any lighting data.

When you deactivate Auto Generate and manually generate lighting for your Scene, Unity saves your lighting data as Asset files in your project directory. This ensures that the data you need is part of your build.

Auto-Generate is not recommended for multi-scene workflows.

预计算的光照数据
光照数据资源