环境光遮挡 (Ambient occlusion, AO) 可估算环境光照(不是来自特定方向的光照)照射到表面上某一点的光照的情况。它使彼此接近的折痕、孔和表面变暗。这些区域将遮挡(阻挡)环境光,因此它们看起来较暗。
仅使用预计算实时 GI 时(请参阅有关使用预计算光照的文档),间接光照的部分不会捕获精细细节或动态对象。我们建议使用实时环境光遮挡后期效果,它具有更多细节,可以生成更高质量的光照。
要查看和启用烘焙 AO,请打开 Lighting 窗口(菜单:__Window__ > Rendering > Lighting Settings__),然后找到 Baked GI__ 部分。勾选 Baked GI 复选框(如果未选中),然后勾选 Ambient Occlusion 复选框以启用烘焙 AO。
要查看和启用烘焙 AO,请打开 Lighting 窗口(菜单:__Window__ > Rendering > Lighting Settings__),然后导航到 Mixed Lighting__ 部分。勾选 Baked Global Illumination 复选框(如果未选中),然后在 Lightmapping Settings 中勾选 Ambient Occlusion 复选框以启用烘焙 AO。
属性 | 功能 |
---|---|
Max Distance | 使用此属性可设置光线在终止前被跟踪的距离值。 |
Indirect | 使用此属性可控制 AO 对间接光的影响程度。滑动条值设置得越高,折痕、孔和近表面被间接光照射时的外观就越暗。 更加逼真的做法是仅将 AO 应用于间接光照。 |
Direct | 使用此属性可控制 AO 对直射光的影响程度。滑动条值设置得越高,场景的折痕、孔和近表面被直射光照射时的外观就越暗。 默认情况下,AO 不会影响直接光照。使用此滑动条即可启用这一属性。该特效不真实,但可用于艺术效果。 |
有关实时环境光遮挡的最新实现方式,请参阅有关环境光遮挡后期处理效果的文档。
要更详细了解 AO,请参阅 Wikipedia:环境光遮挡 (Ambient Occlusion)。
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.