Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
CameraAttributesPhysical
繼承: CameraAttributes < Resource < RefCounted < Object
基於物理的相機設定。
說明
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 WorldEnvironment it provides default settings for exposure, auto-exposure, and depth of field that will be used by all cameras without their own CameraAttributes, including the editor camera. When used in a Camera3D it will override any CameraAttributes set in the WorldEnvironment and will override the Camera3Ds Camera3D.far, Camera3D.near, Camera3D.fov, and Camera3D.keep_aspect properties. When used in VoxelGI or 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.
Note: Auto-exposure is only supported in the Forward+ rendering method, not Mobile or Compatibility.
教學
屬性
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
方法
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()
The minimum 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.
float exposure_aperture = 16.0 🔗
相機光圈的大小,以 f 檔為單位進行測量。f 檔是相機焦距與光圈直徑之間的一個無單位比率。高光圈設定將產生一個更小的光圈,從而導致更暗的圖像和更清晰的焦點。低光圈會產生一個大光圈,讓更多的光線進入,從而產生一個更亮、更不聚焦的圖像。默認值適用於白天的室外(即與預設 DirectionalLight3D 一起使用),對於室內照明,2 到 4 之間的值更合適。
僅在啟用 ProjectSettings.rendering/lights_and_shadows/use_physical_light_units 時可用。
float exposure_shutter_speed = 100.0 🔗
Time for shutter to open and close, evaluated as 1 / shutter_speed seconds. A higher value will allow less light (leading to a darker image), while a lower value will allow more light (leading to a brighter image).
Only available when ProjectSettings.rendering/lights_and_shadows/use_physical_light_units is enabled.
覆蓋 Camera3D.far 的值。在內部計算景深時使用。當被附加到 Camera3D 作為其 Camera3D.attributes 時,它將覆蓋 Camera3D.fov 屬性。
float frustum_focal_length = 35.0 🔗
相機鏡頭和相機光圈之間的距離,單位:毫米。控制視野和景深。較大的焦距會導致較小的視野和較窄的景深,這意味著更少的對象將在焦點中。較小的焦距會導致更寬的視野和更大的景深,這意味著更多的物體將在焦點中。當被附加到 Camera3D 作為其 Camera3D.attributes 時,它將覆蓋 Camera3D.fov 屬性和 Camera3D.keep_aspect 屬性。
float frustum_focus_distance = 10.0 🔗
將在焦點中的物體與相機的距離,以米為單位進行測量。在內部,這將被鉗制為至少比 frustum_focal_length 大 1 毫米。
覆蓋 Camera3D.near 的值。在內部計算景深時使用。當被附加到 Camera3D 作為其 Camera3D.attributes 時,它將覆蓋 Camera3D.near 屬性。
方法說明
返回對應於 frustum_focal_length 的垂直視野。每當 frustum_focal_length 發生變化時,該值都會在內部計算。