Occluder

An occluder is a type of Object that allows you to connect a Mesh that acts as an invisible to occluded other object (s).

When a RenderLayer have updated the list of all visible geometry it will draw all existing occluders and run occlusion queries on GPU to determine which objects are still visible.

Occluders can be placed and manipulated just like regular drawable objects; at the exception that they will only contribute to determining which object they occlude.

In example; if you are outside of a room you can have a Mesh that is built as a rough representation of the walls and set it as an Occluder. As a result, none of the objects contained in that room will be sent on GPU as long as you are outside of the room. Only if you enter the room the objects contained in it will become visible.

It is common to use the same Mesh as the one you are using as collision map as an Occluder to quickly eliminate objects that are hidden from walls, floors, and ceilings, but more dynamic and elaborated scenarios can be implemented easily (ie: a sliding door using a single quad coupled with a Region and an Action).

See Also

Static Variables


Name Description
object Parent Object where the Occluder structure is maintained.
mesh Current Mesh Asset connected to the active Occluder.

Variables


Name Description
double_sided Force the Mesh connected to the Occluder to be rendered with cull face off.

Functions


Name Description
SetMesh Connect or disconnect a Mesh to the active Occluder.

Events


Events available when an Object is a Occluder.

Callbacks Description
OnDraw This event is triggered just before the Occluder is ready to draw.
OnDisplay Triggered right after the Occluder draw calls have been sent to the GPU.




NRG - API 2022.3.383570 - Thu Jul 28 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA