CameraAttributesPhysical

继承: CameraAttributes < Resource < RefCounted < Object

基于物理的摄像机设置。

描述

CameraAttributesPhysical用于根据基于物理的摄像机设置设置渲染设置。它负责曝光、自动曝光和景深。

当在WorldEnvironment中使用时,它提供了曝光、自动曝光和景深的默认设置,所有摄像机都将使用这些设置,而没有自己的CameraAttributes,包括编辑器摄像机。当在Camera中使用时,它将覆盖WorldEnvironment中设置的任何CameraAttributes,并将覆盖CameraCamera.farCamera.nearCamera.fovCamera.keep_aspect属性。当在VoxelGILightmass中使用时,将仅使用曝光设置。

默认设置用于室外环境,在室内环境中使用的设置提示可以在每个设置的文档中找到。

注意:仅在Forward+和Mobile渲染方法中支持景深模糊,不支持兼容性。

属性

方法

float

get_fov() const


属性说明

float auto_exposure_max_exposure_value = 10.0 🔗

  • void set_auto_exposure_max_exposure_value(value: float)

  • float get_auto_exposure_max_exposure_value()

计算自动曝光时使用的最大亮度(EV100)。当计算场景平均亮度时,颜色值将被限制在至少该值。这限制了自动曝光低于一定亮度,导致场景保持明亮的截止点。


float auto_exposure_min_exposure_value = -8.0 🔗

  • void set_auto_exposure_min_exposure_value(value: float)

  • float get_auto_exposure_min_exposure_value()

计算自动曝光时使用的最小亮度(在EV100中)。当计算场景平均亮度时,颜色值将被限制在至少该值。这限制了自动曝光高于一定亮度,导致场景保持黑暗的截止点。


float exposure_aperture = 16.0 🔗

  • void set_aperture(value: float)

  • float get_aperture()

摄像机光圈的大小,以f光圈为单位。f光圈是摄像机焦距和光圈直径之间的无单位比率。高光圈设置将导致较小的光圈,从而导致更暗的图像和更清晰的焦点。低光圈导致宽光圈,允许更多的光线进入,从而产生更亮、更不聚焦的图像。默认值适用于白天的户外(即与默认值DirectionalLight一起使用),对于室内照明,2到4之间的值更合适。

仅在启用ProjectSettings.rendering/lights_and_shadows/use_physical_light_units时可用。


float exposure_shutter_speed = 100.0 🔗

  • void set_shutter_speed(value: float)

  • float get_shutter_speed()

快门打开和关闭的时间,计算为1/shutter_speed秒。较高的值将允许较少的光线(导致较暗的图像),而较低的值将允许更多的光线(导致较亮的图像)。

仅在启用ProjectSettings.rendering/lights_and_shadows/use_physical_light_units时可用。


float frustum_far = 4000.0 🔗

覆盖Camera.far的值。计算景深时在内部使用。当附加到Camera作为其Camera.attributes时,它将覆盖Camera.far属性。


float frustum_focal_length = 35.0 🔗

  • void set_focal_length(value: float)

  • float get_focal_length()

摄像机镜头和摄像机光圈之间的距离,以毫米为单位。控制视野和景深。较大的焦距将导致较小的视野和较窄的景深,这意味着对焦的物体将更少。较小的焦距将导致更宽的视野和更大的景深,这意味着更多的物体将对焦。当附加到一个Camera作为其Camera.attributes时,它将覆盖Camera.fov属性和Camera.keep_aspect属性。


float frustum_focus_distance = 10.0 🔗

  • void set_focus_distance(value: float)

  • float get_focus_distance()

将聚焦的物体与摄像机的距离,以米为单位。在内部,这将被夹紧,至少比frustum_focal_length大1毫米。


float frustum_near = 0.05 🔗

覆盖Camera.near的值。计算景深时在内部使用。当附加到Camera作为其Camera.attributes时,它将覆盖Camera.near属性。


方法说明

float get_fov() const 🔗

返回frustum_focal_length对应的垂直视场。每当frustum_focal_length更改时,都会在内部计算此值。