class_giprobe.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the GIProbe.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_GIProbe:
  6. GIProbe
  7. =======
  8. **Inherits:** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. Real-time global illumination (GI) probe.
  10. Description
  11. -----------
  12. ``GIProbe``\ s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. ``GIProbe``\ s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked.
  13. Having ``GIProbe``\ s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the :ref:`ProjectSettings<class_ProjectSettings>` using :ref:`ProjectSettings.rendering/quality/gi_probes/quality<class_ProjectSettings_property_rendering/quality/gi_probes/quality>`.
  14. Tutorials
  15. ---------
  16. - :doc:`../tutorials/3d/gi_probes`
  17. Properties
  18. ----------
  19. +---------------------------------------+------------------------------------------------+---------------------------+
  20. | :ref:`GIProbeData<class_GIProbeData>` | :ref:`data<class_GIProbe_property_data>` | |
  21. +---------------------------------------+------------------------------------------------+---------------------------+
  22. | :ref:`Vector3<class_Vector3>` | :ref:`extents<class_GIProbe_property_extents>` | ``Vector3( 10, 10, 10 )`` |
  23. +---------------------------------------+------------------------------------------------+---------------------------+
  24. | :ref:`Subdiv<enum_GIProbe_Subdiv>` | :ref:`subdiv<class_GIProbe_property_subdiv>` | ``1`` |
  25. +---------------------------------------+------------------------------------------------+---------------------------+
  26. Methods
  27. -------
  28. +------+----------------------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`bake<class_GIProbe_method_bake>` **(** :ref:`Node<class_Node>` from_node=null, :ref:`bool<class_bool>` create_visual_debug=false **)** |
  30. +------+----------------------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`debug_bake<class_GIProbe_method_debug_bake>` **(** **)** |
  32. +------+----------------------------------------------------------------------------------------------------------------------------------------------+
  33. Enumerations
  34. ------------
  35. .. _enum_GIProbe_Subdiv:
  36. .. _class_GIProbe_constant_SUBDIV_64:
  37. .. _class_GIProbe_constant_SUBDIV_128:
  38. .. _class_GIProbe_constant_SUBDIV_256:
  39. .. _class_GIProbe_constant_SUBDIV_512:
  40. .. _class_GIProbe_constant_SUBDIV_MAX:
  41. enum **Subdiv**:
  42. - **SUBDIV_64** = **0** --- Use 64 subdivisions. This is the lowest quality setting, but the fastest. Use it if you can, but especially use it on lower-end hardware.
  43. - **SUBDIV_128** = **1** --- Use 128 subdivisions. This is the default quality setting.
  44. - **SUBDIV_256** = **2** --- Use 256 subdivisions.
  45. - **SUBDIV_512** = **3** --- Use 512 subdivisions. This is the highest quality setting, but the slowest. On lower-end hardware this could cause the GPU to stall.
  46. - **SUBDIV_MAX** = **4** --- Represents the size of the :ref:`Subdiv<enum_GIProbe_Subdiv>` enum.
  47. Property Descriptions
  48. ---------------------
  49. .. _class_GIProbe_property_data:
  50. - :ref:`GIProbeData<class_GIProbeData>` **data**
  51. +----------+-----------------------+
  52. | *Setter* | set_probe_data(value) |
  53. +----------+-----------------------+
  54. | *Getter* | get_probe_data() |
  55. +----------+-----------------------+
  56. The :ref:`GIProbeData<class_GIProbeData>` resource that holds the data for this ``GIProbe``.
  57. ----
  58. .. _class_GIProbe_property_extents:
  59. - :ref:`Vector3<class_Vector3>` **extents**
  60. +-----------+---------------------------+
  61. | *Default* | ``Vector3( 10, 10, 10 )`` |
  62. +-----------+---------------------------+
  63. | *Setter* | set_extents(value) |
  64. +-----------+---------------------------+
  65. | *Getter* | get_extents() |
  66. +-----------+---------------------------+
  67. The size of the area covered by the ``GIProbe``. If you make the extents larger without increasing the subdivisions with :ref:`subdiv<class_GIProbe_property_subdiv>`, the size of each cell will increase and result in lower detailed lighting.
  68. ----
  69. .. _class_GIProbe_property_subdiv:
  70. - :ref:`Subdiv<enum_GIProbe_Subdiv>` **subdiv**
  71. +-----------+-------------------+
  72. | *Default* | ``1`` |
  73. +-----------+-------------------+
  74. | *Setter* | set_subdiv(value) |
  75. +-----------+-------------------+
  76. | *Getter* | get_subdiv() |
  77. +-----------+-------------------+
  78. Number of times to subdivide the grid that the ``GIProbe`` operates on. A higher number results in finer detail and thus higher visual quality, while lower numbers result in better performance.
  79. Method Descriptions
  80. -------------------
  81. .. _class_GIProbe_method_bake:
  82. - void **bake** **(** :ref:`Node<class_Node>` from_node=null, :ref:`bool<class_bool>` create_visual_debug=false **)**
  83. Bakes the effect from all :ref:`GeometryInstance<class_GeometryInstance>`\ s marked with :ref:`GeometryInstance.use_in_baked_light<class_GeometryInstance_property_use_in_baked_light>` and :ref:`Light<class_Light>`\ s marked with either :ref:`Light.BAKE_INDIRECT<class_Light_constant_BAKE_INDIRECT>` or :ref:`Light.BAKE_ALL<class_Light_constant_BAKE_ALL>`. If ``create_visual_debug`` is ``true``, after baking the light, this will generate a :ref:`MultiMesh<class_MultiMesh>` that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the ``GIProbe``'s data and debug any issues that may be occurring.
  84. ----
  85. .. _class_GIProbe_method_debug_bake:
  86. - void **debug_bake** **(** **)**
  87. Calls :ref:`bake<class_GIProbe_method_bake>` with ``create_visual_debug`` enabled.