Class CameraAttributesPhysical
- Namespace
- Godot
- Assembly
- GodotSharp.dll
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 Far, Near, Fov, and KeepAspect 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.
public class CameraAttributesPhysical : CameraAttributes, IDisposable
- Inheritance
-
CameraAttributesPhysical
- Implements
- Inherited Members
Constructors
CameraAttributesPhysical()
public CameraAttributesPhysical()
Properties
AutoExposureMaxExposureValue
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.
public float AutoExposureMaxExposureValue { get; set; }
Property Value
AutoExposureMinExposureValue
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.
public float AutoExposureMinExposureValue { get; set; }
Property Value
ExposureAperture
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 DirectionalLight3D), for indoor lighting, a value between 2 and 4 is more appropriate.
Only available when ProjectSettings.rendering/lights_and_shadows/use_physical_light_units
is enabled.
public float ExposureAperture { get; set; }
Property Value
ExposureShutterSpeed
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.
public float ExposureShutterSpeed { get; set; }
Property Value
FrustumFar
Override value for Far. Used internally when calculating depth of field. When attached to a Camera3D as its Attributes, it will override the Far property.
public float FrustumFar { get; set; }
Property Value
FrustumFocalLength
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 Camera3D as its Attributes, it will override the Fov property and the KeepAspect property.
public float FrustumFocalLength { get; set; }
Property Value
FrustumFocusDistance
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 FrustumFocalLength.
public float FrustumFocusDistance { get; set; }
Property Value
FrustumNear
Override value for Near. Used internally when calculating depth of field. When attached to a Camera3D as its Attributes, it will override the Near property.
public float FrustumNear { get; set; }
Property Value
Methods
GetFov()
Returns the vertical field of view that corresponds to the FrustumFocalLength. This value is calculated internally whenever FrustumFocalLength is changed.
public float GetFov()
Returns
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.