Baked Indirect 模式是由场景中所有__混合光源__共用的一种光照模式。要将 Mixed lighting 设置为 Baked Indirect__,请打开 Lighting 窗口(菜单:__Window > Rendering > Lighting Settings__),单击 Scene__ 选项卡,导航至 Mixed Lighting__,然后将 Lighting Mode__ 设置为 Baked Indirect。请参阅混合光照相关文档以了解有关此光照模式的更多信息,并参阅光照模式相关文档以了解有关其他可用模式的更多信息。
对于设置为 Baked Indirect 模式的光源,Unity 仅预先计算间接光照,不执行阴影预计算。阴影在__阴影距离 (Shadow Distance)(菜单:__Edit > Settings__,然后选择 Quality__ 类别,并导航到 Shadows 部分)内是完全实时的。换句话说,__Baked Indirect__ 光照行为类似于带有额外间接光照但超出__阴影距离__后没有阴影的实时光源。您可以使用后期处理雾效之类的效果来遮挡超过该距离的缺失阴影。
适合使用 Baked Indirect 模式的一个很好的例子是,您想要在与走廊相连的房间内构建一个室内射击游戏或冒险游戏。此情况下的观察距离是有限的,因此可见的一切对象通常都应该在__阴影距离__内。此模式对于构建有雾的室外场景也很有用,因为您可以使用雾来隐藏远处缺失的阴影。
下表显示了使用 Baked Indirect 模式时静态和动态游戏对象如何投射和接受阴影:
动态阴影接受者 从另一个静态或动态游戏对象接受阴影的动态游戏对象 |
静态阴影接受者 从另一个静态或动态游戏对象接受阴影的静态游戏对象 |
|||
---|---|---|---|---|
在阴影距离内 | 超出阴影距离 | 在阴影距离内 | 超出阴影距离 | |
动态阴影投射物 投射阴影的动态游戏对象 |
阴影贴图 | - | 阴影贴图 | - |
静态阴影投射物 投射阴影的静态游戏对象 |
阴影贴图 | - | 阴影贴图 | - |
鉴于 Baked Indirect 模式的性能要求,该模式非常适合以中端 PC 和高端移动设备为目标的构建。Baked Indirect 模式最主要的优缺点如下:
2017–06–08 页面已发布
在 5.6 版中添加了“光照模式”
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.