mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
241 lines
14 KiB
ReStructuredText
241 lines
14 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_CameraAttributesPhysical:
|
|
|
|
CameraAttributesPhysical
|
|
========================
|
|
|
|
**Hereda:** :ref:`CameraAttributes<class_CameraAttributes>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
|
|
|
Configuración de la cámara basada en la física.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Descripción
|
|
----------------------
|
|
|
|
**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.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
\ **Note:** Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
Tutoriales
|
|
--------------------
|
|
|
|
- :doc:`Unidades físicas de luz y cámara <../tutorials/3d/physical_light_and_camera_units>`
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Propiedades
|
|
----------------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
|
|
| :ref:`float<class_float>` | :ref:`auto_exposure_max_exposure_value<class_CameraAttributesPhysical_property_auto_exposure_max_exposure_value>` | ``10.0`` |
|
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
|
|
| :ref:`float<class_float>` | :ref:`auto_exposure_min_exposure_value<class_CameraAttributesPhysical_property_auto_exposure_min_exposure_value>` | ``-8.0`` |
|
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
|
|
| :ref:`float<class_float>` | :ref:`exposure_aperture<class_CameraAttributesPhysical_property_exposure_aperture>` | ``16.0`` |
|
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
|
|
| :ref:`float<class_float>` | :ref:`exposure_shutter_speed<class_CameraAttributesPhysical_property_exposure_shutter_speed>` | ``100.0`` |
|
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
|
|
| :ref:`float<class_float>` | :ref:`frustum_far<class_CameraAttributesPhysical_property_frustum_far>` | ``4000.0`` |
|
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
|
|
| :ref:`float<class_float>` | :ref:`frustum_focal_length<class_CameraAttributesPhysical_property_frustum_focal_length>` | ``35.0`` |
|
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
|
|
| :ref:`float<class_float>` | :ref:`frustum_focus_distance<class_CameraAttributesPhysical_property_frustum_focus_distance>` | ``10.0`` |
|
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
|
|
| :ref:`float<class_float>` | :ref:`frustum_near<class_CameraAttributesPhysical_property_frustum_near>` | ``0.05`` |
|
|
+---------------------------+-------------------------------------------------------------------------------------------------------------------+------------+
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
Métodos
|
|
--------------
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+---------------------------+-----------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`get_fov<class_CameraAttributesPhysical_method_get_fov>`\ (\ ) |const| |
|
|
+---------------------------+-----------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descripciones de Propiedades
|
|
--------------------------------------------------------
|
|
|
|
.. _class_CameraAttributesPhysical_property_auto_exposure_max_exposure_value:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **auto_exposure_max_exposure_value** = ``10.0`` :ref:`🔗<class_CameraAttributesPhysical_property_auto_exposure_max_exposure_value>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_auto_exposure_max_exposure_value**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_auto_exposure_max_exposure_value**\ (\ )
|
|
|
|
La luminancia máxima (en EV100) utilizada al calcular la exposición automática. Al calcular la luminancia media de la escena, los valores de color se limitarán a este valor como mínimo. Esto limita la exposición automática a exponer por debajo de un cierto brillo, lo que resulta en un punto de corte donde la escena permanecerá brillante.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CameraAttributesPhysical_property_auto_exposure_min_exposure_value:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **auto_exposure_min_exposure_value** = ``-8.0`` :ref:`🔗<class_CameraAttributesPhysical_property_auto_exposure_min_exposure_value>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_auto_exposure_min_exposure_value**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_auto_exposure_min_exposure_value**\ (\ )
|
|
|
|
La luminancia mínima (en EV100) utilizada al calcular la exposición automática. Al calcular la luminancia media de la escena, los valores de color se limitarán a este valor como mínimo. Esto limita la exposición automática a exponer por encima de un cierto brillo, lo que resulta en un punto de corte donde la escena permanecerá oscura.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CameraAttributesPhysical_property_exposure_aperture:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **exposure_aperture** = ``16.0`` :ref:`🔗<class_CameraAttributesPhysical_property_exposure_aperture>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_aperture**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_aperture**\ (\ )
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CameraAttributesPhysical_property_exposure_shutter_speed:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **exposure_shutter_speed** = ``100.0`` :ref:`🔗<class_CameraAttributesPhysical_property_exposure_shutter_speed>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_shutter_speed**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_shutter_speed**\ (\ )
|
|
|
|
Tiempo para que el obturador se abra y se cierre, evaluado como ``1 / velocidad_de_obturación`` segundos. Un valor más alto permitirá menos luz (lo que conducirá a una imagen más oscura), mientras que un valor más bajo permitirá más luz (lo que conducirá a una imagen más brillante).
|
|
|
|
Solo disponible cuando :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units<class_ProjectSettings_property_rendering/lights_and_shadows/use_physical_light_units>` está habilitado.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CameraAttributesPhysical_property_frustum_far:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **frustum_far** = ``4000.0`` :ref:`🔗<class_CameraAttributesPhysical_property_frustum_far>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_far**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_far**\ (\ )
|
|
|
|
Valor de reemplazo para :ref:`Camera3D.far<class_Camera3D_property_far>`. Se usa internamente al calcular la profundidad de campo. Cuando se adjunta a una :ref:`Camera3D<class_Camera3D>` como sus :ref:`Camera3D.attributes<class_Camera3D_property_attributes>`, reemplazará la propiedad :ref:`Camera3D.far<class_Camera3D_property_far>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CameraAttributesPhysical_property_frustum_focal_length:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **frustum_focal_length** = ``35.0`` :ref:`🔗<class_CameraAttributesPhysical_property_frustum_focal_length>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_focal_length**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_focal_length**\ (\ )
|
|
|
|
Distancia entre la lente de la cámara y la apertura de la cámara, medida en milímetros. Controla el campo de visión y la profundidad de campo. Una distancia focal mayor resultará en un campo de visión más pequeño y una profundidad de campo más estrecha, lo que significa que menos objetos estarán enfocados. Una distancia focal más pequeña resultará en un campo de visión más amplio y una profundidad de campo mayor, lo que significa que más objetos estarán enfocados. Cuando se adjunta a una :ref:`Camera3D<class_Camera3D>` como sus :ref:`Camera3D.attributes<class_Camera3D_property_attributes>`, sobrescribirá la propiedad :ref:`Camera3D.fov<class_Camera3D_property_fov>` y la propiedad :ref:`Camera3D.keep_aspect<class_Camera3D_property_keep_aspect>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CameraAttributesPhysical_property_frustum_focus_distance:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **frustum_focus_distance** = ``10.0`` :ref:`🔗<class_CameraAttributesPhysical_property_frustum_focus_distance>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_focus_distance**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_focus_distance**\ (\ )
|
|
|
|
Distancia desde la cámara del objeto que estará enfocado, medida en metros. Internamente, esto se sujetará para que sea al menos 1 milímetro más grande que :ref:`frustum_focal_length<class_CameraAttributesPhysical_property_frustum_focal_length>`.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_CameraAttributesPhysical_property_frustum_near:
|
|
|
|
.. rst-class:: classref-property
|
|
|
|
:ref:`float<class_float>` **frustum_near** = ``0.05`` :ref:`🔗<class_CameraAttributesPhysical_property_frustum_near>`
|
|
|
|
.. rst-class:: classref-property-setget
|
|
|
|
- |void| **set_near**\ (\ value\: :ref:`float<class_float>`\ )
|
|
- :ref:`float<class_float>` **get_near**\ (\ )
|
|
|
|
Valor de reemplazo para :ref:`Camera3D.near<class_Camera3D_property_near>`. Se usa internamente al calcular la profundidad de campo. Cuando se adjunta a una :ref:`Camera3D<class_Camera3D>` como sus :ref:`Camera3D.attributes<class_Camera3D_property_attributes>`, reemplazará la propiedad :ref:`Camera3D.near<class_Camera3D_property_near>`.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
Descripciones de Métodos
|
|
------------------------------------------------
|
|
|
|
.. _class_CameraAttributesPhysical_method_get_fov:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **get_fov**\ (\ ) |const| :ref:`🔗<class_CameraAttributesPhysical_method_get_fov>`
|
|
|
|
Devuelve el campo de visión vertical que corresponde a :ref:`frustum_focal_length<class_CameraAttributesPhysical_property_frustum_focal_length>`. Este valor se calcula internamente cada vez que se cambia :ref:`frustum_focal_length<class_CameraAttributesPhysical_property_frustum_focal_length>`.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (Normalmente, este método debería ser sobreescrito por el usuario para que tenga algún efecto.)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (Este método no tiene efectos secundarios. No modifica ninguna de las variables miembro de la instancia.)`
|
|
.. |vararg| replace:: :abbr:`vararg (Este método permite agregar cualquier número de argumentos después de los descritos aquí.)`
|
|
.. |constructor| replace:: :abbr:`constructor (Este método se utiliza para construir un tipo.)`
|
|
.. |static| replace:: :abbr:`static (Este método no necesita una instancia para ser llamado, por lo que puede llamarse directamente utilizando el nombre de la clase.)`
|
|
.. |operator| replace:: :abbr:`operator (Este método describe un operador válido para usar con este tipo como operando izquierdo.)`
|
|
.. |bitfield| replace:: :abbr:`BitField (Este valor es un entero compuesto como una máscara de bits de las siguientes banderas.)`
|
|
.. |void| replace:: :abbr:`void (Sin valor de retorno.)`
|