VoxelModifier¶
Inherits: Node3D
Inherited by: VoxelModifierMesh, VoxelModifierSphere
Base class for voxel modifiers.
Description:¶
Modifiers are meant to be as an extension to terrain's generator that non-destructively affect limited volume. Stacks with other modifiers. Runtime edits from VoxelTool override modifier values.
Note 1: Only works with VoxelLodTerrain.
Note 2: Only works with smooth terrain (SDF).
Properties:¶
| Type | Name | Default |
|---|---|---|
| Operation | operation | OPERATION_ADD (0) |
| float | smoothness | 0.0 |
Enumerations:¶
enum Operation:
- OPERATION_ADD = 0 --- Performs SDF union.
- OPERATION_REMOVE = 1 --- Performs SDF subtraction.
Property Descriptions¶
Operation operation = OPERATION_ADD (0)¶
An operation that the modifier performs on the terrain or on the other modifiers.
float smoothness = 0.0¶
Increasing this value makes the shape "merge" with its surroundings across a more or less large distance.
Note, it assumes the base generator produces consistent gradients. This is not always the case. Notably, it is a common optimization for generators to avoid calculating gradients beyond a certain distance from surfaces. If smoothness is too large, or if the generator's cutoff distance is too low, it can lead to gaps in the resulting mesh, usually at chunk boundaries.
Generated on Jan 26, 2026