Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

VoxelGIData

Inherits: Resource < RefCounted < Object

Contains baked voxel global illumination data for use in a VoxelGI node.

Description

VoxelGIData contains baked voxel global illumination for use in a VoxelGI node. VoxelGIData also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the VoxelGI node again.

Note: To prevent text-based scene files (.tscn) from growing too much and becoming slow to load and save, always save VoxelGIData to an external binary resource file (.res) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the VoxelGIData resource, choosing Edit, clicking the floppy disk icon at the top of the Inspector then choosing Save As....

Tutorials

Properties

float

bias

1.5

float

dynamic_range

2.0

float

energy

1.0

bool

interior

false

float

normal_bias

0.0

float

propagation

0.5

bool

use_two_bounces

true

Methods

void

allocate ( Transform3D to_cell_xform, AABB aabb, Vector3 octree_size, PackedByteArray octree_cells, PackedByteArray data_cells, PackedByteArray distance_field, PackedInt32Array level_counts )

AABB

get_bounds ( ) const

PackedByteArray

get_data_cells ( ) const

PackedInt32Array

get_level_counts ( ) const

PackedByteArray

get_octree_cells ( ) const

Vector3

get_octree_size ( ) const

Transform3D

get_to_cell_xform ( ) const


Property Descriptions

float bias = 1.5

  • void set_bias ( float value )

  • float get_bias ( )

The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. To prioritize hiding self-reflections over lighting quality, set bias to 0.0 and normal_bias to a value between 1.0 and 2.0.


float dynamic_range = 2.0

  • void set_dynamic_range ( float value )

  • float get_dynamic_range ( )

The dynamic range to use (1.0 represents a low dynamic range scene brightness). Higher values can be used to provide brighter indirect lighting, at the cost of more visible color banding in dark areas (both in indirect lighting and reflections). To avoid color banding, it's recommended to use the lowest value that does not result in visible light clipping.


float energy = 1.0

  • void set_energy ( float value )

  • float get_energy ( )

The energy of the indirect lighting and reflections produced by the VoxelGI node. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing propagation while increasing energy at the same time. See also use_two_bounces which influences the indirect lighting's effective brightness.


bool interior = false

  • void set_interior ( bool value )