Light Probes

LightProbes (probe light, a light detector?) Provides a method for capturing and using through the empty space in the scene information light (light) of .

And light textures similar to ( lightmaps ), Light Probes also stores "baked" information about the scene illumination (Lighting) a. The difference is: lightmaps is stored scene light exposure surface (Surfaces) the lighting information, and the information is stored in light probes scene light through the empty space.

NOTE: Graphics mentioned "Bake" or "Baked" or "baking" generally refers to the scene lighting information stored in advance to the texture, when rendering the future, using these textures to achieve "light" effect.

An extremely simple scene showing light probes placed around two cubes
The figure shows a scenario with only two Cubes, Cubes rotated around two to put some light probes (FIG yellow pellets).

Light Probes There are two main purposes:

  • The primary purpose is to provide high quality illumination for the object motion in the scene (moving objects) (including optical, indirect bounced light reflected indirect)
  • Secondary use is for the use of the Unity LOD system provides a static scene lighting information.

Note: LOD That Level of Detail, when the scene GameObject Camera from very far, many details have been unable to see, and then you can use the LOD rendering optimization, reducing Mesh of triangles that is, when the GameObject GameObject very far away from the Camera the number of pieces.

Light Probe Groups

Light Probes In order to put the scene must be used with a Light Group the Probe the GameObject assembly. Through a menu: the Component> Rendering> Light Probe Group add Light Probe Group assembly.

But a better approach is to create a new empty GameObject in the scene (the menu: the GameObject> the Create Empty ), and then add to the Light Probe Group assembly thereon. This can reduce the possibility of accidental deletion of the component.

The Light Probe Group component
Light Probe Group is the assembly of FIG.

Attributes Features
Edit Light Probes Click this button, you can edit the Light Probe Group. Such that Unity will only move and edit LightProbes. It is one thing to Distable finished editing the button.
Show Wireframe When this option is turned on, Unity display line (Wireframe) Light Probes connected in scene view. When closed, only the representative point of Light Probe (Points)
Remove Ringing When this option to open an account, Unity automatically remove Light Probe ringing scene (see below)
Selected Probe Postion This is a read-only items. Light Probe display of the selected x, y and z sat
Add Probe Click button to add a Light Probe Light Probe in Group
Select All Check this Light Probe Group all Light Probes
Delete Selected Delete selected from Light Probe Group in Light Probes
Duplicate Selected 复制选中的Light Probes

Ringing

"Ringing"是light probes在某些环境下表现出来的不想要的行为。这经常发生在Light Probe周围光照有显著差异时。例如,若在一个Light Probe的一面有明亮光(bright light),在另一面没有光(no light),则在光强就会在背面“超调”(overshoot),会在背面(本来是没光的)形成“光斑”(light spot)。

下图是一个Light Probe ringing的例子:

Example of Light Probe ringing

有几个方法可以解决"ringing":

  1. 在Light Probe Group组件中,开启Remove Ringing。Unity会自动移除不想要的光斑。然而,这通常会造成Light Probes准确性下降,减少光的差异(reduces light contrast,应该是降低了不同的光之间的差异)。
  2. 放置一些游戏障碍物,使得玩家无法到达能看到光斑的位置。
  3. 避免baking有向光(direct light,或者叫平行光)到Light Probes中。Direct light倾向于有明显的不连续性(sharp discontinuities)(如,阴影边),这使得它不适合用于Light Probes。仅烘焙间接光(indirect light)时,使用Mixed lighting。对于动态(dynamic)GameObjects 应该使用Realtime GI而不是Light Probes。

Placing Light Probes

在编辑一个Light Probe Group时,你可以用类似处理GameObjects的方式处理单个的Light Probes。然而,Light Probes不是GameObjects,它们是Light Probe Group组件中的一组点(points)。

当开始编辑一个新的Light Probe Group时,会有8个默认的light probes,排放在立方体的8个顶点上,如下图所示:
The default arrangement of Light Probes

你可以使用 Light Probe Group inspector面板上的Add Probe控件添加 新的Light Probe。Light Probes在场景中呈现为黄色的小球,可以移动它们(就像移动GameObjects一样)。

Choosing Light Probe positions

Lightmaps在对象表面上具有连续的分辨率(resolution)(大概就是分布密度吧?)。与Lightmaps不同,LightProbes的信息分布情况可能是不连续的,这取决于你放置的Light Probes的位置的紧凑程度。

为了优化Light Probes存储的数据量和游戏运行时的计算量,你通常应该尽量减少使用的Light Probes的数量。然而,你又应该放置“足够多”的Light Probes,使得从一个空间到另一个空间的光照变化能够被记录一来,并且达到你要的要求。这意味着你可能需要在光线复杂,光照差异明显的地方多放置点Light Probes(即,在这种光线复杂的环境,应该以更紧凑的方式放置Light Probes)。在光照变化不大的地方,以更分散的方式放置Light probes。

Light Probes placed with varying density around a simple Scene

如上图,建筑(房屋等)附近及之间放置的Probes比较密集,而在马路上就比较稀疏。

The simplest way is to place a three-dimensional grid is placed in a uniform manner Light Probes (eg, put them in the vertices of the mesh). This way is very simple, fast, but they consume too much, unnecessary storage space. In above figure, along the road, little change in illumination, a plurality of adjacent identical Light Probes illumination data will be stored (lighting data). In this case, as the figure above, lighting data by an interpolation process on a small, spread out of the light probes.

reference:

  1. Light Probes
  2. Light Probe Groups

I know almost starting in column: https://zhuanlan.zhihu.com/p/70298213

Guess you like

Origin www.cnblogs.com/leixinyue/p/11069657.html