reckfellENGINE

VoxelLodTerrain

Voxel volume using variable level of detail.

On this page
class VoxelLodTerrainReckfellSharpInherits VoxelEntity

Voxel volume using variable level of detail.

Renders large terrain using variable level of details. This is preferably used with smooth meshing such as VoxelMesherTransvoxel. Blocky meshers can be used, but currently don't have as much support for LOD.

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

Constructors1

VoxelLodTerrainConstructor
# VoxelLodTerrain
C#
public VoxelLodTerrain();

Properties40

CacheGeneratedBlocksProperty
# CacheGeneratedBlocks
C#
public bool CacheGeneratedBlocks { get; set; }

If enabled, streaming the terrain will keep generated voxel data in memory around viewers, even if it wasn't edited. This can speedup voxel queries on non-edited areas and allows VoxelStream.SaveGeneratorOutput to work, but increases memory usage significantly. This option is not supported when VoxelLodTerrain.FullLoadModeEnabled is enabled.

CollisionLayerProperty
# CollisionLayer
C#
public int CollisionLayer { get; set; }

Collision layer used by generated colliders. Check Reckfell documentation for more information.

CollisionLodCountProperty
# CollisionLodCount
C#
public int CollisionLodCount { get; set; }

How many LOD levels are set to generate colliders, starting from LOD 0. Setting this property to 0 means all LODs have collision.

CollisionMarginProperty
# CollisionMargin
C#
public float CollisionMargin { get; set; }

Collision margin used by generated colliders. Note that it may depend on which physics engine is used under the hood, as some don't use margins.

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

Collision mask used by generated colliders. Check Reckfell documentation for more information.

CollisionUpdateDelayProperty
# CollisionUpdateDelay
C#
public int CollisionUpdateDelay { get; set; }

How long to wait before updating colliders after an edit, in milliseconds. Collider generation is expensive, so the intent is to smooth it out.

DebugDrawActiveMeshBlocksProperty
# DebugDrawActiveMeshBlocks
C#
public bool DebugDrawActiveMeshBlocks { get; set; }
DebugDrawActiveVisualAndCollisionBlocksProperty
# DebugDrawActiveVisualAndCollisionBlocks
C#
public bool DebugDrawActiveVisualAndCollisionBlocks { get; set; }
DebugDrawEditBoxesProperty
# DebugDrawEditBoxes
C#
public bool DebugDrawEditBoxes { get; set; }
DebugDrawEditedBlocksProperty
# DebugDrawEditedBlocks
C#
public bool DebugDrawEditedBlocks { get; set; }
DebugDrawEnabledProperty
# DebugDrawEnabled
C#
public bool DebugDrawEnabled { get; set; }
DebugDrawLoadedVisualAndCollisionBlocksProperty
# DebugDrawLoadedVisualAndCollisionBlocks
C#
public bool DebugDrawLoadedVisualAndCollisionBlocks { get; set; }
DebugDrawMeshUpdatesProperty
# DebugDrawMeshUpdates
C#
public bool DebugDrawMeshUpdates { get; set; }
DebugDrawModifierBoundsProperty
# DebugDrawModifierBounds
C#
public bool DebugDrawModifierBounds { get; set; }
DebugDrawOctreeBoundsProperty
# DebugDrawOctreeBounds
C#
public bool DebugDrawOctreeBounds { get; set; }
DebugDrawOctreeNodesProperty
# DebugDrawOctreeNodes
C#
public bool DebugDrawOctreeNodes { get; set; }
DebugDrawShadowOccludersProperty
# DebugDrawShadowOccluders
C#
public bool DebugDrawShadowOccluders { get; set; }
DebugDrawViewerClipboxesProperty
# DebugDrawViewerClipboxes
C#
public bool DebugDrawViewerClipboxes { get; set; }
DebugDrawVolumeBoundsProperty
# DebugDrawVolumeBounds
C#
public bool DebugDrawVolumeBounds { get; set; }
DebugDrawVoxelMetadataProperty
# DebugDrawVoxelMetadata
C#
public bool DebugDrawVoxelMetadata { get; set; }
FullLoadModeEnabledProperty
# FullLoadModeEnabled
C#
public bool FullLoadModeEnabled { get; set; }

