reckfellENGINE

VoxelInstanceLibraryMultiMeshItem

Instancer model using MultiMesh to render.

On this page
class VoxelInstanceLibraryMultiMeshItemReckfellSharpInherits VoxelInstanceLibraryItem

Instancer model using MultiMesh to render.

This model is suited for rendering very large amounts of simple instances, such as grass and rocks.

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

Constructors1

VoxelInstanceLibraryMultiMeshItemConstructor
# VoxelInstanceLibraryMultiMeshItem
C#
public VoxelInstanceLibraryMultiMeshItem();

Properties21

CastShadowProperty
# CastShadow
C#
public RenderingServer.ShadowCastingSetting CastShadow { get; set; }
CollisionDistanceProperty
# CollisionDistance
C#
public float CollisionDistance { get; set; }

When greater than 0 and colliders are configured, hints the distance below which colliders may be created. This allows to reduce the amount of colliders while keeping a high view distance for visuals. When negative, colliders will be created at all distances. Note: the instancer creates/removes colliders on a per-chunk basis, so this distance is compared against the distance to chunks, and not individual instances.

CollisionLayerProperty
# CollisionLayer
C#
public int CollisionLayer { get; set; }
CollisionMaskProperty
# CollisionMask
C#
public int CollisionMask { get; set; }
CollisionShapesProperty
# CollisionShapes
C#
public Reckfell.Collections.Array CollisionShapes { get; set; }

Alternating list of CollisionShape and Transform3D. Shape comes first, followed by its local transform relative to the instance. Setting up collision shapes in the editor may require using a scene instead.

GIModeProperty
# GIMode
C#
public GeometryInstance3D.GIModeEnum GIMode { get; set; }
HideBeyondMaxLodProperty
# HideBeyondMaxLod
C#
public bool HideBeyondMaxLod { get; set; }
MaterialOverrideProperty
# MaterialOverride
C#
public Material MaterialOverride { get; set; }
MeshProperty
# Mesh
C#
public Mesh Mesh { get; set; }
MeshLod0DistanceRatioProperty
# MeshLod0DistanceRatio
C#
public float MeshLod0DistanceRatio { get; set; }
MeshLod1Property
# MeshLod1
C#
public Mesh MeshLod1 { get; set; }
MeshLod1DistanceRatioProperty
# MeshLod1DistanceRatio
C#
public float MeshLod1DistanceRatio { get; set; }
MeshLod2Property
# MeshLod2
C#
public Mesh MeshLod2 { get; set; }
MeshLod2DistanceRatioProperty
# MeshLod2DistanceRatio
C#
public float MeshLod2DistanceRatio { get; set; }
MeshLod3Property
# MeshLod3
C#
public Mesh MeshLod3 { get; set; }
MeshLod3DistanceRatioProperty
# MeshLod3DistanceRatio
C#
public float MeshLod3DistanceRatio { get; set; }
RemovalBehaviorProperty
# RemovalBehavior
C#
public VoxelInstanceLibraryMultiMeshItem.RemovalBehaviorEnum RemovalBehavior { get; set; }

Specifies what should happen when instances get removed. This is useful if they should turn into more complex objects with animation or logic in them.

RemovalSceneProperty
# RemovalScene
C#
public PackedEntity RemovalScene { get; set; }

Scene that will be used if VoxelInstanceLibraryMultiMeshItem.RemovalBehavior is set to VoxelInstanceLibraryMultiMeshItem.RemovalBehaviorEnum.Instantiate.

RenderLayerProperty
# RenderLayer
C#
public int RenderLayer { get; set; }
SceneProperty
# Scene
C#
public PackedEntity Scene { get; set; }

Scene that will be used as configuration instead of manual properties. It should have a specific node structure to be supported. See [url]https://voxel-tools.readthedocs.io/en/latest/instancing/#setting-up-a-multimesh-item-from-a-scene[/url]

_MeshLodDistanceRatiosProperty
# _MeshLodDistanceRatios
C#
public float[] _MeshLodDistanceRatios { get; set; }

Methods30

GetCastShadowsSettingRenderingServer.ShadowCastingSetting
# GetCastShadowsSetting
C#
public RenderingServer.ShadowCastingSetting GetCastShadowsSetting();
Returns RenderingServer.ShadowCastingSetting
GetColliderGroupNamesReckfell.Collections.Array<StringName>
# GetColliderGroupNames
C#
public Reckfell.Collections.Array<StringName> GetColliderGroupNames();

Gets the list of group names that are added to collider nodes.

