Stencil
Supported Object types: 3d. Attach this component where needed. An Object has at most one instance of this component.
Use Object components to understand definitions and instance overrides.
A stencil writer and reader must share a channel. The role determines automatic color, depth, and comparison behavior; custom controls require a deliberately chosen render configuration.
Defaults below are normalized factory values from the component schema. Object presets, dimension, project units, and Scene overrides can supply different starting values. “Not stored” means the path is optional or runtime-derived. Read the property description to interpret it. Blank resource references assign no resource.
Writable means exposed for property writes through Logic. A No entry can still be editable in the Object Editor; runtime-only values cannot be authored. World-space lengths use metres, screen-space lengths use pixels, and rotations use degrees unless stated otherwise. The current loader refuses pixel-era projects. Use Units and Coordinates when comparing values.
| Property and path | Type | Factory default | Behavior | Writable |
|---|---|---|---|---|
| Enabled (enabled) | boolean | true | Enables the stencil effect on the selected target model. | No |
| Target Model (target) | text | “model3d” | Named 3D Model component used by the stencil effect. The component must exist on this Object. | No |
| Channel (channel) | text | “Mask 1” | Stencil channel shared by the writer and readers. Matching channel names connect their masking behavior. | No |
| Role (role) | text | “visibleWriter” | Stencil role: writer, visibleWriter, inside, outside, or custom. writer masks without drawing its own color; visibleWriter also draws. Custom exposes explicit compare and operation controls. | No |
| Color Write (colorWrite) | text | “auto” | Color buffer policy: auto, on, or off. auto uses the selected stencil role. | No |
| Depth Write (depthWrite) | text | “auto” | Depth buffer write policy: auto, on, or off. auto uses the selected stencil role. | No |
| Depth Test (depthTest) | text | “auto” | Depth test policy: auto, on, or off. auto uses the selected stencil role. | No |
| Compare (compare) | text | “equal” | Stencil comparison for the custom role. Selects how the channel controls visibility. | No |
| Write Channel (writeEnabled) | boolean | false | Whether the custom role writes the stencil channel. | No |
| Stencil Fail (stencilFail) | text | “keep” | Stencil operation when the stencil comparison fails. | No |
| Depth Fail (depthFail) | text | “keep” | Stencil operation when depth testing fails after a successful stencil comparison. | No |
| Pass (pass) | text | “keep” | Stencil operation when both stencil and depth tests pass. | No |
| Back Face (backFace) | text | “same” | same reuses front-face settings; custom enables separate back-face settings. | No |
| Back Compare (backCompare) | text | “equal” | Back-face stencil comparison. Used when Back Face is custom. | No |
| Back Stencil Fail (backStencilFail) | text | “keep” | Back-face operation when stencil comparison fails. Used when Back Face is custom. | No |
| Back Depth Fail (backDepthFail) | text | “keep” | Back-face operation when depth testing fails. Used when Back Face is custom. | No |
| Back Pass (backPass) | text | “keep” | Back-face operation when stencil and depth tests pass. Used when Back Face is custom. | No |
Myth Engine Documentation
