class_bakedlightmap.rst 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. Member Functions
  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. Member Variables
  20. ----------------
  21. .. _class_BakedLightmap_bake_cell_size:
  22. - :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.
  23. .. _class_BakedLightmap_bake_energy:
  24. - :ref:`float<class_float>` **bake_energy**
  25. .. _class_BakedLightmap_bake_extents:
  26. - :ref:`Vector3<class_vector3>` **bake_extents** - Size of affected area.
  27. .. _class_BakedLightmap_bake_hdr:
  28. - :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``.
  29. .. _class_BakedLightmap_bake_mode:
  30. - :ref:`BakeMode<enum_bakedlightmap_bakemode>` **bake_mode** - Lightmapping mode. See :ref:`BakeMode<enum_@globalscope_bakemode>`.
  31. .. _class_BakedLightmap_bake_propagation:
  32. - :ref:`float<class_float>` **bake_propagation**
  33. .. _class_BakedLightmap_bake_quality:
  34. - :ref:`BakeQuality<enum_bakedlightmap_bakequality>` **bake_quality** - Three quality modes are available. Higher quality requires more rendering time. See :ref:`BakeQuality<enum_@globalscope_bakequality>`.
  35. .. _class_BakedLightmap_capture_cell_size:
  36. - :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>`.
  37. .. _class_BakedLightmap_image_path:
  38. - :ref:`String<class_string>` **image_path** - Location where lightmaps will be saved.
  39. .. _class_BakedLightmap_light_data:
  40. - :ref:`BakedLightmapData<class_bakedlightmapdata>` **light_data** - The calculated light data.
  41. Enums
  42. -----
  43. .. _enum_BakedLightmap_BakeQuality:
  44. enum **BakeQuality**
  45. - **BAKE_QUALITY_LOW** = **0** --- Lowest bake quality mode. Fastest to calculate.
  46. - **BAKE_QUALITY_MEDIUM** = **1** --- Default bake quality mode.
  47. - **BAKE_QUALITY_HIGH** = **2** --- Highest bake quality mode. Takes longer to calculate.
  48. .. _enum_BakedLightmap_BakeError:
  49. enum **BakeError**
  50. - **BAKE_ERROR_OK** = **0**
  51. - **BAKE_ERROR_NO_SAVE_PATH** = **1**
  52. - **BAKE_ERROR_NO_MESHES** = **2**
  53. - **BAKE_ERROR_CANT_CREATE_IMAGE** = **3**
  54. - **BAKE_ERROR_USER_ABORTED** = **4**
  55. .. _enum_BakedLightmap_BakeMode:
  56. enum **BakeMode**
  57. - **BAKE_MODE_CONE_TRACE** = **0** --- Less precise but faster bake mode.
  58. - **BAKE_MODE_RAY_TRACE** = **1** --- More precise bake mode but can take considerably longer to bake.
  59. Description
  60. -----------
  61. 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.
  62. Tutorials
  63. ---------
  64. - :doc:`../tutorials/3d/baked_lightmaps`
  65. Member Function Description
  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** **(** **)**