reckfellENGINE

VoxelMesher

Base class for all meshing algorithms.

On this page
class VoxelMesherReckfellSharpInherits Resource

Base class for all meshing algorithms.

In order to be rendered by Reckfell, voxels can be transformed into a mesh. There are various ways to do this, that's why this class is only a base for other, specialized ones. Voxel nodes automatically make use of meshers, but you can also produce meshes manually. For this, you may use one of the derived classes. Meshers can be re-used, which often yields better performance by reducing memory allocations.

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

Methods3

BuildMeshMesh
# BuildMesh
C#
public Mesh BuildMesh(VoxelBuffer voxelBuffer, Reckfell.Collections.Array<Material> materials, Reckfell.Collections.Dictionary additionalData = null);

Builds a mesh from the provided voxels. Materials will be attached to each surface based on the provided array. The way materials are used can depend on the type of mesher. Meshers are initially meant to work on chunks, so voxels within an outer margin of the buffer will not be part of the result. They are considered "neighbors" and may eventually affect face culling. If you want to use a mesher to make a standalone voxel mesh, make sure it is padded by air. The size of that margin is determined by VoxelMesher.GetMinimumPadding and VoxelMesher.GetMaximumPadding.

Parameters
NameTypeDefault
voxelBufferVoxelBuffer—
materialsReckfell.Collections.Array<Material>—
additionalDataReckfell.Collections.Dictionarynull
Returns Mesh
GetMaximumPaddinguint
# GetMaximumPadding
C#
public uint GetMaximumPadding();

Gets by how much voxels must be padded before their lower corner in order for the mesher to work.

Returns uint
GetMinimumPaddinguint
# GetMinimumPadding
C#
public uint GetMinimumPadding();

Gets by how much voxels must be padded after their upper corner in order for the mesher to work.

Returns uint
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.