Returns Reckfell.Collections.Array<StringName>
GetCollisionDistancefloat
# GetCollisionDistance
C#
public float GetCollisionDistance();
Returns float
GetCollisionLayerint
# GetCollisionLayer
C#
public int GetCollisionLayer();
Returns int
GetCollisionMaskint
# GetCollisionMask
C#
public int GetCollisionMask();
Returns int
GetCollisionShapesReckfell.Collections.Array
# GetCollisionShapes
C#
public Reckfell.Collections.Array GetCollisionShapes();
Returns Reckfell.Collections.Array
GetGIModeGeometryInstance3D.GIModeEnum
# GetGIMode
C#
public GeometryInstance3D.GIModeEnum GetGIMode();
Returns GeometryInstance3D.GIModeEnum
GetHideBeyondMaxLodbool
# GetHideBeyondMaxLod
C#
public bool GetHideBeyondMaxLod();
Returns bool
GetMaterialOverrideMaterial
# GetMaterialOverride
C#
public Material GetMaterialOverride();
Returns Material
GetMeshMesh
# GetMesh
C#
public Mesh GetMesh(int meshLodIndex);
Parameters
NameTypeDefault
meshLodIndexint—
Returns Mesh
GetRemovalBehaviorVoxelInstanceLibraryMultiMeshItem.RemovalBehaviorEnum
# GetRemovalBehavior
C#
public VoxelInstanceLibraryMultiMeshItem.RemovalBehaviorEnum GetRemovalBehavior();
Returns VoxelInstanceLibraryMultiMeshItem.RemovalBehaviorEnum
GetRemovalScenePackedEntity
# GetRemovalScene
C#
public PackedEntity GetRemovalScene();
Returns PackedEntity
GetRenderLayerint
# GetRenderLayer
C#
public int GetRenderLayer();
Returns int
GetScenePackedEntity
# GetScene
C#
public PackedEntity GetScene();
Returns PackedEntity
SetCastShadowsSettingvoid
# SetCastShadowsSetting
C#
public void SetCastShadowsSetting(RenderingServer.ShadowCastingSetting mode);
Parameters
NameTypeDefault
modeRenderingServer.ShadowCastingSetting—
SetColliderGroupNamesvoid
# SetColliderGroupNames
C#
public void SetColliderGroupNames(Reckfell.Collections.Array<StringName> names);

Sets the list of group names that will be added to collider nodes generated for each instance.

Parameters
NameTypeDefault
namesReckfell.Collections.Array<StringName>—
SetCollisionDistancevoid
# SetCollisionDistance
C#
public void SetCollisionDistance(float distance);
Parameters
NameTypeDefault
distancefloat—
SetCollisionLayervoid
# SetCollisionLayer
C#
public void SetCollisionLayer(int collisionLayer);
Parameters
NameTypeDefault
collisionLayerint—
SetCollisionMaskvoid
# SetCollisionMask
C#
public void SetCollisionMask(int collisionMask);
Parameters
NameTypeDefault
collisionMaskint—
SetCollisionShapesvoid
# SetCollisionShapes
C#
public void SetCollisionShapes(Reckfell.Collections.Array shapeInfos);
Parameters
NameTypeDefault
shapeInfosReckfell.Collections.Array—
SetGIModevoid
# SetGIMode
C#
public void SetGIMode(GeometryInstance3D.GIModeEnum mode);
Parameters
NameTypeDefault
modeGeometryInstance3D.GIModeEnum—
SetHideBeyondMaxLodvoid
# SetHideBeyondMaxLod
C#
public void SetHideBeyondMaxLod(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetMaterialOverridevoid
# SetMaterialOverride
C#
public void SetMaterialOverride(Material material);
Parameters
NameTypeDefault
materialMaterial—
SetMeshvoid
# SetMesh
C#
public void SetMesh(Mesh mesh, int meshLodIndex);
Parameters
NameTypeDefault
meshMesh—
meshLodIndexint—
SetRemovalBehaviorvoid
# SetRemovalBehavior
C#
public void SetRemovalBehavior(VoxelInstanceLibraryMultiMeshItem.RemovalBehaviorEnum rb);
Parameters
NameTypeDefault
rbVoxelInstanceLibraryMultiMeshItem.RemovalBehaviorEnum—
SetRemovalScenevoid
# SetRemovalScene
C#
public void SetRemovalScene(PackedEntity scene);
Parameters
NameTypeDefault
scenePackedEntity—
SetRenderLayervoid
# SetRenderLayer
C#
public void SetRenderLayer(int renderLayer);
Parameters
NameTypeDefault
renderLayerint—
SetScenevoid
# SetScene
C#
public void SetScene(PackedEntity scene);
Parameters
NameTypeDefault
scenePackedEntity—
SetupFromTemplatevoid
# SetupFromTemplate
C#
public void SetupFromTemplate(Entity node);
Parameters
NameTypeDefault
nodeEntity—
_OnInstanceRemovedvoid
# _OnInstanceRemoved
C#
public virtual void _OnInstanceRemoved(VoxelInstancer instancer, Transform3D transform);

This method will be called if you set VoxelInstanceLibraryMultiMeshItem.RemovalBehavior to VoxelInstanceLibraryMultiMeshItem.RemovalBehaviorEnum.Callback. Note: this method can be called from within the removal of a node that is child of VoxelInstancer. In this context, Reckfell will prevent you from adding new child nodes. You can workaround that by using ReckfellObject.CallDeferred. See also VoxelInstancerRigidBody.QueueFreeAndNotifyInstancer.

Parameters
NameTypeDefault
instancerVoxelInstancer—
transformTransform3D—

Fields and constants1

MaxMeshLodsField
# MaxMeshLods
C#
public const long MaxMeshLods = 4;

VoxelInstanceLibraryMultiMeshItem.RemovalBehaviorEnum

ValueDescription
Callback = 2

Calls VoxelInstanceLibraryMultiMeshItem._OnInstanceRemoved when an instance gets removed. You should attach a script to the item in order to implement this. Note: every resource can have a Object.script. But in the editor, Reckfell currently doesn't show you that property if the resource appears in a sub-inspector. To workaround that, right-click the property in which the resource is, and choose "Edit". That will open the item in a full inspector. An alternative is to save your item as a file, and then edit it from the file browser.

Instantiate = 1

Instantiates the VoxelInstanceLibraryMultiMeshItem.RemovalScene for each instance getting removed. The scene must have a root derived from Entity3D, and will be given the same transform as the instance before being added to the scene tree. It will be added under the VoxelInstancer node.

None = 0

No extra logic will run when instances are removed.

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.