reckfellENGINE

VoxelBlockyModel

Model stored in VoxelBlockyLibrary and used by VoxelMesherBlocky.

On this page
class VoxelBlockyModelReckfellSharpInherits Resource

Model stored in VoxelBlockyLibrary and used by VoxelMesherBlocky.

Represents a model to be used for voxels of a specific TYPE value. Such models must be contained within a VoxelBlockyLibrary to be used with VoxelTerrain or directly with a VoxelMesherBlocky. A model can be setup in various ways, see child classes.

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

Constructors1

VoxelBlockyModelConstructor
# VoxelBlockyModel
C#
public VoxelBlockyModel();

Properties8

CollisionAabbsProperty
# CollisionAabbs
C#
public Reckfell.Collections.Array<Aabb> CollisionAabbs { get; set; }

List of bounding boxes relative to the model. They are used for box-based collision, using VoxelBoxMover. They are not used with mesh-based collision.

CollisionMaskProperty
# CollisionMask
C#
public uint CollisionMask { get; set; }

Collision mask used for box-based collision VoxelBoxMover and voxel raycasts (VoxelToolTerrain). It is not used for mesh-based collisions.

ColorProperty
# Color
C#
public Color Color { get; set; }

Color of the model. It will be used to modulate its color when built into a voxel mesh.

CullsNeighborsProperty
# CullsNeighbors
C#
public bool CullsNeighbors { get; set; }

If enabled, this voxel culls the faces of its neighbors. Disabling can be useful for denser transparent voxels, such as foliage.

LodSkirtsEnabledProperty
# LodSkirtsEnabled
C#
public bool LodSkirtsEnabled { get; set; }

If enabled and the terrain has LODs, this model will produce skirts when located at the edge of a chunk. This is intented to hide "cracks" between chunks of different LOD. You may turn this off if the model is transparent, as the skirt would become visible from behind other surfaces.

RandomTickableProperty
# RandomTickable
C#
public bool RandomTickable { get; set; }

If enabled, voxels having this ID in the TYPE channel will be used by VoxelToolTerrain.RunBlockyRandomTick.

TagsMaskProperty
# TagsMask
C#
public uint TagsMask { get; set; }

Bitmask used to filter this model in some operations. For example, see VoxelToolTerrain.RunBlockyRandomTick.

TransparencyIndexProperty
# TransparencyIndex
C#
public int TransparencyIndex { get; set; }

Determines how transparency is handled when the sides of the model are culled by neighbor voxels. If the neighbor voxel at a given side has a transparency index lower or equal to the current voxel, the side will be culled.

Methods23

GetCollisionAabbsReckfell.Collections.Array<Aabb>
# GetCollisionAabbs
C#
public Reckfell.Collections.Array<Aabb> GetCollisionAabbs();
Returns Reckfell.Collections.Array<Aabb>
GetCollisionMaskuint
# GetCollisionMask
C#
public uint GetCollisionMask();
Returns uint
GetColorColor
# GetColor
C#
public Color GetColor();
Returns Color
GetCullsNeighborsbool
# GetCullsNeighbors
C#
public bool GetCullsNeighbors();
Returns bool
GetLodSkirtsEnabledbool
# GetLodSkirtsEnabled
C#
public bool GetLodSkirtsEnabled();
Returns bool
GetMaterialOverrideMaterial
# GetMaterialOverride
C#
public Material GetMaterialOverride(int index);

Gets the material override for a specific surface of the model.

Parameters
NameTypeDefault
indexint—
Returns Material
GetMeshOrthoRotationIndexint
# GetMeshOrthoRotationIndex
C#
public int GetMeshOrthoRotationIndex();

Gets the 90-degree rotation ID that will be applied to the model when the library is baked.

Returns int
GetTagsMaskuint
# GetTagsMask
C#
public uint GetTagsMask();
Returns uint
GetTransparencyIndexint
# GetTransparencyIndex
C#
public int GetTransparencyIndex();
Returns int
IsMeshCollisionEnabledbool
# IsMeshCollisionEnabled
C#
public bool IsMeshCollisionEnabled(int surfaceIndex);

Tells if a specific surface produces mesh-based collisions.

Parameters
NameTypeDefault
surfaceIndexint—
Returns bool
IsRandomTickablebool
# IsRandomTickable
C#
public bool IsRandomTickable();
Returns bool
Rotate90void
# Rotate90
C#
public void Rotate90(Vector3I.Axis axis, bool clockwise);
Parameters
NameTypeDefault
axisVector3I.Axis—
clockwisebool—
SetCollisionAabbsvoid
# SetCollisionAabbs
C#
public void SetCollisionAabbs(Reckfell.Collections.Array<Aabb> aabbs);
Parameters
NameTypeDefault
aabbsReckfell.Collections.Array<Aabb>—
SetCollisionMaskvoid
# SetCollisionMask
C#
public void SetCollisionMask(uint mask);
Parameters
NameTypeDefault
maskuint—
SetColorvoid
# SetColor
C#
public void SetColor(Color color);
Parameters
NameTypeDefault
colorColor—
SetCullsNeighborsvoid
# SetCullsNeighbors
C#
public void SetCullsNeighbors(bool cullsNeighbors);
Parameters
NameTypeDefault
cullsNeighborsbool—
SetLodSkirtsEnabledvoid
# SetLodSkirtsEnabled
C#
public void SetLodSkirtsEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetMaterialOverridevoid
# SetMaterialOverride
C#
public void SetMaterialOverride(int index, Material material);

Sets a material override for a specific surface of the model. It allows to use the same mesh on multiple models, but using different materials on each.

Parameters
NameTypeDefault
indexint—
materialMaterial—
SetMeshCollisionEnabledvoid
# SetMeshCollisionEnabled
C#
public void SetMeshCollisionEnabled(int surfaceIndex, bool enabled);

Enables or disables mesh-based collision on a specific surface. It allows a model to have solid parts and others where players can pass through.

Parameters
NameTypeDefault
surfaceIndexint—
enabledbool—
SetMeshOrthoRotationIndexvoid
# SetMeshOrthoRotationIndex
C#
public void SetMeshOrthoRotationIndex(int i);

Gets the 90-degree rotation ID that will be applied to the model when the library is baked. This is a number representing one of 24 possible 90-degree rotations. You can also use VoxelBlockyModel.Rotate90.

Parameters
NameTypeDefault
iint—
SetRandomTickablevoid
# SetRandomTickable
C#
public void SetRandomTickable(bool _UnnamedArg0);
Parameters
NameTypeDefault
_UnnamedArg0bool—
SetTagsMaskvoid
# SetTagsMask
C#
public void SetTagsMask(uint _UnnamedArg0);
Parameters
NameTypeDefault
_UnnamedArg0uint—
SetTransparencyIndexvoid
# SetTransparencyIndex
C#
public void SetTransparencyIndex(int transparencyIndex);
Parameters
NameTypeDefault
transparencyIndexint—

VoxelBlockyModel.Side

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.