If enabled, data streaming will be turned off, and all voxel data will be loaded from the stream into memory. This removes several constraints, such as being able to edit anywhere and allowing distant normalmaps to include edited regions. This comes at the expense of more memory usage. However, only edited regions use memory, so in practice it can be good enough.

GenerateCollisionsProperty
# GenerateCollisions
C#
public bool GenerateCollisions { get; set; }

If enabled, chunked colliders will be generated from meshes.

LodCountProperty
# LodCount
C#
public int LodCount { get; set; }

How many LOD levels to use. This should be tuned alongside VoxelLodTerrain.LodDistance: if you want to see very far, you need more LOD levels. This allows blocks to become larger the further away they are, to keep their numbers to an acceptable amount. In contrast, too few LOD levels means regions far away will have to use too many small blocks, which can affect performance.

LodDistanceProperty
# LodDistance
C#
public float LodDistance { get; set; }

How far LOD 0 extends from the viewer. Each parent LOD will extend twice as far as their children LOD levels. When VoxelLodTerrain.FullLoadModeEnabled is disabled, this also defines how far edits are allowed. For further control of LODs beyond 0, see VoxelLodTerrain.SecondaryLodDistance.

LodFadeDurationProperty
# LodFadeDuration
C#
public float LodFadeDuration { get; set; }

When set greater than 0, enables LOD fading. When mesh blocks get split/merged as level of detail changes, they will fade to make the transition less noticeable (or at least more pleasant). This feature requires to use a specific shader, check the online documentation or examples for more information.

MaterialProperty
# Material
C#
public Material Material { get; set; }

Material used for the surface of the volume. The main usage of this node is with smooth voxels, which means if you want more than one "material" on the ground, you need to use splatmapping techniques with a shader. In addition, many features require shaders to work properly. Check the online documentation or examples for more information. Note: if you use a ShaderMaterial, it will be instanced on every chunk in order to support per-chunk/LOD features, so dynamic changes done to parameters will not apply. You can use global uniforms to workaround this limitation.

MeshBlockSizeProperty
# MeshBlockSize
C#
public uint MeshBlockSize { get; set; }

Sets how many voxels across meshes of the terrain span. Voxel chunks are stored in cubic chunks of 16x16x16 voxels, and by default meshes of the terrain match that size. But you can set this to 32 so meshes will span 2x2x2 voxel chunks. This is a performance tradeoff. Higher mesh size may speed up rendering, at the cost of slower mesh updates. Values other than 16 and 32 are not supported. Note: this setting also affects VoxelInstancer chunks.

NormalmapBeginLodIndexProperty
# NormalmapBeginLodIndex
C#
public int NormalmapBeginLodIndex { get; set; }

From which LOD index normalmaps will be generated. There won't be normalmaps below this index.

NormalmapEnabledProperty
# NormalmapEnabled
C#
public bool NormalmapEnabled { get; set; }

Enables generation of distant normalmaps. This is a feature used with smooth terrain only (SDF). It is an expensive feature but allows to bring a lot more detail to distant ground. This feature requires to use a specific shader, check the online documentation or examples for more information.

NormalmapMaxDeviationDegreesProperty
# NormalmapMaxDeviationDegrees
C#
public int NormalmapMaxDeviationDegrees { get; set; }
NormalmapOctahedralEncodingEnabledProperty
# NormalmapOctahedralEncodingEnabled
C#
public bool NormalmapOctahedralEncodingEnabled { get; set; }

Enables octahedral compression of normalmaps, which reduces memory usage caused by distant normalmaps by about 33%, with some impact on visual quality. Your shader may be modified accordingly to decode them.

NormalmapTileResolutionMaxProperty
# NormalmapTileResolutionMax
C#
public int NormalmapTileResolutionMax { get; set; }

Maximum resolution of tiles in distant normalmaps.

NormalmapTileResolutionMinProperty
# NormalmapTileResolutionMin
C#
public int NormalmapTileResolutionMin { get; set; }

Minimum resolution of tiles in distant normalmaps. This is the resolution at which normalmaps will begin with, at the LOD level defined in VoxelLodTerrain.NormalmapBeginLodIndex. Resolutions will double at each LOD level, until they reach VoxelLodTerrain.NormalmapTileResolutionMax.

