This page has been translated automatically.
视频教程
界面
要领
高级
实用建议
基础
专业(SIM)
UnigineEditor
界面概述
资源工作流程
版本控制
设置和首选项
项目开发
调整节点参数
Setting Up Materials
设置属性
照明
Sandworm
使用编辑器工具执行特定任务
如何擴展編輯器功能
嵌入式节点类型
Nodes
Objects
Effects
Decals
光源
Geodetics
Sound Objects
Pathfinding Objects
Players
编程
基本原理
搭建开发环境
使用范例
C++
C#
UnigineScript
统一的Unigine着色器语言 UUSL (Unified UNIGINE Shader Language)
Plugins
File Formats
材质和着色器
Rebuilding the Engine Tools
GUI
双精度坐标
应用程序接口
Animations-Related Classes
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
VR-Related Classes
创建内容
内容优化
材质
Material Nodes Library
Miscellaneous
Input
Math
Matrix
Textures
Art Samples
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Occluder Mesh

Occluder Mesh is an occluder which is based on an arbitrary mesh. Occluder Mesh is used to cull objects' surfaces, bounds of which are not visible behind it. The surfaces behind the occluder are not sent to the GPU, thereby saving performance.Occluder Mesh是基于任意网格的遮挡物。 Occluder Mesh用于剔除对象的表面,其后部的边界不可见。封堵器后面的表面不会发送到GPU,从而节省了性能。

注意
  • If any part of the bound of the object's surface is visible behind the occluder, the surface will not be culled.如果在遮挡物后面可以看到对象表面边界的任何部分,则该表面将不会被剔除。
  • By default, shadows from the occluded objects remain visible. To disable shadows rendering, run the console command render_occluders_shadows 1.默认情况下,被遮挡对象的阴影保持可见。要禁用阴影渲染,请运行控制台命令render_occluders_shadows 1

See also
也可以看看#

  • General information on Occluder有关Occluder的一般信息
  • The WorldOccluderMesh class to manage mesh occluders via APIWorldOccluderMesh类,用于通过API管理网格遮挡物
  • The sample <UnigineSDK>/data/samples/worlds/occluder_01样本<UnigineSDK>/data/samples/worlds/occluder_01

Creating Occluder Mesh
创建遮挡物网格#

Before adding Occluder Mesh to a scene, you should prepare a mesh, on which this Occluder Mesh will be based. Such mesh is created separately and should be as simple as possible: it should contain the minimum number of polygons.在将Occluder Mesh添加到场景之前,您应该准备一个网格,该Occluder Mesh将基于该网格。此类网格是单独创建的,并且应尽可能简单:它应包含最少数量的多边形。

When the mesh is prepared, you can add Occluder Mesh to the scene via UnigineEditor:准备好网格物体后,可以通过UnigineEditor将Occluder Mesh添加到场景中:

  1. Run the project with UnigineEditor.跑步UnigineEditor的项目。
  2. On the Menu bar, click Create -> Optimization -> Occluder Mesh.在菜单栏上,单击Create -> Optimization -> Occluder Mesh

  3. In the file dialog window, choose a mesh (*.mesh), on which the occluder will be based.在文件对话框窗口中,选择遮挡物将基于的网格(*.mesh)。
  4. Place the Occluder Mesh in the world and specify the required parameters for it.Occluder Mesh放置在世界上,为其指定所需的参数
注意
To display the buffer that is used for occluders rendered in the viewport, pass 1 to the render_show_occluder console command.显示缓冲用于在视口中渲染的遮挡物,请将1传递给render_show_occluder控制台命令。

Example
例子#

For example, if you have a building that occludes some objects' surfaces, you should prepare a simplified mesh to be used as a base for the Occluder Mesh instead of using the detailed mesh.例如,如果您的建筑物遮挡了某些对象的表面,则应准备一个简化的网格作为Occluder Mesh的基础,而不要使用详细的网格。

Mesh that represents a building and contains a lot of details代表建筑物并包含许多细节的网格
Occluder that is based on the simplified mesh and is rendered into a separate buffer with a low resolution基于简化网格的Occluder并渲染到低分辨率的单独缓冲区中

Editing Occluder Mesh
编辑遮挡物网格#

In the Node tab of the Parameters window, you can adjust the following parameters of Occluder Mesh:Parameters窗口的Node选项卡中,可以调整Occluder Mesh的以下参数:

Distance

Distance between the camera and the bounding box of the occluder, exceeding which the Occluder Mesh becomes disabled.相机与遮挡物边界框之间的距离,超过该距离将禁用Occluder Mesh

For example, you should disable the occluder at a certain distance if it stops hiding the objects and their surfaces, in order to increase performance.例如,如果阻塞器停止隐藏对象及其表面,则应在一定距离处禁用它,以提高性能。

By default, the inf value is used.默认情况下,使用inf值。

Loading a New Mesh
加载新的网格#

To load a new mesh on which Occluder Mesh will be based:要加载将基于Occluder Mesh的新网格,请执行以下操作:

  1. In the World Occluder Mesh section of the Node tab, press .Node选项卡的World Occluder Mesh部分中,按
  2. In the file dialog window that opens, choose the required mesh and press OK.在打开的文件对话框窗口中,选择所需的网格,然后按OK

Saving the Current Mesh
保存当前网格#

To save the current mesh on which the occluder is based:要保存封堵器所基于的当前网格,请执行以下操作:

  1. In the World Occluder Mesh section of the Node tab, press .Node选项卡的World Occluder Mesh部分中,按
  2. In the file dialog window that opens, specify a name for the mesh and press OK.在打开的文件对话框窗口中,为网格指定名称,然后按OK
最新更新: 2024-04-19
Build: ()