CameraAttributesPhysical
Physically-based camera settings.
Physically-based camera settings.
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 Camera3D's Camera3D.Far, Camera3D.Near, Camera3D.Fov, and Camera3D.KeepAspect properties. When used in VoxelGI or LightmapGI, only the exposure settings will be used.
The default values are intended for use in an outdoor environment; tips for values to 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.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
CameraAttributesPhysicalConstructor
public CameraAttributesPhysical();Properties8
AutoExposureMaxExposureValueProperty
public float AutoExposureMaxExposureValue { get; set; }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.
AutoExposureMinExposureValueProperty
public float AutoExposureMinExposureValue { get; set; }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.
ExposureApertureProperty
public float ExposureAperture { get; set; }F-number, for example 2.8 for f/2.8. In physical mode, doubling it quarters fixed exposure. Also participates in depth-of-field calculations on a supported renderer; assigning a value does not guarantee visible blur.
ExposureShutterSpeedProperty
public float ExposureShutterSpeed { get; set; }Shutter speed in reciprocal seconds, including in C#: 50 means 1/50 second, not 50 seconds. With physical light units enabled, doubling this value halves fixed exposure. Does not affect exposure with physical mode disabled. Does not enable motion blur.
FrustumFarProperty
public float FrustumFar { get; set; }Far clipping distance in meters. Propagates to Camera3D.Far when physical attributes are assigned to the camera. Supply a value above FrustumNear; this is visibility clipping, not light range or focus distance.
FrustumFocalLengthProperty
public float FrustumFocalLength { get; set; }Focal length in millimeters. When the resource is assigned to Camera3D, determines its vertical FOV using a 36 × 24 mm sensor; a larger value narrows framing. Participates in depth of field but is not an exposure multiplier and does not move the camera.
FrustumFocusDistanceProperty
public float FrustumFocusDistance { get; set; }Focus distance in meters, not the lens focal length. For depth-of-field calculations, the implementation uses at least 1 mm beyond the lens focal length. Does not set near/far clipping or guarantee DOF on every renderer.
FrustumNearProperty
public float FrustumNear { get; set; }Near clipping distance in meters. Propagates to Camera3D.Near when physical attributes are assigned to the camera. Supply a positive value below FrustumFar; an excessively close near plane worsens depth-precision distribution.
Methods17
GetAperturefloat
public float GetAperture();Returns the current ExposureAperture value. F-number, for example 2.8 for f/2.8. In physical mode, doubling it quarters fixed exposure. Also participates in depth-of-field calculations on a supported renderer; assigning a value does not guarantee visible blur.
floatCurrent ExposureAperture value in the units described for that property.
GetAutoExposureMaxExposureValuefloat
public float GetAutoExposureMaxExposureValue();floatGetAutoExposureMinExposureValuefloat
public float GetAutoExposureMinExposureValue();floatGetFarfloat
public float GetFar();Returns the current FrustumFar value. Far clipping distance in meters. Propagates to Camera3D.Far when physical attributes are assigned to the camera. Supply a value above FrustumNear; this is visibility clipping, not light range or focus distance.
floatCurrent FrustumFar value in the units described for that property.
GetFocalLengthfloat
public float GetFocalLength();Returns the current FrustumFocalLength value. Focal length in millimeters. When the resource is assigned to Camera3D, determines its vertical FOV using a 36 × 24 mm sensor; a larger value narrows framing. Participates in depth of field but is not an exposure multiplier and does not move the camera.
floatCurrent FrustumFocalLength value in the units described for that property.
GetFocusDistancefloat
public float GetFocusDistance();Returns the current FrustumFocusDistance value. Focus distance in meters, not the lens focal length. For depth-of-field calculations, the implementation uses at least 1 mm beyond the lens focal length. Does not set near/far clipping or guarantee DOF on every renderer.
floatCurrent FrustumFocusDistance value in the units described for that property.
GetFovfloat
public float GetFov();Returns the vertical field of view that corresponds to the CameraAttributesPhysical.FrustumFocalLength. This value is calculated internally whenever CameraAttributesPhysical.FrustumFocalLength is changed.
floatGetNearfloat
public float GetNear();Returns the current FrustumNear value. Near clipping distance in meters. Propagates to Camera3D.Near when physical attributes are assigned to the camera. Supply a positive value below FrustumFar; an excessively close near plane worsens depth-precision distribution.
floatCurrent FrustumNear value in the units described for that property.
GetShutterSpeedfloat
public float GetShutterSpeed();Returns the current ExposureShutterSpeed value. Shutter speed in reciprocal seconds, including in C#: 50 means 1/50 second, not 50 seconds. With physical light units enabled, doubling this value halves fixed exposure. Does not affect exposure with physical mode disabled. Does not enable motion blur.
floatCurrent ExposureShutterSpeed value in the units described for that property.
SetAperturevoid
public void SetAperture(float aperture);Sets ExposureAperture. F-number, for example 2.8 for f/2.8. In physical mode, doubling it quarters fixed exposure. Also participates in depth-of-field calculations on a supported renderer; assigning a value does not guarantee visible blur.
| Name | Type | Default |
|---|---|---|
aperture | float | — |
apertureF-number, for example 2.8 for f/2.8. In physical mode, doubling it quarters fixed exposure. Also participates in depth-of-field calculations on a supported renderer; assigning a value does not guarantee visible blur.
SetAutoExposureMaxExposureValuevoid
public void SetAutoExposureMaxExposureValue(float exposureValueMax);| Name | Type | Default |
|---|---|---|
exposureValueMax | float | — |
SetAutoExposureMinExposureValuevoid
public void SetAutoExposureMinExposureValue(float exposureValueMin);| Name | Type | Default |
|---|---|---|
exposureValueMin | float | — |
SetFarvoid
public void SetFar(float far);Sets FrustumFar. Far clipping distance in meters. Propagates to Camera3D.Far when physical attributes are assigned to the camera. Supply a value above FrustumNear; this is visibility clipping, not light range or focus distance.
| Name | Type | Default |
|---|---|---|
far | float | — |
farFar clipping distance in meters. Propagates to Camera3D.Far when physical attributes are assigned to the camera. Supply a value above FrustumNear; this is visibility clipping, not light range or focus distance.
SetFocalLengthvoid
public void SetFocalLength(float focalLength);Sets FrustumFocalLength. Focal length in millimeters. When the resource is assigned to Camera3D, determines its vertical FOV using a 36 × 24 mm sensor; a larger value narrows framing. Participates in depth of field but is not an exposure multiplier and does not move the camera.
| Name | Type | Default |
|---|---|---|
focalLength | float | — |
focalLengthFocal length in millimeters. When the resource is assigned to Camera3D, determines its vertical FOV using a 36 × 24 mm sensor; a larger value narrows framing. Participates in depth of field but is not an exposure multiplier and does not move the camera.
SetFocusDistancevoid
public void SetFocusDistance(float focusDistance);Sets FrustumFocusDistance. Focus distance in meters, not the lens focal length. For depth-of-field calculations, the implementation uses at least 1 mm beyond the lens focal length. Does not set near/far clipping or guarantee DOF on every renderer.
| Name | Type | Default |
|---|---|---|
focusDistance | float | — |
focusDistanceFocus distance in meters, not the lens focal length. For depth-of-field calculations, the implementation uses at least 1 mm beyond the lens focal length. Does not set near/far clipping or guarantee DOF on every renderer.
SetNearvoid
public void SetNear(float near);Sets FrustumNear. Near clipping distance in meters. Propagates to Camera3D.Near when physical attributes are assigned to the camera. Supply a positive value below FrustumFar; an excessively close near plane worsens depth-precision distribution.
| Name | Type | Default |
|---|---|---|
near | float | — |
nearNear clipping distance in meters. Propagates to Camera3D.Near when physical attributes are assigned to the camera. Supply a positive value below FrustumFar; an excessively close near plane worsens depth-precision distribution.
SetShutterSpeedvoid
public void SetShutterSpeed(float shutterSpeed);Sets ExposureShutterSpeed. Shutter speed in reciprocal seconds, including in C#: 50 means 1/50 second, not 50 seconds. With physical light units enabled, doubling this value halves fixed exposure. Does not affect exposure with physical mode disabled. Does not enable motion blur.
| Name | Type | Default |
|---|---|---|
shutterSpeed | float | — |
shutterSpeedShutter speed in reciprocal seconds, including in C#: 50 means 1/50 second, not 50 seconds. With physical light units enabled, doubling this value halves fixed exposure. Does not affect exposure with physical mode disabled. Does not enable motion blur.