VoxelLodTerrain

Inherits: VoxelNode

Voxel volume using variable level of detail.

Properties:

Type Name Default
int collision_layer 1
int collision_lod_count 0
int collision_mask 1
int collision_update_delay 0
bool generate_collisions true
int lod_count 4
float lod_distance 48.0
float lod_fade_duration 0.0
Material material
int mesh_block_size 16
VoxelMesher mesher
bool run_stream_in_editor true
int view_distance 512
AABB voxel_bounds AABB( -5.36871e+08, -5.36871e+08, -5.36871e+08, 1.07374e+09, 1.07374e+09, 1.07374e+09 )

Methods:

Return Signature
int debug_dump_as_scene ( String path ) const
int debug_get_data_block_count ( ) const
Dictionary debug_get_data_block_info ( Vector3 block_pos, int lod ) const
int debug_get_mesh_block_count ( ) const
Dictionary debug_get_mesh_block_info ( Vector3 block_pos, int lod ) const
Array debug_get_octrees_detailed ( ) const
Array debug_print_sdf_top_down ( Vector3 center, Vector3 extents ) const
Array debug_raycast_mesh_block ( Vector3 origin, Vector3 dir ) const
int get_data_block_region_extent ( ) const
int get_data_block_size ( ) const
int get_process_mode ( ) const
Dictionary get_statistics ( ) const
VoxelTool get_voxel_tool ( )
void save_modified_blocks ( )
void set_process_mode ( int mode )
Vector3 voxel_to_data_block_position ( Vector3 lod_index, int arg1 ) const
Vector3 voxel_to_mesh_block_position ( Vector3 lod_index, int arg1 ) const

Enumerations:

enum ProcessMode:

  • PROCESS_MODE_IDLE = 0
  • PROCESS_MODE_PHYSICS = 1
  • PROCESS_MODE_DISABLED = 2

Property Descriptions

  • int collision_layer = 1

  • int collision_lod_count = 0

  • int collision_mask = 1

  • int collision_update_delay = 0

  • bool generate_collisions = true

  • int lod_count = 4

  • float lod_distance = 48.0

  • float lod_fade_duration = 0.0

  • Material material

  • int mesh_block_size = 16

  • VoxelMesher mesher

  • bool run_stream_in_editor = true

  • int view_distance = 512

  • AABB voxel_bounds = AABB( -5.36871e+08, -5.36871e+08, -5.36871e+08, 1.07374e+09, 1.07374e+09, 1.07374e+09 )

Method Descriptions

Gets debug information about how much time is spent processing the terrain.

The returned dictionary has the following structure:

{
    "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
}

Generated on May 31, 2021