reckfellENGINE

Voxel worlds

Generators, meshers, viewers, LOD and persistent edits.

On this page

Terrain or a volumetric world

Ordinary Terrain stores a height surface. Voxel Tools stores values throughout a volume, supporting caves, overhangs, block structures and editable ground. Voxel data and the mesh visible to the player are separate parts of the system.

WorldMain parts
Block-basedVoxelTerrain, a block library, matching generator and VoxelMesherBlocky
Smooth with LODVoxelLodTerrain, density/SDF data and VoxelMesherTransvoxel
Prepared geometry without volumetric editingMeshes and prefabs may be sufficient

The generator must write the channels required by the mesher. A block library does not replace density data for a smooth surface.

Assemble a minimal world

  1. Add the appropriate world object: VoxelTerrain or VoxelLodTerrain.
  2. Assign a compatible generator, mesher and material. Start with a short viewing range.
  3. Attach VoxelViewer to an object that follows the player or game camera.
  4. Set the viewer's loading distance and collision requirements. A camera alone does not request voxel chunks.
  5. Run the scene and allow nearby blocks to generate.
  6. Move the viewer: new areas should load while distant data is released when no longer needed.

For editor previews, check VoxelViewer.Enabled In Editor. Editor and game viewers may occupy different positions, explaining a different result after running.

Edit data from C#

VoxelBuffer contains voxel values. This example creates a buffer and changes one cell:

C#
using Reckfell;

using var data = new VoxelBuffer();
data.Create(32, 32, 32);
data.SetVoxel(1, 16, 8, 16);

To change the visible world, use that terrain's editing tool and geometry update path. Editing a temporary buffer does not automatically place a mesh in the scene. Smooth worlds require density/SDF edits rather than only a block identifier.

Check coordinate space: a player's global position is not a cell coordinate when the world root is translated or scaled.

Persist edits

A generator can reconstruct the original world, but does not necessarily save player edits. Assign a supported stream, use its dirty-block saving operation and wait for writes to finish.

Store game saves outside immutable asset://, normally under user://. Check the stream and channels being saved. If restarting restores the original terrain, ensure reading uses the same stream and directory.

Performance and limits

Start with a small loading range. Measure generation, meshing, physics and rendering separately: few visible triangles do not guarantee cheap generation.

Avoid collisions and dense decoration throughout the distant world. Inspect smooth-world LOD transitions, particularly after editing block boundaries. GPU generation depends on renderer and build; a setting does not imply support on every device.

The installed C# Web distribution has browser-specific constraints. Cooperative voxel task execution and WebGPU changes belong to newer source builds and do not mean the installed Web template is already updated. Check the exact template used by your project.

SymptomCheck
Empty worldViewer, loading range, generator, mesher and material
Visible in editor, absent in gameGame viewer position and active camera
Visible blocks without collisionViewer collision request and physics layers/masks
Data edits remain invisibleChannel, coordinate space and world editing/geometry update path
Edits disappearStream, directory and write completion

API: VoxelBuffer, VoxelLodTerrain, VoxelViewer.

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.