20 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.
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 ) |
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_NORMALIZE_3D = 35
- NODE_FAST_NOISE_2D = 36
- NODE_FAST_NOISE_3D = 37
- NODE_FAST_NOISE_GRADIENT_2D = 38
- NODE_FAST_NOISE_GRADIENT_3D = 39
- NODE_TYPE_COUNT = 40
Method Descriptions
-
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 )
-
void clear( )
-
Dictionary compile( )
-
void debug_load_waves_preset( )
-
float debug_measure_microseconds_per_voxel( bool use_singular_queries )
-
Array get_connections( )
-
Variant get_node_default_input( int node_id, int input_index )
-
PoolIntArray get_node_ids( )
-
int get_node_type_count( )
-
Dictionary get_node_type_info( int type_id )
-
void remove_connection( int src_node_id, int src_port_index, int dst_node_id, int dst_port_index )
-
void set_node_default_input( int node_id, int input_index, Variant value )
-
void set_node_param( int node_id, int param_index, Variant value )
Generated on Apr 10, 2021