Version: 2017.2
渲染路径
DirectX 11 和 OpenGL Core

细节级别 (LOD)

When a GameObject in the scene is a long way from the camera, the amount of detail that can be seen on it is greatly reduced. However, the same number of triangles will be used to render the object, even though the detail will not be noticed. An optimisation technique called Level Of Detail (LOD) rendering allows you to reduce the number of triangles rendered for an object as its distance from camera increases. As long as your objects aren’t all close to the camera at the same time, LOD will reduce the load on the hardware and improve rendering performance.

在 Unity 中,可使用 LOD Group 组件为对象设置 LOD 渲染。组件参考页面提供了完整详解,但下图显示了用于渲染对象的 LOD 级别如何随着对象与摄像机的距离的变化而变化。第一张图显示的是 LOD 级别 0(细节化程度最高)。请注意网格中大量的小三角形:

摄像机处于 LOD 0
摄像机处于 LOD 0

第二张图显示了对象距离变远时使用的较低级别的细节模型。请注意,网格的细节程度已降低(三角形更大,数量更少):

摄像机处于 LOD 1
摄像机处于 LOD 1

由于 LOD 级别的设置在某种程度上取决于目标平台和可用的渲染性能,因此 Unity 允许您在质量设置 (Quality Settings) 中设置最高 LOD 级别和 LOD 偏差偏好(即,处于阈值距离时提高还是降低 LOD 级别)。

导入对象时的 LOD 命名规则

如果创建一组名称以 _LOD0、_LOD1、_LOD2 等结尾的网格,结尾数字对应于所需的 LOD 级别,在将这些模型导入时,系统将自动创建并将其设置为对象的 LOD 组。例如,如果网格的基本名称是 Player_,则可以创建名为 Player_LOD0、Player_LOD1Player_LOD2 的文件,以生成具有三个 LOD 级别的对象。编号规则为 LOD 0 是细节程度最高的模型,而数字越大,对应的细节程度越低。

渲染路径
DirectX 11 和 OpenGL Core
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961