使用 Occlusion Area 组件可以定义遮挡剔除系统中的视图体积。视图体积是摄像机可能处于运行时的场景区域。在烘焙时,Unity 在视图体积内生成更高精度的数据。在运行时,当摄像机位于视图体积内的时候,Unity 进行更高精度的计算。
如果尚未在场景中定义任何视图体积,Unity 将在烘焙时创建一个视图体积,其中包含标记为 Occluder Static 或 Occludee Static 的所有场景几何体。在大型或复杂场景中,这可能导致不必要的大量数据、漫长的烘焙时间以及资源密集的运行时计算。为了避免发生这种情况,请将遮挡区域 (Occlusion Areas) 放置在场景中,从而定义摄像机可能处于的区域的视图体积。
属性: | 功能: |
---|---|
Size | 设置遮挡区域 (Occlusion Area) 的大小。 |
Center | 设置遮挡区域 (Occlusion Area) 的中心。默认情况下,此设置为 0,0,0,位于盒体的中心。 |
Is View Volume | 如果启用此属性,遮挡区域 (Occlusion Area) 将定义视图体积。如果禁用此属性,遮挡区域 (Occlusion Area) 不会定义视图体积。必须启用此属性才能使遮挡区域 (Occlusion Area) 生效。 |
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.