reckfellENGINE

VoxelModifier

Base class for voxel modifiers.

On this page
class VoxelModifierReckfellSharpInherits Entity3D

Base class for voxel modifiers.

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).

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties2

OperationProperty
# Operation
C#
public VoxelModifier.OperationEnum Operation { get; set; }

An operation that the modifier performs on the terrain or on the other modifiers.

SmoothnessProperty
# Smoothness
C#
public float Smoothness { get; set; }

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.

Methods4

GetOperationVoxelModifier.OperationEnum
# GetOperation
C#
public VoxelModifier.OperationEnum GetOperation();
Returns VoxelModifier.OperationEnum
GetSmoothnessfloat
# GetSmoothness
C#
public float GetSmoothness();
Returns float
SetOperationvoid
# SetOperation
C#
public void SetOperation(VoxelModifier.OperationEnum op);
Parameters
NameTypeDefault
opVoxelModifier.OperationEnum—
SetSmoothnessvoid
# SetSmoothness
C#
public void SetSmoothness(float smoothness);
Parameters
NameTypeDefault
smoothnessfloat—

VoxelModifier.OperationEnum

ValueDescription
Add = 0

Performs SDF union.

Remove = 1

Performs SDF subtraction.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.