NormalmapUseGpuProperty
# NormalmapUseGpu
C#
public bool NormalmapUseGpu { get; set; }

Enables GPU detail normalmaps generation, which can speed it up. This is only valid for generators that support it. Vulkan is required.

SecondaryLodDistanceProperty
# SecondaryLodDistance
C#
public float SecondaryLodDistance { get; set; }

Controls the size of each LOD above LOD 0, in voxels relative to those LODs (voxels of LOD N are twice as big than LOD N-1). Higher values allow to see further away before detail are decimated, but is more expensive. Note that it will not necessarily be respected accurately, and will rather be used as a target minimum distance. This is only used when VoxelLodTerrain.StreamingSystem is set to VoxelLodTerrain.StreamingSystemEnum.Clipbox. In other cases, VoxelLodTerrain.LodDistance is used. To control LOD 0, see VoxelLodTerrain.LodDistance.

StreamingSystemProperty
# StreamingSystem
C#
public VoxelLodTerrain.StreamingSystemEnum StreamingSystem { get; set; }

Selects the underlying algorithm used to determine when to load and unload chunks around viewers as they move around.

ThreadedUpdateEnabledProperty
# ThreadedUpdateEnabled
C#
public bool ThreadedUpdateEnabled { get; set; }

When enabled, this node will run a large part of its update cycle in a separate thread. Otherwise, it will run on the main thread.

UseGpuGenerationProperty
# UseGpuGeneration
C#
public bool UseGpuGeneration { get; set; }

Enables GPU block generation, which can speed it up. This is only valid for generators that support it. Vulkan is required.

ViewDistanceProperty
# ViewDistance
C#
public int ViewDistance { get; set; }

Maximum distance viewers can have. If a viewer has a larger distance, it will be clamped. Note that this is only a hint and not an exact boundary. Terrain may load within that distance, but can continue beyond it, rounding up to block size of the biggest LOD. If your terrain size is finite (like an island or planet) and you want to keep it in view, you may want to set this value to a very large number. This is mainly useful for infinite terrains where a cap is desired.

VoxelBoundsProperty
# VoxelBounds
C#
public Aabb VoxelBounds { get; set; }

Bounds within which volume data can exist (loaded or not), in voxels. By default, it is pseudo-infinite. If you make a planet, island or some sort of arena, you may want to choose a finite size. Note, because this volume uses chunks with LOD, these bounds will snap to the closest chunk boundary.

Methods79

DebugDumpAsSceneint
# DebugDumpAsScene
C#
public int DebugDumpAsScene(string path, bool includeInstancer);

Saves the current state of the terrain as a Reckfell scene file. Can be used to inspect meshes and instances in more detail in the editor.

Parameters
NameTypeDefault
pathstring—
includeInstancerbool—
Returns int
DebugGetDataBlockCountint
# DebugGetDataBlockCount
C#
public int DebugGetDataBlockCount();

Get how many voxel data chunks are currently loaded

Returns int
DebugGetDataBlockInfoReckfell.Collections.Dictionary
# DebugGetDataBlockInfo
C#
public Reckfell.Collections.Dictionary DebugGetDataBlockInfo(Vector3 blockPos, int lod);

Gets some debug information about a specific voxel data chunk.

Text
{
    "loading_state": int,
}
Parameters
NameTypeDefault
blockPosVector3—
lodint—
Returns Reckfell.Collections.Dictionary
DebugGetDrawFlagbool
# DebugGetDrawFlag
C#
public bool DebugGetDrawFlag(VoxelLodTerrain.DebugDrawFlag flagIndex);

Gets whether a specific debug drawing flag is enabled. This method always returns false in exported games.

Parameters
NameTypeDefault
flagIndexVoxelLodTerrain.DebugDrawFlag—
Returns bool
DebugGetDrawShadowOccludersbool
# DebugGetDrawShadowOccluders
C#
public bool DebugGetDrawShadowOccluders();
Returns bool
DebugGetMeshBlockCountint
# DebugGetMeshBlockCount
C#
public int DebugGetMeshBlockCount();

