class_fogvolume.rst 5.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/FogVolume.xml.
  6. .. _class_FogVolume:
  7. FogVolume
  8. =========
  9. **Inherits:** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A node used to add local fog with the volumetric fog effect.
  11. Description
  12. -----------
  13. ``FogVolume``\ s are used to add localized fog into the global volumetric fog effect.
  14. Performance of ``FogVolume``\ s is directly related to their relative size on the screen and the complexity of their attached :ref:`FogMaterial<class_FogMaterial>`. It is best to keep ``FogVolume``\ s relatively small and simple where possible.
  15. Properties
  16. ----------
  17. +------------------------------------------------------------+----------------------------------------------------+----------------------+
  18. | :ref:`Vector3<class_Vector3>` | :ref:`extents<class_FogVolume_property_extents>` | ``Vector3(1, 1, 1)`` |
  19. +------------------------------------------------------------+----------------------------------------------------+----------------------+
  20. | :ref:`Material<class_Material>` | :ref:`material<class_FogVolume_property_material>` | |
  21. +------------------------------------------------------------+----------------------------------------------------+----------------------+
  22. | :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>` | :ref:`shape<class_FogVolume_property_shape>` | ``3`` |
  23. +------------------------------------------------------------+----------------------------------------------------+----------------------+
  24. Property Descriptions
  25. ---------------------
  26. .. _class_FogVolume_property_extents:
  27. - :ref:`Vector3<class_Vector3>` **extents**
  28. +-----------+----------------------+
  29. | *Default* | ``Vector3(1, 1, 1)`` |
  30. +-----------+----------------------+
  31. | *Setter* | set_extents(value) |
  32. +-----------+----------------------+
  33. | *Getter* | get_extents() |
  34. +-----------+----------------------+
  35. Sets the size of the ``FogVolume`` when :ref:`shape<class_FogVolume_property_shape>` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID<class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER>` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX<class_RenderingServer_constant_FOG_VOLUME_SHAPE_BOX>`.
  36. \ **Note:** Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing :ref:`ProjectSettings.rendering/environment/volumetric_fog/volume_depth<class_ProjectSettings_property_rendering/environment/volumetric_fog/volume_depth>` (at a performance cost) or by decreasing :ref:`Environment.volumetric_fog_length<class_Environment_property_volumetric_fog_length>` (at no performance cost, but at the cost of lower fog range). Alternatively, the ``FogVolume`` can be made thicker and use a lower density in the :ref:`material<class_FogVolume_property_material>`.
  37. \ **Note:** If :ref:`shape<class_FogVolume_property_shape>` is :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE>` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER>`, the cone/cylinder will be adjusted to fit within the extents. Non-uniform scaling of cone/cylinder shapes via the :ref:`extents<class_FogVolume_property_extents>` property is not supported, but you can scale the ``FogVolume`` node instead.
  38. ----
  39. .. _class_FogVolume_property_material:
  40. - :ref:`Material<class_Material>` **material**
  41. +----------+---------------------+
  42. | *Setter* | set_material(value) |
  43. +----------+---------------------+
  44. | *Getter* | get_material() |
  45. +----------+---------------------+
  46. Sets the :ref:`Material<class_Material>` to be used by the ``FogVolume``. Can be either a :ref:`FogMaterial<class_FogMaterial>` or a custom :ref:`ShaderMaterial<class_ShaderMaterial>`.
  47. ----
  48. .. _class_FogVolume_property_shape:
  49. - :ref:`FogVolumeShape<enum_RenderingServer_FogVolumeShape>` **shape**
  50. +-----------+------------------+
  51. | *Default* | ``3`` |
  52. +-----------+------------------+
  53. | *Setter* | set_shape(value) |
  54. +-----------+------------------+
  55. | *Getter* | get_shape() |
  56. +-----------+------------------+
  57. Sets the shape of the ``FogVolume`` to either :ref:`RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID<class_RenderingServer_constant_FOG_VOLUME_SHAPE_ELLIPSOID>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CONE<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CONE>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_CYLINDER<class_RenderingServer_constant_FOG_VOLUME_SHAPE_CYLINDER>`, :ref:`RenderingServer.FOG_VOLUME_SHAPE_BOX<class_RenderingServer_constant_FOG_VOLUME_SHAPE_BOX>` or :ref:`RenderingServer.FOG_VOLUME_SHAPE_WORLD<class_RenderingServer_constant_FOG_VOLUME_SHAPE_WORLD>`.
  58. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  59. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  60. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  61. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  62. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  63. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`