mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-08 19:29:06 +00:00
248 lines
9.8 KiB
ReStructuredText
248 lines
9.8 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the BakedLightmap.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_BakedLightmap:
|
|
|
|
BakedLightmap
|
|
=============
|
|
|
|
**Inherits:** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Prerendered indirect light map for a scene.
|
|
|
|
Properties
|
|
----------
|
|
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`bake_cell_size<class_BakedLightmap_property_bake_cell_size>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`bake_energy<class_BakedLightmap_property_bake_energy>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`bake_extents<class_BakedLightmap_property_bake_extents>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`bake_hdr<class_BakedLightmap_property_bake_hdr>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`BakeMode<enum_BakedLightmap_BakeMode>` | :ref:`bake_mode<class_BakedLightmap_property_bake_mode>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`bake_propagation<class_BakedLightmap_property_bake_propagation>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>` | :ref:`bake_quality<class_BakedLightmap_property_bake_quality>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`capture_cell_size<class_BakedLightmap_property_capture_cell_size>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`String<class_String>` | :ref:`image_path<class_BakedLightmap_property_image_path>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
| :ref:`BakedLightmapData<class_BakedLightmapData>` | :ref:`light_data<class_BakedLightmap_property_light_data>` |
|
|
+----------------------------------------------------+--------------------------------------------------------------------------+
|
|
|
|
Methods
|
|
-------
|
|
|
|
+------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`BakeError<enum_BakedLightmap_BakeError>` | :ref:`bake<class_BakedLightmap_method_bake>` **(** :ref:`Node<class_Node>` from_node=null, :ref:`bool<class_bool>` create_visual_debug=false **)** |
|
|
+------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`debug_bake<class_BakedLightmap_method_debug_bake>` **(** **)** |
|
|
+------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Enumerations
|
|
------------
|
|
|
|
.. _enum_BakedLightmap_BakeQuality:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_QUALITY_LOW:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_QUALITY_MEDIUM:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_QUALITY_HIGH:
|
|
|
|
enum **BakeQuality**:
|
|
|
|
- **BAKE_QUALITY_LOW** = **0** --- Lowest bake quality mode. Fastest to calculate.
|
|
|
|
- **BAKE_QUALITY_MEDIUM** = **1** --- Default bake quality mode.
|
|
|
|
- **BAKE_QUALITY_HIGH** = **2** --- Highest bake quality mode. Takes longer to calculate.
|
|
|
|
.. _enum_BakedLightmap_BakeMode:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_MODE_CONE_TRACE:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_MODE_RAY_TRACE:
|
|
|
|
enum **BakeMode**:
|
|
|
|
- **BAKE_MODE_CONE_TRACE** = **0** --- Less precise but faster bake mode.
|
|
|
|
- **BAKE_MODE_RAY_TRACE** = **1** --- More precise bake mode but can take considerably longer to bake.
|
|
|
|
.. _enum_BakedLightmap_BakeError:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_ERROR_OK:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_ERROR_NO_SAVE_PATH:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_ERROR_NO_MESHES:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_ERROR_CANT_CREATE_IMAGE:
|
|
|
|
.. _class_BakedLightmap_constant_BAKE_ERROR_USER_ABORTED:
|
|
|
|
enum **BakeError**:
|
|
|
|
- **BAKE_ERROR_OK** = **0**
|
|
|
|
- **BAKE_ERROR_NO_SAVE_PATH** = **1**
|
|
|
|
- **BAKE_ERROR_NO_MESHES** = **2**
|
|
|
|
- **BAKE_ERROR_CANT_CREATE_IMAGE** = **3**
|
|
|
|
- **BAKE_ERROR_USER_ABORTED** = **4**
|
|
|
|
Description
|
|
-----------
|
|
|
|
Baked lightmaps are an alternative workflow for adding indirect (or baked) lighting to a scene. Unlike the :ref:`GIProbe<class_GIProbe>` approach, baked lightmaps work fine on low-end PCs and mobile devices as they consume almost no resources in run-time.
|
|
|
|
Tutorials
|
|
---------
|
|
|
|
- :doc:`../tutorials/3d/baked_lightmaps`
|
|
|
|
Property Descriptions
|
|
---------------------
|
|
|
|
.. _class_BakedLightmap_property_bake_cell_size:
|
|
|
|
- :ref:`float<class_float>` **bake_cell_size**
|
|
|
|
+----------+---------------------------+
|
|
| *Setter* | set_bake_cell_size(value) |
|
|
+----------+---------------------------+
|
|
| *Getter* | get_bake_cell_size() |
|
|
+----------+---------------------------+
|
|
|
|
Grid subdivision size for lightmapper calculation. Default value of ``0.25`` will work for most cases. Increase for better lighting on small details or if your scene is very large.
|
|
|
|
.. _class_BakedLightmap_property_bake_energy:
|
|
|
|
- :ref:`float<class_float>` **bake_energy**
|
|
|
|
+----------+-------------------+
|
|
| *Setter* | set_energy(value) |
|
|
+----------+-------------------+
|
|
| *Getter* | get_energy() |
|
|
+----------+-------------------+
|
|
|
|
.. _class_BakedLightmap_property_bake_extents:
|
|
|
|
- :ref:`Vector3<class_Vector3>` **bake_extents**
|
|
|
|
+----------+--------------------+
|
|
| *Setter* | set_extents(value) |
|
|
+----------+--------------------+
|
|
| *Getter* | get_extents() |
|
|
+----------+--------------------+
|
|
|
|
Size of affected area.
|
|
|
|
.. _class_BakedLightmap_property_bake_hdr:
|
|
|
|
- :ref:`bool<class_bool>` **bake_hdr**
|
|
|
|
+----------+----------------+
|
|
| *Setter* | set_hdr(value) |
|
|
+----------+----------------+
|
|
| *Getter* | is_hdr() |
|
|
+----------+----------------+
|
|
|
|
If ``true``, lightmap can capture light values greater than ``1.0``. Turning this off will result in a smaller lightmap. Default value:``false``.
|
|
|
|
.. _class_BakedLightmap_property_bake_mode:
|
|
|
|
- :ref:`BakeMode<enum_BakedLightmap_BakeMode>` **bake_mode**
|
|
|
|
+----------+----------------------+
|
|
| *Setter* | set_bake_mode(value) |
|
|
+----------+----------------------+
|
|
| *Getter* | get_bake_mode() |
|
|
+----------+----------------------+
|
|
|
|
Lightmapping mode. See :ref:`BakeMode<enum_BakedLightmap_BakeMode>`.
|
|
|
|
.. _class_BakedLightmap_property_bake_propagation:
|
|
|
|
- :ref:`float<class_float>` **bake_propagation**
|
|
|
|
+----------+------------------------+
|
|
| *Setter* | set_propagation(value) |
|
|
+----------+------------------------+
|
|
| *Getter* | get_propagation() |
|
|
+----------+------------------------+
|
|
|
|
.. _class_BakedLightmap_property_bake_quality:
|
|
|
|
- :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>` **bake_quality**
|
|
|
|
+----------+-------------------------+
|
|
| *Setter* | set_bake_quality(value) |
|
|
+----------+-------------------------+
|
|
| *Getter* | get_bake_quality() |
|
|
+----------+-------------------------+
|
|
|
|
Three quality modes are available. Higher quality requires more rendering time. See :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>`.
|
|
|
|
.. _class_BakedLightmap_property_capture_cell_size:
|
|
|
|
- :ref:`float<class_float>` **capture_cell_size**
|
|
|
|
+----------+------------------------------+
|
|
| *Setter* | set_capture_cell_size(value) |
|
|
+----------+------------------------------+
|
|
| *Getter* | get_capture_cell_size() |
|
|
+----------+------------------------------+
|
|
|
|
Grid size used for real-time capture information on dynamic objects. Cannot be larger than :ref:`bake_cell_size<class_BakedLightmap_property_bake_cell_size>`.
|
|
|
|
.. _class_BakedLightmap_property_image_path:
|
|
|
|
- :ref:`String<class_String>` **image_path**
|
|
|
|
+----------+-----------------------+
|
|
| *Setter* | set_image_path(value) |
|
|
+----------+-----------------------+
|
|
| *Getter* | get_image_path() |
|
|
+----------+-----------------------+
|
|
|
|
Location where lightmaps will be saved.
|
|
|
|
.. _class_BakedLightmap_property_light_data:
|
|
|
|
- :ref:`BakedLightmapData<class_BakedLightmapData>` **light_data**
|
|
|
|
+----------+-----------------------+
|
|
| *Setter* | set_light_data(value) |
|
|
+----------+-----------------------+
|
|
| *Getter* | get_light_data() |
|
|
+----------+-----------------------+
|
|
|
|
The calculated light data.
|
|
|
|
Method Descriptions
|
|
-------------------
|
|
|
|
.. _class_BakedLightmap_method_bake:
|
|
|
|
- :ref:`BakeError<enum_BakedLightmap_BakeError>` **bake** **(** :ref:`Node<class_Node>` from_node=null, :ref:`bool<class_bool>` create_visual_debug=false **)**
|
|
|
|
.. _class_BakedLightmap_method_debug_bake:
|
|
|
|
- void **debug_bake** **(** **)**
|
|
|