godot_voxel/doc/source/api/VoxelGeneratorGraph.md
2021-05-31 17:23:29 +01:00

23 KiB

VoxelGeneratorGraph

Inherits: VoxelGenerator

Graph-based generator for smooth voxel worlds.

Description:

Generates SDF voxel data from a graph of operations.

Warning: methods to modify the graph should only be called from the main thread.

Properties:

Type Name Default
bool debug_block_clipping false
float sdf_clip_threshold 1.5
int subdivision_size 16
bool use_optimized_execution_map true
bool use_subdivision true
bool use_xz_caching true

Methods:

Return Signature
void add_connection ( int src_node_id, int src_port_index, int dst_node_id, int dst_port_index )
void bake_sphere_bumpmap ( Image im, float ref_radius, float sdf_min, float sdf_max )
void bake_sphere_normalmap ( Image im, float ref_radius, float strength )
bool can_connect ( int src_node_id, int src_port_index, int dst_node_id, int dst_port_index ) const
void clear ( )
Dictionary compile ( )
int create_node ( int type_id, Vector2 position, int id=0 )
Vector2 debug_analyze_range ( Vector3 min_pos, Vector3 max_pos ) const
void debug_load_waves_preset ( )
float debug_measure_microseconds_per_voxel ( bool use_singular_queries )
int find_node_by_name ( String name ) const
float generate_single ( Vector3 arg0 )
Array get_connections ( ) const
Variant get_node_default_input ( int node_id, int input_index ) const
Vector2 get_node_gui_position ( int node_id ) const
PoolIntArray get_node_ids ( ) const
Variant get_node_param ( int node_id, int param_index ) const
int get_node_type_count ( ) const
int get_node_type_id ( int node_id ) const
Dictionary get_node_type_info ( int type_id ) const
void remove_connection ( int src_node_id, int src_port_index, int dst_node_id, int dst_port_index )
void remove_node ( int node_id )
void set_node_default_input ( int node_id, int input_index, Variant value )
void set_node_gui_position ( int node_id, Vector2 position )
void set_node_param ( int node_id, int param_index, Variant value )
void set_node_param_null ( int node_id, int param_index )

Signals:

  • node_name_changed( int node_id )

Enumerations:

enum NodeTypeID:

  • NODE_CONSTANT = 0
  • NODE_INPUT_X = 1
  • NODE_INPUT_Y = 2
  • NODE_INPUT_Z = 3
  • NODE_OUTPUT_SDF = 4
  • NODE_ADD = 5
  • NODE_SUBTRACT = 6
  • NODE_MULTIPLY = 7
  • NODE_DIVIDE = 8
  • NODE_SIN = 9
  • NODE_FLOOR = 10
  • NODE_ABS = 11
  • NODE_SQRT = 12
  • NODE_FRACT = 13
  • NODE_STEPIFY = 14
  • NODE_WRAP = 15
  • NODE_MIN = 16
  • NODE_MAX = 17
  • NODE_DISTANCE_2D = 18
  • NODE_DISTANCE_3D = 19
  • NODE_CLAMP = 20
  • NODE_MIX = 21
  • NODE_REMAP = 22
  • NODE_SMOOTHSTEP = 23
  • NODE_CURVE = 24
  • NODE_SELECT = 25
  • NODE_NOISE_2D = 26
  • NODE_NOISE_3D = 27
  • NODE_IMAGE_2D = 28
  • NODE_SDF_PLANE = 29
  • NODE_SDF_BOX = 30
  • NODE_SDF_SPHERE = 31
  • NODE_SDF_TORUS = 32
  • NODE_SDF_PREVIEW = 33
  • NODE_SDF_SPHERE_HEIGHTMAP = 34
  • NODE_SDF_SMOOTH_UNION = 35
  • NODE_SDF_SMOOTH_SUBTRACT = 36
  • NODE_NORMALIZE_3D = 37
  • NODE_FAST_NOISE_2D = 38
  • NODE_FAST_NOISE_3D = 39
  • NODE_FAST_NOISE_GRADIENT_2D = 40
  • NODE_FAST_NOISE_GRADIENT_3D = 41
  • NODE_OUTPUT_WEIGHT = 42
  • NODE_TYPE_COUNT = 43

Property Descriptions

  • bool debug_block_clipping = false

  • float sdf_clip_threshold = 1.5

  • int subdivision_size = 16

  • bool use_optimized_execution_map = true

  • bool use_subdivision = true

  • bool use_xz_caching = true

Method Descriptions

Generated on May 31, 2021