Gets how many meshes the terrain currently has.

Returns int
DebugGetMeshBlockInfoReckfell.Collections.Dictionary
# DebugGetMeshBlockInfo
C#
public Reckfell.Collections.Dictionary DebugGetMeshBlockInfo(Vector3 blockPos, int lod);

Gets some debug information about a specific mesh.

Text
{
    "transition_mask": int,
    "recomputed_transition_mask": int,
    "loaded": bool,
    "meshed": bool,
    "mesh_state": int,
    "visible": bool,
    "visual_active": bool,
    "collision_active": bool
}
Parameters
NameTypeDefault
blockPosVector3—
lodint—
Returns Reckfell.Collections.Dictionary
DebugGetOctreesDetailedReckfell.Collections.Array
# DebugGetOctreesDetailed
C#
public Reckfell.Collections.Array DebugGetOctreesDetailed();

Gets debug information about the grid of octrees used to stream the terrain at multiple levels of detail. The returned array contains alternating Vector3I and Reckfell.Collections.Array values, where each pair corresponds to one octree at a specific position:

Text
[
    Vector3i,
    Array,
    Vector3i,
    Array,
    ...
]

The array after positions contains info about one octree:

Text
[
    int (node state),
    null or Array (children info)
]

When children info is not null, it contains 8 arrays structured the same way, and may be recursively traversed to obtain the state of every node of the octree.

Returns Reckfell.Collections.Array
DebugIsDrawEnabledbool
# DebugIsDrawEnabled
C#
public bool DebugIsDrawEnabled();
Returns bool
DebugPrintSdfTopDownReckfell.Collections.Array
# DebugPrintSdfTopDown
C#
public Reckfell.Collections.Array DebugPrintSdfTopDown(Vector3I center, Vector3I extents);

Captures a top-down representation of the signed distance field (SDF) at multiple LOD levels within a specific area. The returned array contains an image for each LOD.

Parameters
NameTypeDefault
centerVector3I—
extentsVector3I—
Returns Reckfell.Collections.Array
DebugRaycastMeshBlockReckfell.Collections.Array
# DebugRaycastMeshBlock
C#
public Reckfell.Collections.Array DebugRaycastMeshBlock(Vector3 origin, Vector3 dir);

Gets the non-empty mesh chunk positions from a rough world-space ray, up to a distance of 256 units. All LODs are checked. The returned array contains:

Text
[
    {
        "position": Vector3i,
        "lod": int
    },
    ...
]
Parameters
NameTypeDefault
originVector3—
dirVector3—
Returns Reckfell.Collections.Array
DebugSetDrawEnabledvoid
# DebugSetDrawEnabled
C#
public void DebugSetDrawEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
DebugSetDrawFlagvoid
# DebugSetDrawFlag
C#
public void DebugSetDrawFlag(VoxelLodTerrain.DebugDrawFlag flagIndex, bool enabled);

Sets a specific debug drawing flag. Note that debug drawing must also be enabled for it to be visible. This method does nothing in exported games.

Parameters
NameTypeDefault
flagIndexVoxelLodTerrain.DebugDrawFlag—
enabledbool—
DebugSetDrawShadowOccludersvoid
# DebugSetDrawShadowOccluders
C#
public void DebugSetDrawShadowOccluders(bool enabled);
Parameters
NameTypeDefault
enabledbool—
GetCacheGeneratedBlocksbool
# GetCacheGeneratedBlocks
C#
public bool GetCacheGeneratedBlocks();
Returns bool
GetCollisionLayerint
# GetCollisionLayer
C#
public int GetCollisionLayer();
Returns int
GetCollisionLodCountint
# GetCollisionLodCount
C#
public int GetCollisionLodCount();
Returns int
GetCollisionMarginfloat
# GetCollisionMargin
C#
public float GetCollisionMargin();
Returns float
GetCollisionMaskint
# GetCollisionMask
C#
public int GetCollisionMask();
Returns int
GetCollisionUpdateDelayint
# GetCollisionUpdateDelay
C#
public int GetCollisionUpdateDelay();
Returns int
GetDataBlockRegionExtentint
# GetDataBlockRegionExtent
C#
public int GetDataBlockRegionExtent();
Returns int
GetDataBlockSizeuint
# GetDataBlockSize
C#
public uint GetDataBlockSize();

