class_cameraattributesphysical.rst 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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/CameraAttributesPhysical.xml.
  6. .. _class_CameraAttributesPhysical:
  7. CameraAttributesPhysical
  8. ========================
  9. **Inherits:** :ref:`CameraAttributes<class_CameraAttributes>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Physically-based camera settings.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **CameraAttributesPhysical** is used to set rendering settings based on a physically-based camera's settings. It is responsible for exposure, auto-exposure, and depth of field.
  15. When used in a :ref:`WorldEnvironment<class_WorldEnvironment>` it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own :ref:`CameraAttributes<class_CameraAttributes>`, including the editor camera. When used in a :ref:`Camera3D<class_Camera3D>` it will override any :ref:`CameraAttributes<class_CameraAttributes>` set in the :ref:`WorldEnvironment<class_WorldEnvironment>` and will override the :ref:`Camera3D<class_Camera3D>`\ s :ref:`Camera3D.far<class_Camera3D_property_far>`, :ref:`Camera3D.near<class_Camera3D_property_near>`, :ref:`Camera3D.fov<class_Camera3D_property_fov>`, and :ref:`Camera3D.keep_aspect<class_Camera3D_property_keep_aspect>` properties. When used in :ref:`VoxelGI<class_VoxelGI>` or :ref:`LightmapGI<class_LightmapGI>`, only the exposure settings will be used.
  16. The default settings are intended for use in an outdoor environment, tips for settings for use in an indoor environment can be found in each setting's documentation.
  17. \ **Note:** Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility.
  18. .. rst-class:: classref-introduction-group
  19. Tutorials
  20. ---------
  21. - :doc:`Physical light and camera units <../tutorials/3d/physical_light_and_camera_units>`
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
  28. | :ref:`float<class_float>` | :ref:`auto_exposure_max_exposure_value<class_CameraAttributesPhysical_property_auto_exposure_max_exposure_value>` | ``10.0`` |
  29. +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
  30. | :ref:`float<class_float>` | :ref:`auto_exposure_min_exposure_value<class_CameraAttributesPhysical_property_auto_exposure_min_exposure_value>` | ``-8.0`` |
  31. +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
  32. | :ref:`float<class_float>` | :ref:`exposure_aperture<class_CameraAttributesPhysical_property_exposure_aperture>` | ``16.0`` |
  33. +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
  34. | :ref:`float<class_float>` | :ref:`exposure_shutter_speed<class_CameraAttributesPhysical_property_exposure_shutter_speed>` | ``100.0`` |
  35. +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
  36. | :ref:`float<class_float>` | :ref:`frustum_far<class_CameraAttributesPhysical_property_frustum_far>` | ``4000.0`` |
  37. +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
  38. | :ref:`float<class_float>` | :ref:`frustum_focal_length<class_CameraAttributesPhysical_property_frustum_focal_length>` | ``35.0`` |
  39. +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
  40. | :ref:`float<class_float>` | :ref:`frustum_focus_distance<class_CameraAttributesPhysical_property_frustum_focus_distance>` | ``10.0`` |
  41. +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
  42. | :ref:`float<class_float>` | :ref:`frustum_near<class_CameraAttributesPhysical_property_frustum_near>` | ``0.05`` |
  43. +---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
  44. .. rst-class:: classref-reftable-group
  45. Methods
  46. -------
  47. .. table::
  48. :widths: auto
  49. +---------------------------+-----------------------------------------------------------------------------------+
  50. | :ref:`float<class_float>` | :ref:`get_fov<class_CameraAttributesPhysical_method_get_fov>` **(** **)** |const| |
  51. +---------------------------+-----------------------------------------------------------------------------------+
  52. .. rst-class:: classref-section-separator
  53. ----
  54. .. rst-class:: classref-descriptions-group
  55. Property Descriptions
  56. ---------------------
  57. .. _class_CameraAttributesPhysical_property_auto_exposure_max_exposure_value:
  58. .. rst-class:: classref-property
  59. :ref:`float<class_float>` **auto_exposure_max_exposure_value** = ``10.0``
  60. .. rst-class:: classref-property-setget
  61. - void **set_auto_exposure_max_exposure_value** **(** :ref:`float<class_float>` value **)**
  62. - :ref:`float<class_float>` **get_auto_exposure_max_exposure_value** **(** **)**
  63. The maximum luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright.
  64. .. rst-class:: classref-item-separator
  65. ----
  66. .. _class_CameraAttributesPhysical_property_auto_exposure_min_exposure_value:
  67. .. rst-class:: classref-property
  68. :ref:`float<class_float>` **auto_exposure_min_exposure_value** = ``-8.0``
  69. .. rst-class:: classref-property-setget
  70. - void **set_auto_exposure_min_exposure_value** **(** :ref:`float<class_float>` value **)**
  71. - :ref:`float<class_float>` **get_auto_exposure_min_exposure_value** **(** **)**
  72. The minimum luminance luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark.
  73. .. rst-class:: classref-item-separator
  74. ----
  75. .. _class_CameraAttributesPhysical_property_exposure_aperture:
  76. .. rst-class:: classref-property
  77. :ref:`float<class_float>` **exposure_aperture** = ``16.0``
  78. .. rst-class:: classref-property-setget
  79. - void **set_aperture** **(** :ref:`float<class_float>` value **)**
  80. - :ref:`float<class_float>` **get_aperture** **(** **)**
  81. Size of the aperture of the camera, measured in f-stops. An f-stop is a unitless ratio between the focal length of the camera and the diameter of the aperture. A high aperture setting will result in a smaller aperture which leads to a dimmer image and sharper focus. A low aperture results in a wide aperture which lets in more light resulting in a brighter, less-focused image. Default is appropriate for outdoors at daytime (i.e. for use with a default :ref:`DirectionalLight3D<class_DirectionalLight3D>`), for indoor lighting, a value between 2 and 4 is more appropriate.
  82. Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` is enabled.
  83. .. rst-class:: classref-item-separator
  84. ----
  85. .. _class_CameraAttributesPhysical_property_exposure_shutter_speed:
  86. .. rst-class:: classref-property
  87. :ref:`float<class_float>` **exposure_shutter_speed** = ``100.0``
  88. .. rst-class:: classref-property-setget
  89. - void **set_shutter_speed** **(** :ref:`float<class_float>` value **)**
  90. - :ref:`float<class_float>` **get_shutter_speed** **(** **)**
  91. Time for shutter to open and close, measured in seconds. A higher value will let in more light leading to a brighter image, while a lower amount will let in less light leading to a darker image.
  92. Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` is enabled.
  93. .. rst-class:: classref-item-separator
  94. ----
  95. .. _class_CameraAttributesPhysical_property_frustum_far:
  96. .. rst-class:: classref-property
  97. :ref:`float<class_float>` **frustum_far** = ``4000.0``
  98. .. rst-class:: classref-property-setget
  99. - void **set_far** **(** :ref:`float<class_float>` value **)**
  100. - :ref:`float<class_float>` **get_far** **(** **)**
  101. Override value for :ref:`Camera3D.far<class_Camera3D_property_far>`. Used internally when calculating depth of field. When attached to a :ref:`Camera3D<class_Camera3D>` as its :ref:`Camera3D.attributes<class_Camera3D_property_attributes>`, it will override the :ref:`Camera3D.far<class_Camera3D_property_far>` property.
  102. .. rst-class:: classref-item-separator
  103. ----
  104. .. _class_CameraAttributesPhysical_property_frustum_focal_length:
  105. .. rst-class:: classref-property
  106. :ref:`float<class_float>` **frustum_focal_length** = ``35.0``
  107. .. rst-class:: classref-property-setget
  108. - void **set_focal_length** **(** :ref:`float<class_float>` value **)**
  109. - :ref:`float<class_float>` **get_focal_length** **(** **)**
  110. Distance between camera lens and camera aperture, measured in millimeters. Controls field of view and depth of field. A larger focal length will result in a smaller field of view and a narrower depth of field meaning fewer objects will be in focus. A smaller focal length will result in a wider field of view and a larger depth of field meaning more objects will be in focus. When attached to a :ref:`Camera3D<class_Camera3D>` as its :ref:`Camera3D.attributes<class_Camera3D_property_attributes>`, it will override the :ref:`Camera3D.fov<class_Camera3D_property_fov>` property and the :ref:`Camera3D.keep_aspect<class_Camera3D_property_keep_aspect>` property.
  111. .. rst-class:: classref-item-separator
  112. ----
  113. .. _class_CameraAttributesPhysical_property_frustum_focus_distance:
  114. .. rst-class:: classref-property
  115. :ref:`float<class_float>` **frustum_focus_distance** = ``10.0``
  116. .. rst-class:: classref-property-setget
  117. - void **set_focus_distance** **(** :ref:`float<class_float>` value **)**
  118. - :ref:`float<class_float>` **get_focus_distance** **(** **)**
  119. Distance from camera of object that will be in focus, measured in meters. Internally this will be clamped to be at least 1 millimeter larger than :ref:`frustum_focal_length<class_CameraAttributesPhysical_property_frustum_focal_length>`.
  120. .. rst-class:: classref-item-separator
  121. ----
  122. .. _class_CameraAttributesPhysical_property_frustum_near:
  123. .. rst-class:: classref-property
  124. :ref:`float<class_float>` **frustum_near** = ``0.05``
  125. .. rst-class:: classref-property-setget
  126. - void **set_near** **(** :ref:`float<class_float>` value **)**
  127. - :ref:`float<class_float>` **get_near** **(** **)**
  128. Override value for :ref:`Camera3D.near<class_Camera3D_property_near>`. Used internally when calculating depth of field. When attached to a :ref:`Camera3D<class_Camera3D>` as its :ref:`Camera3D.attributes<class_Camera3D_property_attributes>`, it will override the :ref:`Camera3D.near<class_Camera3D_property_near>` property.
  129. .. rst-class:: classref-section-separator
  130. ----
  131. .. rst-class:: classref-descriptions-group
  132. Method Descriptions
  133. -------------------
  134. .. _class_CameraAttributesPhysical_method_get_fov:
  135. .. rst-class:: classref-method
  136. :ref:`float<class_float>` **get_fov** **(** **)** |const|
  137. Returns the vertical field of view that corresponds to the :ref:`frustum_focal_length<class_CameraAttributesPhysical_property_frustum_focal_length>`. This value is calculated internally whenever :ref:`frustum_focal_length<class_CameraAttributesPhysical_property_frustum_focal_length>` is changed.
  138. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  139. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  140. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  141. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  142. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  143. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  144. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`