123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/VoxelGIData.xml.
- .. _class_VoxelGIData:
- VoxelGIData
- ===========
- **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- Contains baked voxel global illumination data for use in a :ref:`VoxelGI<class_VoxelGI>` node.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- **VoxelGIData** contains baked voxel global illumination for use in a :ref:`VoxelGI<class_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 :ref:`VoxelGI<class_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...**.
- .. rst-class:: classref-introduction-group
- Tutorials
- ---------
- - `Third Person Shooter (TPS) Demo <https://godotengine.org/asset-library/asset/2710>`__
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +---------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`bias<class_VoxelGIData_property_bias>` | ``1.5`` |
- +---------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`dynamic_range<class_VoxelGIData_property_dynamic_range>` | ``2.0`` |
- +---------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`energy<class_VoxelGIData_property_energy>` | ``1.0`` |
- +---------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`interior<class_VoxelGIData_property_interior>` | ``false`` |
- +---------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`normal_bias<class_VoxelGIData_property_normal_bias>` | ``0.0`` |
- +---------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`propagation<class_VoxelGIData_property_propagation>` | ``0.5`` |
- +---------------------------+--------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`use_two_bounces<class_VoxelGIData_property_use_two_bounces>` | ``true`` |
- +---------------------------+--------------------------------------------------------------------+-----------+
- .. rst-class:: classref-reftable-group
- Methods
- -------
- .. table::
- :widths: auto
- +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | |void| | :ref:`allocate<class_VoxelGIData_method_allocate>`\ (\ to_cell_xform\: :ref:`Transform3D<class_Transform3D>`, aabb\: :ref:`AABB<class_AABB>`, octree_size\: :ref:`Vector3<class_Vector3>`, octree_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, data_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, distance_field\: :ref:`PackedByteArray<class_PackedByteArray>`, level_counts\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) |
- +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`AABB<class_AABB>` | :ref:`get_bounds<class_VoxelGIData_method_get_bounds>`\ (\ ) |const| |
- +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_data_cells<class_VoxelGIData_method_get_data_cells>`\ (\ ) |const| |
- +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedInt32Array<class_PackedInt32Array>` | :ref:`get_level_counts<class_VoxelGIData_method_get_level_counts>`\ (\ ) |const| |
- +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`PackedByteArray<class_PackedByteArray>` | :ref:`get_octree_cells<class_VoxelGIData_method_get_octree_cells>`\ (\ ) |const| |
- +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Vector3<class_Vector3>` | :ref:`get_octree_size<class_VoxelGIData_method_get_octree_size>`\ (\ ) |const| |
- +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- | :ref:`Transform3D<class_Transform3D>` | :ref:`get_to_cell_xform<class_VoxelGIData_method_get_to_cell_xform>`\ (\ ) |const| |
- +-------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_VoxelGIData_property_bias:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **bias** = ``1.5`` :ref:`🔗<class_VoxelGIData_property_bias>`
- .. rst-class:: classref-property-setget
- - |void| **set_bias**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_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 :ref:`bias<class_VoxelGIData_property_bias>` to ``0.0`` and :ref:`normal_bias<class_VoxelGIData_property_normal_bias>` to a value between ``1.0`` and ``2.0``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_property_dynamic_range:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **dynamic_range** = ``2.0`` :ref:`🔗<class_VoxelGIData_property_dynamic_range>`
- .. rst-class:: classref-property-setget
- - |void| **set_dynamic_range**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_property_energy:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **energy** = ``1.0`` :ref:`🔗<class_VoxelGIData_property_energy>`
- .. rst-class:: classref-property-setget
- - |void| **set_energy**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_energy**\ (\ )
- The energy of the indirect lighting and reflections produced by the :ref:`VoxelGI<class_VoxelGI>` node. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing :ref:`propagation<class_VoxelGIData_property_propagation>` while increasing :ref:`energy<class_VoxelGIData_property_energy>` at the same time. See also :ref:`use_two_bounces<class_VoxelGIData_property_use_two_bounces>` which influences the indirect lighting's effective brightness.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_property_interior:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **interior** = ``false`` :ref:`🔗<class_VoxelGIData_property_interior>`
- .. rst-class:: classref-property-setget
- - |void| **set_interior**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_interior**\ (\ )
- If ``true``, :ref:`Environment<class_Environment>` lighting is ignored by the :ref:`VoxelGI<class_VoxelGI>` node. If ``false``, :ref:`Environment<class_Environment>` lighting is taken into account by the :ref:`VoxelGI<class_VoxelGI>` node. :ref:`Environment<class_Environment>` lighting updates in real-time, which means it can be changed without having to bake the :ref:`VoxelGI<class_VoxelGI>` node again.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_property_normal_bias:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **normal_bias** = ``0.0`` :ref:`🔗<class_VoxelGIData_property_normal_bias>`
- .. rst-class:: classref-property-setget
- - |void| **set_normal_bias**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_normal_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. See also :ref:`bias<class_VoxelGIData_property_bias>`. To prioritize hiding self-reflections over lighting quality, set :ref:`bias<class_VoxelGIData_property_bias>` to ``0.0`` and :ref:`normal_bias<class_VoxelGIData_property_normal_bias>` to a value between ``1.0`` and ``2.0``.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_property_propagation:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **propagation** = ``0.5`` :ref:`🔗<class_VoxelGIData_property_propagation>`
- .. rst-class:: classref-property-setget
- - |void| **set_propagation**\ (\ value\: :ref:`float<class_float>`\ )
- - :ref:`float<class_float>` **get_propagation**\ (\ )
- The multiplier to use when light bounces off a surface. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing :ref:`propagation<class_VoxelGIData_property_propagation>` while increasing :ref:`energy<class_VoxelGIData_property_energy>` at the same time. See also :ref:`use_two_bounces<class_VoxelGIData_property_use_two_bounces>` which influences the indirect lighting's effective brightness.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_property_use_two_bounces:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **use_two_bounces** = ``true`` :ref:`🔗<class_VoxelGIData_property_use_two_bounces>`
- .. rst-class:: classref-property-setget
- - |void| **set_use_two_bounces**\ (\ value\: :ref:`bool<class_bool>`\ )
- - :ref:`bool<class_bool>` **is_using_two_bounces**\ (\ )
- If ``true``, performs two bounces of indirect lighting instead of one. This makes indirect lighting look more natural and brighter at a small performance cost. The second bounce is also visible in reflections. If the scene appears too bright after enabling :ref:`use_two_bounces<class_VoxelGIData_property_use_two_bounces>`, adjust :ref:`propagation<class_VoxelGIData_property_propagation>` and :ref:`energy<class_VoxelGIData_property_energy>`.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _class_VoxelGIData_method_allocate:
- .. rst-class:: classref-method
- |void| **allocate**\ (\ to_cell_xform\: :ref:`Transform3D<class_Transform3D>`, aabb\: :ref:`AABB<class_AABB>`, octree_size\: :ref:`Vector3<class_Vector3>`, octree_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, data_cells\: :ref:`PackedByteArray<class_PackedByteArray>`, distance_field\: :ref:`PackedByteArray<class_PackedByteArray>`, level_counts\: :ref:`PackedInt32Array<class_PackedInt32Array>`\ ) :ref:`🔗<class_VoxelGIData_method_allocate>`
- .. container:: contribute
- There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_method_get_bounds:
- .. rst-class:: classref-method
- :ref:`AABB<class_AABB>` **get_bounds**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_bounds>`
- Returns the bounds of the baked voxel data as an :ref:`AABB<class_AABB>`, which should match :ref:`VoxelGI.size<class_VoxelGI_property_size>` after being baked (which only contains the size as a :ref:`Vector3<class_Vector3>`).
- \ **Note:** If the size was modified without baking the VoxelGI data, then the value of :ref:`get_bounds<class_VoxelGIData_method_get_bounds>` and :ref:`VoxelGI.size<class_VoxelGI_property_size>` will not match.
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_method_get_data_cells:
- .. rst-class:: classref-method
- :ref:`PackedByteArray<class_PackedByteArray>` **get_data_cells**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_data_cells>`
- .. container:: contribute
- There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_method_get_level_counts:
- .. rst-class:: classref-method
- :ref:`PackedInt32Array<class_PackedInt32Array>` **get_level_counts**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_level_counts>`
- .. container:: contribute
- There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_method_get_octree_cells:
- .. rst-class:: classref-method
- :ref:`PackedByteArray<class_PackedByteArray>` **get_octree_cells**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_octree_cells>`
- .. container:: contribute
- There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_method_get_octree_size:
- .. rst-class:: classref-method
- :ref:`Vector3<class_Vector3>` **get_octree_size**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_octree_size>`
- .. container:: contribute
- There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
- .. rst-class:: classref-item-separator
- ----
- .. _class_VoxelGIData_method_get_to_cell_xform:
- .. rst-class:: classref-method
- :ref:`Transform3D<class_Transform3D>` **get_to_cell_xform**\ (\ ) |const| :ref:`🔗<class_VoxelGIData_method_get_to_cell_xform>`
- .. container:: contribute
- There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|