本页面提供关于如何将光照烘焙到采用 Unity LOD(细节级别)系统的模型上的相关建议。
在支持烘焙光照的场景中使用 Unity 的 LOD 系统时,该系统会将细节级别组 (LOD Group) 中细节级别最高的模型按照普通静态模型的方式照亮。系统采用光照贴图来进行直接光照和间接光照,并对实时全局光照采用不同的光照贴图。
使用 Enlighten 光照贴图时,系统只烘焙直接光照,而 LOD 系统依靠光照探针对间接光照进行采样。
要确保 LOD 较低的模型在烘焙光源下看起来正确无误,必须将光照探针置于模型周围,从而在烘焙过程中捕捉间接光照。否则,LOD 较低的模型就只接受直射光,显得不真实:
要正确设置烘焙光照的 LOD 模型,应将 LOD 游戏对象标记为 Contribute GI。为此,请选择游戏对象,然后在 Inspector 窗口顶部选择 Static 复选框旁边的下拉菜单:
使用光照探针组件将光照探针置于 LOD 游戏对象周围。
注意:只有细节级别最高的模型会影响周围几何体的光照(比如,周围建筑的阴影或者反射光)。大部分情况下,这应该不是问题,因为较低细节级别的模型与最高细节级别的模型应该是高度相似的。
使用 __Progressive Lightmapper(渐进光照贴图)__时,无需在 LOD 组周围放置光照探针来产生烘焙的间接光照。但是,要让实时全局光照影响 LOD 组中的渲染器,就必须使用光照探针。
2017–10–20 页面已修订
5.6 版更新
2017.3 版更新
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.