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.
Extends
Section titled “Extends”ShaderMaterial
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new OccluderMaskMaterial(
name
,scene
,texture?
):OccluderMaskMaterial
Constructor
Parameters
Section titled “Parameters”string
Name of the material in the scene
Scene
Scene the material belongs to
texture?
Section titled “texture?”BaseTexture
Texture storing segmentation mask
Returns
Section titled “Returns”OccluderMaskMaterial
Overrides
Section titled “Overrides”ShaderMaterial.constructor
Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose(
forceDisposeEffect?
,forceDisposeTextures?
,notBoundToMesh?
):void
Dispose the material
Overridden to keep the external mask texture owned by the plugin.
Parameters
Section titled “Parameters”forceDisposeEffect?
Section titled “forceDisposeEffect?”boolean
Effects should be forcefully disposed
forceDisposeTextures?
Section titled “forceDisposeTextures?”boolean
Textures should be forcefully disposed
notBoundToMesh?
Section titled “notBoundToMesh?”boolean
Material is known to be not bound to any mesh
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”ShaderMaterial.dispose