gi_probes.rst 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. .. _doc_gi_probes:
  2. Using GIProbe
  3. =============
  4. Introduction
  5. ------------
  6. .. note:: This feature is only available when using the GLES3 backend.
  7. :ref:`doc_baked_lightmaps` can be used as an alternative
  8. when using the GLES2 renderer.
  9. Just like with :ref:`doc_reflection_probes`, and as stated in
  10. the :ref:`doc_spatial_material`, objects can show reflected or diffuse light.
  11. GI Probes are similar to Reflection Probes, but they use a different and more
  12. complex technique to produce indirect light and reflections.
  13. The strength of GI Probes is real-time, high quality, indirect light. While the
  14. scene needs a quick pre-bake for the static objects that
  15. will be used, lights can be added, changed or removed, and this will be updated
  16. in real-time. Dynamic objects that move within one of these
  17. probes will also receive indirect lighting from the scene automatically.
  18. Just like with ``ReflectionProbe``, ``GIProbe`` can be blended (in a bit more limited
  19. way), so it is possible to provide full real-time lighting
  20. for a stage without having to resort to lightmaps.
  21. The main downsides of ``GIProbe`` are:
  22. - A small amount of light leaking can occur if the level is not carefully designed. This must be artist-tweaked.
  23. - Performance requirements are higher than for lightmaps, so it may not run properly in low-end integrated GPUs (may need to reduce resolution).
  24. - Reflections are voxelized, so they don't look as sharp as with ``ReflectionProbe``. However, in exchange they are volumetric, so any room size or shape works for them. Mixing them with Screen Space Reflection also works well.
  25. - They consume considerably more video memory than Reflection Probes, so they must be used with care in the right subdivision sizes.
  26. Setting up
  27. ----------
  28. Just like a ``ReflectionProbe``, simply set up the ``GIProbe`` by wrapping it around
  29. the geometry that will be affected.
  30. .. image:: img/giprobe_wrap.png
  31. Afterwards, make sure to enable the geometry will be baked. This is important in
  32. order for ``GIProbe`` to recognize objects, otherwise they will be ignored:
  33. .. image:: img/giprobe_bake_property.png
  34. Once the geometry is set up, push the Bake button that appears on the 3D editor
  35. toolbar to begin the pre-baking process:
  36. .. image:: img/giprobe_bake.png
  37. .. warning::
  38. Meshes should have sufficiently thick walls to avoid light leaks (avoid
  39. one-sided walls). For interior levels, enclose your level geometry in a
  40. sufficiently large box and bridge the loops to close the mesh.
  41. Adding lights
  42. -------------
  43. Unless there are materials with emission, ``GIProbe`` does nothing by default.
  44. Lights need to be added to the scene to have an effect.
  45. The effect of indirect light can be viewed quickly (it is recommended you turn
  46. off all ambient/sky lighting to tweak this, though, as shown below):
  47. .. image:: img/giprobe_indirect.png
  48. In some situations, though, indirect light may be too weak. Lights have an
  49. indirect multiplier to tweak this:
  50. .. image:: img/giprobe_light_indirect.png
  51. And, as ``GIProbe`` lighting updates in real-time, this effect is immediate:
  52. .. image:: img/giprobe_indirect_energy_result.png
  53. Reflections
  54. -----------
  55. For very metallic materials with low roughness, it's possible to appreciate
  56. voxel reflections. Keep in mind that these have far less detail than Reflection
  57. Probes or Screen Space Reflections, but fully reflect volumetrically.
  58. .. image:: img/giprobe_voxel_reflections.png
  59. ``GIProbe``\ s can be easily mixed with Reflection Probes and Screen Space Reflections,
  60. as a full 3-stage fallback-chain. This allows to have precise reflections where needed:
  61. .. image:: img/giprobe_ref_blending.png
  62. Interior vs exterior
  63. --------------------
  64. GI Probes normally allow mixing with lighting from the sky. This can be disabled
  65. when turning on the *Interior* setting.
  66. .. image:: img/giprobe_interior_setting.png
  67. The difference becomes clear in the image below, where light from the sky goes
  68. from spreading inside to being ignored.
  69. .. image:: img/giprobe_interior.png
  70. As complex buildings may mix interiors with exteriors, combining GIProbes
  71. for both parts works well.
  72. Tweaking
  73. --------
  74. GI Probes support a few parameters for tweaking:
  75. .. image:: img/giprobe_tweaking.png
  76. - **Subdiv** Subdivision used for the probe. The default (128) is generally good for small- to medium-sized areas. Bigger subdivisions use more memory.
  77. - **Extents** Size of the probe. Can be tweaked from the gizmo.
  78. - **Dynamic Range** Maximum light energy the probe can absorb. Higher values allow brighter light, but with less color detail.
  79. - **Energy** Multiplier for all the probe. Can be used to make the indirect light brighter (although it's better to tweak this from the light itself).
  80. - **Propagation** How much light propagates through the probe internally.
  81. - **Bias** Value used to avoid self-occlusion when doing voxel cone tracing, should generally be above 1.0 (1==voxel size).
  82. - **Normal Bias** Alternative type of bias useful for some scenes. Experiment with this one if regular bias does not work.
  83. - **Interior** Allows mixing with lighting from the sky.
  84. - **Compress** Currently broken. Do not use.
  85. - **Data** Contains the light baked data after baking. If you are saving the data it should be saved as a .res file.
  86. Quality
  87. -------
  88. ``GIProbe``\ s are quite demanding. It is possible to use lower quality voxel cone
  89. tracing in exchange for more performance.
  90. .. image:: img/giprobe_quality.png