Gets the size of one cunic data block in voxels.

Returns uint
GetGenerateCollisionsbool
# GetGenerateCollisions
C#
public bool GetGenerateCollisions();
Returns bool
GetGeneratorUseGpubool
# GetGeneratorUseGpu
C#
public bool GetGeneratorUseGpu();
Returns bool
GetLodCountint
# GetLodCount
C#
public int GetLodCount();
Returns int
GetLodDistancefloat
# GetLodDistance
C#
public float GetLodDistance();
Returns float
GetLodFadeDurationfloat
# GetLodFadeDuration
C#
public float GetLodFadeDuration();
Returns float
GetMaterialMaterial
# GetMaterial
C#
public Material GetMaterial();
Returns Material
GetMeshBlockSizeuint
# GetMeshBlockSize
C#
public uint GetMeshBlockSize();
Returns uint
GetNormalmapBeginLodIndexint
# GetNormalmapBeginLodIndex
C#
public int GetNormalmapBeginLodIndex();
Returns int
GetNormalmapGeneratorOverrideVoxelGenerator
# GetNormalmapGeneratorOverride
C#
public VoxelGenerator GetNormalmapGeneratorOverride();
Returns VoxelGenerator
GetNormalmapGeneratorOverrideBeginLodIndexint
# GetNormalmapGeneratorOverrideBeginLodIndex
C#
public int GetNormalmapGeneratorOverrideBeginLodIndex();
Returns int
GetNormalmapMaxDeviationDegreesint
# GetNormalmapMaxDeviationDegrees
C#
public int GetNormalmapMaxDeviationDegrees();
Returns int
GetNormalmapTileResolutionMaxint
# GetNormalmapTileResolutionMax
C#
public int GetNormalmapTileResolutionMax();
Returns int
GetNormalmapTileResolutionMinint
# GetNormalmapTileResolutionMin
C#
public int GetNormalmapTileResolutionMin();
Returns int
GetNormalmapUseGpubool
# GetNormalmapUseGpu
C#
public bool GetNormalmapUseGpu();
Returns bool
GetOctahedralNormalEncodingbool
# GetOctahedralNormalEncoding
C#
public bool GetOctahedralNormalEncoding();
Returns bool
GetProcessCallbackVoxelLodTerrain.ProcessCallback
# GetProcessCallback
C#
public VoxelLodTerrain.ProcessCallback GetProcessCallback();

Gets which callback is used to run the main thread update of this node.

Returns VoxelLodTerrain.ProcessCallback
GetSecondaryLodDistancefloat
# GetSecondaryLodDistance
C#
public float GetSecondaryLodDistance();
Returns float
GetStatisticsReckfell.Collections.Dictionary
# GetStatistics
C#
public Reckfell.Collections.Dictionary GetStatistics();

Gets debug information about how much time is spent processing the terrain. The returned dictionary has the following structure:

Text
{
    "time_detect_required_blocks": int,
    "time_request_blocks_to_load": int,
    "time_process_load_responses": int,
    "time_request_blocks_to_update": int,
    "time_process_update_responses": int,
    "remaining_main_thread_blocks": int,
    "dropped_block_loads": int,
    "dropped_block_meshs": int,
    "updated_blocks": int,
    "blocked_lods": int
}

Times are in microseconds.

Returns Reckfell.Collections.Dictionary
GetStreamingSystemVoxelLodTerrain.StreamingSystemEnum
# GetStreamingSystem
C#
public VoxelLodTerrain.StreamingSystemEnum GetStreamingSystem();
Returns VoxelLodTerrain.StreamingSystemEnum
GetViewDistanceint
# GetViewDistance
C#
public int GetViewDistance();
Returns int
GetVoxelBoundsAabb
# GetVoxelBounds
C#
public Aabb GetVoxelBounds();
Returns Aabb
IsAreaMeshedbool
# IsAreaMeshed
C#
public bool IsAreaMeshed(Aabb areaInVoxels, int lodIndex);

