class_bakedlightmap.rst 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the BakedLightmap.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_BakedLightmap:
  5. BakedLightmap
  6. =============
  7. **Inherits:** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Prerendered indirect light map for a scene.
  12. Properties
  13. ----------
  14. +----------------------------------------------------+--------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`bake_cell_size<class_BakedLightmap_property_bake_cell_size>` |
  16. +----------------------------------------------------+--------------------------------------------------------------------------+
  17. | :ref:`float<class_float>` | :ref:`bake_energy<class_BakedLightmap_property_bake_energy>` |
  18. +----------------------------------------------------+--------------------------------------------------------------------------+
  19. | :ref:`Vector3<class_Vector3>` | :ref:`bake_extents<class_BakedLightmap_property_bake_extents>` |
  20. +----------------------------------------------------+--------------------------------------------------------------------------+
  21. | :ref:`bool<class_bool>` | :ref:`bake_hdr<class_BakedLightmap_property_bake_hdr>` |
  22. +----------------------------------------------------+--------------------------------------------------------------------------+
  23. | :ref:`BakeMode<enum_BakedLightmap_BakeMode>` | :ref:`bake_mode<class_BakedLightmap_property_bake_mode>` |
  24. +----------------------------------------------------+--------------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`bake_propagation<class_BakedLightmap_property_bake_propagation>` |
  26. +----------------------------------------------------+--------------------------------------------------------------------------+
  27. | :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>` | :ref:`bake_quality<class_BakedLightmap_property_bake_quality>` |
  28. +----------------------------------------------------+--------------------------------------------------------------------------+
  29. | :ref:`float<class_float>` | :ref:`capture_cell_size<class_BakedLightmap_property_capture_cell_size>` |
  30. +----------------------------------------------------+--------------------------------------------------------------------------+
  31. | :ref:`String<class_String>` | :ref:`image_path<class_BakedLightmap_property_image_path>` |
  32. +----------------------------------------------------+--------------------------------------------------------------------------+
  33. | :ref:`BakedLightmapData<class_BakedLightmapData>` | :ref:`light_data<class_BakedLightmap_property_light_data>` |
  34. +----------------------------------------------------+--------------------------------------------------------------------------+
  35. Methods
  36. -------
  37. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :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 **)** |
  39. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`debug_bake<class_BakedLightmap_method_debug_bake>` **(** **)** |
  41. +------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
  42. Enumerations
  43. ------------
  44. .. _enum_BakedLightmap_BakeQuality:
  45. .. _class_BakedLightmap_constant_BAKE_QUALITY_LOW:
  46. .. _class_BakedLightmap_constant_BAKE_QUALITY_MEDIUM:
  47. .. _class_BakedLightmap_constant_BAKE_QUALITY_HIGH:
  48. enum **BakeQuality**:
  49. - **BAKE_QUALITY_LOW** = **0** --- Lowest bake quality mode. Fastest to calculate.
  50. - **BAKE_QUALITY_MEDIUM** = **1** --- Default bake quality mode.
  51. - **BAKE_QUALITY_HIGH** = **2** --- Highest bake quality mode. Takes longer to calculate.
  52. .. _enum_BakedLightmap_BakeMode:
  53. .. _class_BakedLightmap_constant_BAKE_MODE_CONE_TRACE:
  54. .. _class_BakedLightmap_constant_BAKE_MODE_RAY_TRACE:
  55. enum **BakeMode**:
  56. - **BAKE_MODE_CONE_TRACE** = **0** --- Less precise but faster bake mode.
  57. - **BAKE_MODE_RAY_TRACE** = **1** --- More precise bake mode but can take considerably longer to bake.
  58. .. _enum_BakedLightmap_BakeError:
  59. .. _class_BakedLightmap_constant_BAKE_ERROR_OK:
  60. .. _class_BakedLightmap_constant_BAKE_ERROR_NO_SAVE_PATH:
  61. .. _class_BakedLightmap_constant_BAKE_ERROR_NO_MESHES:
  62. .. _class_BakedLightmap_constant_BAKE_ERROR_CANT_CREATE_IMAGE:
  63. .. _class_BakedLightmap_constant_BAKE_ERROR_USER_ABORTED:
  64. enum **BakeError**:
  65. - **BAKE_ERROR_OK** = **0**
  66. - **BAKE_ERROR_NO_SAVE_PATH** = **1**
  67. - **BAKE_ERROR_NO_MESHES** = **2**
  68. - **BAKE_ERROR_CANT_CREATE_IMAGE** = **3**
  69. - **BAKE_ERROR_USER_ABORTED** = **4**
  70. Description
  71. -----------
  72. 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.
  73. Tutorials
  74. ---------
  75. - :doc:`../tutorials/3d/baked_lightmaps`
  76. Property Descriptions
  77. ---------------------
  78. .. _class_BakedLightmap_property_bake_cell_size:
  79. - :ref:`float<class_float>` **bake_cell_size**
  80. +----------+---------------------------+
  81. | *Setter* | set_bake_cell_size(value) |
  82. +----------+---------------------------+
  83. | *Getter* | get_bake_cell_size() |
  84. +----------+---------------------------+
  85. 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.
  86. .. _class_BakedLightmap_property_bake_energy:
  87. - :ref:`float<class_float>` **bake_energy**
  88. +----------+-------------------+
  89. | *Setter* | set_energy(value) |
  90. +----------+-------------------+
  91. | *Getter* | get_energy() |
  92. +----------+-------------------+
  93. .. _class_BakedLightmap_property_bake_extents:
  94. - :ref:`Vector3<class_Vector3>` **bake_extents**
  95. +----------+--------------------+
  96. | *Setter* | set_extents(value) |
  97. +----------+--------------------+
  98. | *Getter* | get_extents() |
  99. +----------+--------------------+
  100. Size of affected area.
  101. .. _class_BakedLightmap_property_bake_hdr:
  102. - :ref:`bool<class_bool>` **bake_hdr**
  103. +----------+----------------+
  104. | *Setter* | set_hdr(value) |
  105. +----------+----------------+
  106. | *Getter* | is_hdr() |
  107. +----------+----------------+
  108. If ``true``, lightmap can capture light values greater than ``1.0``. Turning this off will result in a smaller lightmap. Default value:``false``.
  109. .. _class_BakedLightmap_property_bake_mode:
  110. - :ref:`BakeMode<enum_BakedLightmap_BakeMode>` **bake_mode**
  111. +----------+----------------------+
  112. | *Setter* | set_bake_mode(value) |
  113. +----------+----------------------+
  114. | *Getter* | get_bake_mode() |
  115. +----------+----------------------+
  116. Lightmapping mode. See :ref:`BakeMode<enum_BakedLightmap_BakeMode>`.
  117. .. _class_BakedLightmap_property_bake_propagation:
  118. - :ref:`float<class_float>` **bake_propagation**
  119. +----------+------------------------+
  120. | *Setter* | set_propagation(value) |
  121. +----------+------------------------+
  122. | *Getter* | get_propagation() |
  123. +----------+------------------------+
  124. .. _class_BakedLightmap_property_bake_quality:
  125. - :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>` **bake_quality**
  126. +----------+-------------------------+
  127. | *Setter* | set_bake_quality(value) |
  128. +----------+-------------------------+
  129. | *Getter* | get_bake_quality() |
  130. +----------+-------------------------+
  131. Three quality modes are available. Higher quality requires more rendering time. See :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>`.
  132. .. _class_BakedLightmap_property_capture_cell_size:
  133. - :ref:`float<class_float>` **capture_cell_size**
  134. +----------+------------------------------+
  135. | *Setter* | set_capture_cell_size(value) |
  136. +----------+------------------------------+
  137. | *Getter* | get_capture_cell_size() |
  138. +----------+------------------------------+
  139. 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>`.
  140. .. _class_BakedLightmap_property_image_path:
  141. - :ref:`String<class_String>` **image_path**
  142. +----------+-----------------------+
  143. | *Setter* | set_image_path(value) |
  144. +----------+-----------------------+
  145. | *Getter* | get_image_path() |
  146. +----------+-----------------------+
  147. Location where lightmaps will be saved.
  148. .. _class_BakedLightmap_property_light_data:
  149. - :ref:`BakedLightmapData<class_BakedLightmapData>` **light_data**
  150. +----------+-----------------------+
  151. | *Setter* | set_light_data(value) |
  152. +----------+-----------------------+
  153. | *Getter* | get_light_data() |
  154. +----------+-----------------------+
  155. The calculated light data.
  156. Method Descriptions
  157. -------------------
  158. .. _class_BakedLightmap_method_bake:
  159. - :ref:`BakeError<enum_BakedLightmap_BakeError>` **bake** **(** :ref:`Node<class_Node>` from_node=null, :ref:`bool<class_bool>` create_visual_debug=false **)**
  160. .. _class_BakedLightmap_method_debug_bake:
  161. - void **debug_bake** **(** **)**