Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

CameraAttributes

继承: Resource < RefCounted < Object

派生: CameraAttributesPhysical, CameraAttributesPractical

相机设置的父类。

描述

控制相机的特定属性,如景深和曝光覆盖。

当在 WorldEnvironment 中使用时,它提供了曝光、自动曝光、以及景深的默认设置,这些设置将由所有没有自己的 CameraAttributes 的相机使用,包括编辑器相机。当在 Camera3D 中使用时,它将覆盖 WorldEnvironment 中设置的任何 CameraAttributes。当在 VoxelGILightmapGI 中使用时,将只会使用曝光设置。

另请参阅 Environment 了解一般的 3D 环境设置。

这是一个由 CameraAttributesPhysicalCameraAttributesPractical 继承的纯虚类。

属性

bool

auto_exposure_enabled

false

float

auto_exposure_scale

0.4

float

auto_exposure_speed

0.5

float

exposure_multiplier

1.0

float

exposure_sensitivity

100.0


属性说明

bool auto_exposure_enabled = false

  • void set_auto_exposure_enabled ( bool value )

  • bool is_auto_exposure_enabled ( )

如果为 true,启用场景渲染器的色调映射自动曝光模式。如果为 true,渲染器将自动确定曝光设置,以适应场景的照明和观察到的光线。


float auto_exposure_scale = 0.4

  • void set_auto_exposure_scale ( float value )

  • float get_auto_exposure_scale ( )

自动曝光效果的比例。影响自动曝光的强度。


float auto_exposure_speed = 0.5

  • void set_auto_exposure_speed ( float value )

  • float get_auto_exposure_speed ( )

自动曝光效果的速度。影响相机执行自动曝光所需的时间。


float exposure_multiplier = 1.0

  • void set_exposure_multiplier ( float value )

  • float get_exposure_multiplier ( )

曝光量的乘数。较高的值会产生较亮的图像。


float exposure_sensitivity = 100.0

  • void set_exposure_sensitivity ( float value )

  • float get_exposure_sensitivity ( )

相机传感器的灵敏度,以 ISO 测量。灵敏度越高,图像越亮。仅在启用 ProjectSettings.rendering/lights_and_shadows/use_physical_light_units 时可用。当 auto_exposure_enabled 启用时,这可以用作曝光补偿的方法,将该值加倍将使曝光值(以 EV100 测量)增加 1 档。