Returns true if the area has been processed by meshing. It does not mean the area actually contains a mesh. Returns false if the area has not been processed by meshing (therefore it is unknown whethere there should be a mesh here or not). When streaming terrain, this can be used to determine if an area has fully "loaded", in case the game relies meshes or mesh colliders.

Parameters
NameTypeDefault
areaInVoxelsAabb—
lodIndexint—
Returns bool
IsFullLoadModeEnabledbool
# IsFullLoadModeEnabled
C#
public bool IsFullLoadModeEnabled();
Returns bool
IsNormalmapEnabledbool
# IsNormalmapEnabled
C#
public bool IsNormalmapEnabled();
Returns bool
IsThreadedUpdateEnabledbool
# IsThreadedUpdateEnabled
C#
public bool IsThreadedUpdateEnabled();
Returns bool
SaveModifiedBlocksVoxelSaveCompletionTracker
# SaveModifiedBlocks
C#
public VoxelSaveCompletionTracker SaveModifiedBlocks();

Requests saving of all modified voxels. Saving is asynchronous and will complete some time in the future. If the game quits, the engine will ensure saving tasks get completed before the application shuts down. Use the returned tracker object to know when saving has completed. However, saves occurring after calling this method won't be tracked by this object. Note that blocks getting unloaded as the viewer moves around can also trigger saving tasks, independently from this function.

