class_bakedlightmap.rst 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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. Methods
  13. -------
  14. +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`BakeError<enum_BakedLightmap_BakeError>` | :ref:`bake<class_BakedLightmap_bake>` **(** :ref:`Node<class_Node>` from_node=null, :ref:`bool<class_bool>` create_visual_debug=false **)** |
  16. +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`debug_bake<class_BakedLightmap_debug_bake>` **(** **)** |
  18. +-------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
  19. Enumerations
  20. ------------
  21. .. _enum_BakedLightmap_BakeQuality:
  22. enum **BakeQuality**
  23. - **BAKE_QUALITY_LOW** = **0** --- Lowest bake quality mode. Fastest to calculate.
  24. - **BAKE_QUALITY_MEDIUM** = **1** --- Default bake quality mode.
  25. - **BAKE_QUALITY_HIGH** = **2** --- Highest bake quality mode. Takes longer to calculate.
  26. .. _enum_BakedLightmap_BakeError:
  27. enum **BakeError**
  28. - **BAKE_ERROR_OK** = **0**
  29. - **BAKE_ERROR_NO_SAVE_PATH** = **1**
  30. - **BAKE_ERROR_NO_MESHES** = **2**
  31. - **BAKE_ERROR_CANT_CREATE_IMAGE** = **3**
  32. - **BAKE_ERROR_USER_ABORTED** = **4**
  33. .. _enum_BakedLightmap_BakeMode:
  34. enum **BakeMode**
  35. - **BAKE_MODE_CONE_TRACE** = **0** --- Less precise but faster bake mode.
  36. - **BAKE_MODE_RAY_TRACE** = **1** --- More precise bake mode but can take considerably longer to bake.
  37. Description
  38. -----------
  39. 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.
  40. Tutorials
  41. ---------
  42. - :doc:`../tutorials/3d/baked_lightmaps`
  43. Property Descriptions
  44. ---------------------
  45. .. _class_BakedLightmap_bake_cell_size:
  46. - :ref:`float<class_float>` **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.
  47. .. _class_BakedLightmap_bake_energy:
  48. - :ref:`float<class_float>` **bake_energy**
  49. .. _class_BakedLightmap_bake_extents:
  50. - :ref:`Vector3<class_Vector3>` **bake_extents** - Size of affected area.
  51. .. _class_BakedLightmap_bake_hdr:
  52. - :ref:`bool<class_bool>` **bake_hdr** - If ``true`` lightmap can capture light values greater than ``1.0``. Turning this off will result in a smaller lightmap. Default value:``false``.
  53. .. _class_BakedLightmap_bake_mode:
  54. - :ref:`BakeMode<enum_BakedLightmap_BakeMode>` **bake_mode** - Lightmapping mode. See :ref:`BakeMode<enum_@GlobalScope_BakeMode>`.
  55. .. _class_BakedLightmap_bake_propagation:
  56. - :ref:`float<class_float>` **bake_propagation**
  57. .. _class_BakedLightmap_bake_quality:
  58. - :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>` **bake_quality** - Three quality modes are available. Higher quality requires more rendering time. See :ref:`BakeQuality<enum_@GlobalScope_BakeQuality>`.
  59. .. _class_BakedLightmap_capture_cell_size:
  60. - :ref:`float<class_float>` **capture_cell_size** - Grid size used for real-time capture information on dynamic objects. Cannot be larger than :ref:`bake_cell_size<class_BakedLightmap_bake_cell_size>`.
  61. .. _class_BakedLightmap_image_path:
  62. - :ref:`String<class_String>` **image_path** - Location where lightmaps will be saved.
  63. .. _class_BakedLightmap_light_data:
  64. - :ref:`BakedLightmapData<class_BakedLightmapData>` **light_data** - The calculated light data.
  65. Method Descriptions
  66. -------------------
  67. .. _class_BakedLightmap_bake:
  68. - :ref:`BakeError<enum_BakedLightmap_BakeError>` **bake** **(** :ref:`Node<class_Node>` from_node=null, :ref:`bool<class_bool>` create_visual_debug=false **)**
  69. .. _class_BakedLightmap_debug_bake:
  70. - void **debug_bake** **(** **)**