OccluderInstance3D
An Entity placing an Occluder3D resource for occlusion culling.
Places the assigned Occluder3D resource in the 3D hierarchy. The occlusion system uses this geometry to determine objects hidden from the camera; the Entity does not replace a visible model or physics collision.
Enable rendering/occlusion_culling/use_occlusion_culling and assign an Occluder resource. Then inspect the result with a camera and objects behind the occluder. An OccluderInstance3D in the tree alone does not establish working culling or a performance improvement.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OccluderInstance3DConstructor
public OccluderInstance3D();Properties3
BakeMaskProperty
public uint BakeMask { get; set; }Visual-layer mask for geometry gathered during occluder baking. Not a physics CollisionMask or runtime-culling switch. The example assigns QuadOccluder3D directly without editor baking.
BakeSimplificationDistanceProperty
public float BakeSimplificationDistance { get; set; }Geometry simplification parameter for baking, not the camera distance at which an object becomes hidden. Inspect baked doorways/thin walls; bake UI and simplification quality are outside this runtime example.
OccluderProperty
public Occluder3D Occluder { get; set; }Occlusion-culling geometry resource. Not itself a visible wall or physics body. Match real opaque geometry: an oversized occluder or one left after wall removal can hide an otherwise visible object.
Methods8
GetBakeMaskuint
public uint GetBakeMask();uintGetBakeMaskValuebool
public bool GetBakeMaskValue(int layerNumber);Returns whether or not the specified layer of the OccluderInstance3D.BakeMask is enabled, given a layer_number between 1 and 32.
| Name | Type | Default |
|---|---|---|
layerNumber | int | — |
boolGetBakeSimplificationDistancefloat
public float GetBakeSimplificationDistance();floatGetOccluderOccluder3D
public Occluder3D GetOccluder();Occluder3DSetBakeMaskvoid
public void SetBakeMask(uint mask);| Name | Type | Default |
|---|---|---|
mask | uint | — |
SetBakeMaskValuevoid
public void SetBakeMaskValue(int layerNumber, bool value);Based on value, enables or disables the specified layer in the OccluderInstance3D.BakeMask, given a layer_number between 1 and 32.
| Name | Type | Default |
|---|---|---|
layerNumber | int | — |
value | bool | — |
SetBakeSimplificationDistancevoid
public void SetBakeSimplificationDistance(float simplificationDistance);| Name | Type | Default |
|---|---|---|
simplificationDistance | float | — |
SetOccludervoid
public void SetOccluder(Occluder3D occluder);| Name | Type | Default |
|---|---|---|
occluder | Occluder3D | — |