[Unity]烘焙相关记录

2020/01 09 17:01

[Mixed Lighting]

1.Baked Indirect mode
间接烘焙模式
Mixed lights provide realtime direct light while indirect light is baked into lightmaps and light probes
它只烘焙间接光,其他的全部是实时的

2.Subtractive
Subtractive模式

((Subtractive is the only Mixed lighting mode that bakes direct lighting into the light map, and discards the information that Unity uses to composite dynamic and static shadows in other Mixed lighting modes. Because the Light is already baked into the lightmap
, Unity cannot perform any direct lighting calculations at run time.))
Subtractive只烘焙直接光到lightmap上,并丢弃其它混合模式下的动态和静态阴影信息,灯光已经烘焙到光照贴图中了,也无法在运行中进行直接光照计算
((Mixed lights provide baked direct and indirect lighting for static objects. dynamic objects receive realtime direct lighting and cast shadows on static objects using the main direction light in the scene。))

静态对象完全不显示混合光中的任何镜面反射或光泽高光,也不能从动态GameObjects接收任何阴影,除了主要的直接光。
动态GameObjects接收实时光照,并支持光泽反射。但只能通过LightProbes从静态GameObjects接收阴影。

一个例子是构建一个带有外部关卡且动态游戏对象很少即卡通风格游戏时。

Substractive模式的性能要求使其成为构建低端移动设备的不错选择
优点:
a.它在光照图中的静态GameObjects之间提供了高质量的阴影,而没有其他性能要求。
b.着色器中的一项Texture操作可处理静态GameObjects之间的所有光照和阴影。
c.提供间接照明。
缺点:
a.它不提供实时直接照明,因此不提供镜面照明。
b.除了一个定向光源(主光源)以外,它不为静态GameObject提供动态阴影。
c.只能通过光探测器提供从静态游戏对象到动态游戏对象的低分辨率阴影。
d.提供了不精确的动态和静态阴影组合。
e.增加了lightmapp纹理的内存需求

5.x中买是的Geomerics公司的Enlighten(启发式)
5.6之后是Progressive(渐进式)

Lightmapping Settings:

Lightmapper
1.Progressive GPU Lightmapper(Preview)
预览版本,比CPU版本更快