Version: 2019.3
Scene 视图中的 GI 可视化
光照贴图定向模式

光照数据资源

在 Unity 5.3 中,“光照贴图快照”(Lightmap Snapshot) 已更名为“光照数据资源”(Lighting Data Asset)。

在 Lighting 窗口中按 Build 按钮即可生成光照数据资源。重新加载场景时,将从该资源中加载光照。

The Lighting Data Asset contains the GI data and all the supporting files needed when creating the lighting for a scene. The asset references the renderers, the realtime lightmaps, the baked lightmaps, light probes, reflection probes and some additional data that describes how they fit together. This also includes all the Enlighten data needed to update the realtime global illumination in the Player. The asset is an Editor only construct so far, so you can’t access it in the player. When you change the scene, for instance by breaking a prefab connection on a GameObject that is marked as Contribute GI, the asset data will get out of date and has to be rebuilt.

目前,这个文件有点臃肿,因为它包含多个平台的数据;我们将解决这一问题。我们也在考虑对这些数据进行一定程度的压缩。

在光照构建过程中生成但生成播放器构建时不需要的中间文件不属于资源的一部分,因此存储在 GI 缓存中。

光照数据资源的构建时间可能有所不同。如果您的 GI 缓存已填满,例如,您之前在机器上进行了烘焙(场景处于最新状态),则构建速度会很快。如果将场景拉到空缓存的计算机或由于缓存大小限制而删除了所需的缓存数据,则必须首先使用中间文件填充缓存,而这需要运行预计算和烘焙过程。这些步骤可能会消耗一些时间。

Scene 视图中的 GI 可视化
光照贴图定向模式