This page has been translated automatically.
UnigineScript
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Внимание! Эта версия документация УСТАРЕЛА, поскольку относится к более ранней версии SDK! Пожалуйста, переключитесь на самую актуальную документацию для последней версии SDK.
Внимание! Эта версия документации описывает устаревшую версию SDK, которая больше не поддерживается! Пожалуйста, обновитесь до последней версии SDK.

Occluder Mesh

An occluder mesh is an occluder which is based on an arbitrary mesh. The 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.

Notice
If any part of the bound of the object's surface is visible behind the occluder, the surface will not be culled.

See also

  • General information on occluders
  • A WorldOccluderMesh class to edit mesh occluders via UnigineScript
  • A data/samples/worlds/occluder_01 sample

Creating Occluder Mesh

Before adding an 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.

When the mesh is prepared, you can add the occluder mesh to the scene via UnigineEditor:

  1. Run UnigineEditor.
  2. On the Menu bar, click Create -> Worlds -> Occluder Mesh.

  3. In the file dialog window, choose a mesh (*.mesh) on which the occluder will be based.
  4. Place the occluder mesh in the world and specify the required parameters for it.

Notice
To display the buffer that is used for occluders displayed in the viewport, pass 1 to the render_show_occluder console command.

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.

The mesh that represents the building and contains a lot of details
The occluder that is based on the simplified mesh and is rendered into the separate buffer in the low resolution

Editing Occluder Mesh

On the Occluder tab of the Nodes panel, you can adjust the following parameters of the occluder mesh:

Distance Distance between the camera and the bounding box of the occluder, at which the occluder mesh becomes disabled. 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.

Loading a New Mesh

To load a new mesh on which the occluder will be based:

  1. On the Occluder tab, press .
  2. In the file dialog window that opens, choose the required mesh and press Ok.

Saving the Current Mesh

To save the current mesh on which the occluder is based:

  1. On the Occluder tab, press .
  2. In the file dialog window that opens, specify a name for the mesh and press Ok.
Last update: 03.07.2017
Build: ()