reckfellENGINE

VoxelBlockyModelMesh

Generates a model based on a custom mesh.

On this page
class VoxelBlockyModelMeshReckfellSharpInherits VoxelBlockyModel

Generates a model based on a custom mesh.

VoxelMesherBlocky does not require models to be cubes. Ultimately, model visuals are all meshes. This is the most versatile option to make a model. The workflow is to make these models in a 3D editor such as Blender, making sure they are confined in a box going from (0,0) to (1,1). Textures are assigned with classic UV-mapping.

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

Constructors1

VoxelBlockyModelMeshConstructor
# VoxelBlockyModelMesh
C#
public VoxelBlockyModelMesh();

Properties4

MeshProperty
# Mesh
C#
public Mesh Mesh { get; set; }

Mesh that will be used for this model. Must not be empty (if you want an empty model, use VoxelBlockyModelEmpty). If it has more than 2 surfaces (2 materials) the next surfaces will be ignored. Surfaces must be made of triangles. Must be indexed (if you generate meshes with SurfaceTool, use SurfaceTool.Index). Should ideally contain geometry within a 0..1 area. Only triangles located on the sides of that cubic area will be considered for neighbor side culling (see also VoxelBlockyModelMesh.SideVertexTolerance).

MeshOrthoRotationIndexProperty
# MeshOrthoRotationIndex
C#
public int MeshOrthoRotationIndex { get; set; }

Orthogonal rotation applied to the mesh when baking. Values are taken from the same convention as GridMap tiles. (GridMap provides a conversion method from Basis, unfortunately it is not a static method so it requires a GridMap instance to exist. A helper method could be added in the future if requested)

SideCutoutEnabledProperty
# SideCutoutEnabled
C#
public bool SideCutoutEnabled { get; set; }

When a neighbor voxel partially covers a side of this voxel, the occluded geometry of the side will be cut away. This only works if the shape of both sides is a rectangle. Note, enabling this option can actually produce more triangles than when it is enabled.

SideVertexToleranceProperty
# SideVertexTolerance
C#
public float SideVertexTolerance { get; set; }

Margin below which triangles located near one of the 6 sides of the voxel will be considered on that side. Sides get culled or not by comparing between triangles of neighbor sides.

Methods6

GetMeshMesh
# GetMesh
C#
public Mesh GetMesh();
Returns Mesh
GetSideVertexTolerancefloat
# GetSideVertexTolerance
C#
public float GetSideVertexTolerance();
Returns float
IsSideCutoutEnabledbool
# IsSideCutoutEnabled
C#
public bool IsSideCutoutEnabled();
Returns bool
SetMeshvoid
# SetMesh
C#
public void SetMesh(Mesh mesh);
Parameters
NameTypeDefault
meshMesh—
SetSideCutoutEnabledvoid
# SetSideCutoutEnabled
C#
public void SetSideCutoutEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetSideVertexTolerancevoid
# SetSideVertexTolerance
C#
public void SetSideVertexTolerance(float tolerance);
Parameters
NameTypeDefault
tolerancefloat—
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.