Returns VoxelSaveCompletionTracker
SetCacheGeneratedBlocksvoid
# SetCacheGeneratedBlocks
C#
public void SetCacheGeneratedBlocks(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetCollisionLayervoid
# SetCollisionLayer
C#
public void SetCollisionLayer(int layer);
Parameters
NameTypeDefault
layerint—
SetCollisionLodCountvoid
# SetCollisionLodCount
C#
public void SetCollisionLodCount(int count);
Parameters
NameTypeDefault
countint—
SetCollisionMarginvoid
# SetCollisionMargin
C#
public void SetCollisionMargin(float margin);
Parameters
NameTypeDefault
marginfloat—
SetCollisionMaskvoid
# SetCollisionMask
C#
public void SetCollisionMask(int mask);
Parameters
NameTypeDefault
maskint—
SetCollisionUpdateDelayvoid
# SetCollisionUpdateDelay
C#
public void SetCollisionUpdateDelay(int delayMsec);
Parameters
NameTypeDefault
delayMsecint—
SetFullLoadModeEnabledvoid
# SetFullLoadModeEnabled
C#
public void SetFullLoadModeEnabled(bool _UnnamedArg0);
Parameters
NameTypeDefault
_UnnamedArg0bool—
SetGenerateCollisionsvoid
# SetGenerateCollisions
C#
public void SetGenerateCollisions(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetGeneratorUseGpuvoid
# SetGeneratorUseGpu
C#
public void SetGeneratorUseGpu(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetLodCountvoid
# SetLodCount
C#
public void SetLodCount(int lodCount);
Parameters
NameTypeDefault
lodCountint—
SetLodDistancevoid
# SetLodDistance
C#
public void SetLodDistance(float lodDistance);
Parameters
NameTypeDefault
lodDistancefloat—
SetLodFadeDurationvoid
# SetLodFadeDuration
C#
public void SetLodFadeDuration(float seconds);
Parameters
NameTypeDefault
secondsfloat—
SetMaterialvoid
# SetMaterial
C#
public void SetMaterial(Material material);
Parameters
NameTypeDefault
materialMaterial—
SetMeshBlockSizevoid
# SetMeshBlockSize
C#
public void SetMeshBlockSize(uint _UnnamedArg0);
Parameters
NameTypeDefault
_UnnamedArg0uint—
SetNormalmapBeginLodIndexvoid
# SetNormalmapBeginLodIndex
C#
public void SetNormalmapBeginLodIndex(int lodIndex);
Parameters
NameTypeDefault
lodIndexint—
SetNormalmapEnabledvoid
# SetNormalmapEnabled
C#
public void SetNormalmapEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetNormalmapGeneratorOverridevoid
# SetNormalmapGeneratorOverride
C#
public void SetNormalmapGeneratorOverride(VoxelGenerator generatorOverride);
Parameters
NameTypeDefault
generatorOverrideVoxelGenerator—
SetNormalmapGeneratorOverrideBeginLodIndexvoid
# SetNormalmapGeneratorOverrideBeginLodIndex
C#
public void SetNormalmapGeneratorOverrideBeginLodIndex(int lodIndex);
Parameters
NameTypeDefault
lodIndexint—
SetNormalmapMaxDeviationDegreesvoid
# SetNormalmapMaxDeviationDegrees
C#
public void SetNormalmapMaxDeviationDegrees(int angle);
Parameters
NameTypeDefault
angleint—
SetNormalmapTileResolutionMaxvoid
# SetNormalmapTileResolutionMax
C#
public void SetNormalmapTileResolutionMax(int resolution);
Parameters
NameTypeDefault
resolutionint—
SetNormalmapTileResolutionMinvoid
# SetNormalmapTileResolutionMin
C#
public void SetNormalmapTileResolutionMin(int resolution);
Parameters
NameTypeDefault
resolutionint—
SetNormalmapUseGpuvoid
# SetNormalmapUseGpu
C#
public void SetNormalmapUseGpu(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetOctahedralNormalEncodingvoid
# SetOctahedralNormalEncoding
C#
public void SetOctahedralNormalEncoding(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetProcessCallbackvoid
# SetProcessCallback
C#
public void SetProcessCallback(VoxelLodTerrain.ProcessCallback mode);

Sets which process callback is used to run the main thread update of this node. By default, it uses _process.

Parameters
NameTypeDefault
modeVoxelLodTerrain.ProcessCallback—
SetSecondaryLodDistancevoid
# SetSecondaryLodDistance
C#
public void SetSecondaryLodDistance(float lodDistance);
Parameters
NameTypeDefault
lodDistancefloat—
SetStreamingSystemvoid
# SetStreamingSystem
C#
public void SetStreamingSystem(VoxelLodTerrain.StreamingSystemEnum system);
Parameters
NameTypeDefault
systemVoxelLodTerrain.StreamingSystemEnum—
SetThreadedUpdateEnabledvoid
# SetThreadedUpdateEnabled
C#
public void SetThreadedUpdateEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetViewDistancevoid
# SetViewDistance
C#
public void SetViewDistance(int distanceInVoxels);
Parameters
NameTypeDefault
distanceInVoxelsint—
SetVoxelBoundsvoid
# SetVoxelBounds
C#
public void SetVoxelBounds(Aabb _UnnamedArg0);
Parameters
NameTypeDefault
_UnnamedArg0Aabb—
VoxelToDataBlockPositionVector3I
# VoxelToDataBlockPosition
C#
public Vector3I VoxelToDataBlockPosition(Vector3 voxelPosition, int lodIndex);

Converts a voxel position into a data block position for a specific LOD index.

Parameters
NameTypeDefault
voxelPositionVector3—
lodIndexint—
Returns Vector3I
VoxelToMeshBlockPositionVector3I
# VoxelToMeshBlockPosition
C#
public Vector3I VoxelToMeshBlockPosition(Vector3 voxelPosition, int lodIndex);

Converts a voxel position into a mesh block position for a specific LOD index.

Parameters
NameTypeDefault
voxelPositionVector3—
lodIndexint—
Returns Vector3I

VoxelLodTerrain.DebugDrawFlag

VoxelLodTerrain.ProcessCallback

ValueDescription
Disabled = 2

The node will not update. Use with caution!

Idle = 0

The node will use _process for the part of its logic running on the main thread.

Physics = 1

The node will use _physics_process for the part of its logic running on the main thread.

VoxelLodTerrain.StreamingSystemEnum

ValueDescription
Clipbox = 1

Loads chunks around the viewer in concentric boxes. Supports multiple viewers and collision-only viewers. This is a better system for multiplayer streaming. Due to simplifications, chunk locations at each LOD might be less optimal than VoxelLodTerrain.StreamingSystemEnum.LegacyOctree.

LegacyOctree = 0

Loads chunks around the viewer in a spherical pattern. Does not support multiple viewers. Does not support collision-only viewers. Does not support "no viewers" (will assume origin instead). Does not support per-viewer view distance, only VoxelLodTerrain.ViewDistance is used. This was the first system to be implemented, therefore it remains available as default for compatibility.

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.