Skip to content

OccluderMaskMaterial

Masked occluder material

Occluders are elements of a scene that are not rendered by themselves but still participate in occlusion queries. Usually, occluder is a base mesh (average approximation) of a body representing its real counterpart in a scene. Occluders are used to mask visible virtual objects behind them (like geometries of a 3D scene behind user’s body). Masked occluder material is a more advanced version of the OccluderMaterial that takes into account a body segmentation mask provided by the PoseProcessor. It writes depth value only for pixels covered by a mask providing more realistic occlusion aligned with a body, additionally reducing effect of unnatural cuts in VTO. This material is created by OccluderMaskPlugin, please do not construct instance of OccluderMaskMaterial directly, plugin owns and updates texture of the mask.

  • ShaderMaterial

new OccluderMaskMaterial(name, scene, texture?): OccluderMaskMaterial

Constructor

string

Name of the material in the scene

Scene

Scene the material belongs to

BaseTexture

Texture storing segmentation mask

OccluderMaskMaterial

ShaderMaterial.constructor

dispose(forceDisposeEffect?, forceDisposeTextures?, notBoundToMesh?): void

Dispose the material

Overridden to keep the external mask texture owned by the plugin.

boolean

Effects should be forcefully disposed

boolean

Textures should be forcefully disposed

boolean

Material is known to be not bound to any mesh

void

ShaderMaterial.dispose