Documentation
¶
Overview ¶
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.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.
Index ¶
- type Advanced
- type Any
- type Extension
- func (self *Extension[T]) AsCameraAttributes() CameraAttributes.Instance
- func (self *Extension[T]) AsCameraAttributesPhysical() Instance
- func (self *Extension[T]) AsObject() [1]gd.Object
- func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
- func (self *Extension[T]) AsResource() Resource.Instance
- type ID
- type Instance
- func (self Instance) AsCameraAttributes() CameraAttributes.Instance
- func (self Instance) AsCameraAttributesPhysical() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) AutoExposureMaxExposureValue() Float.X
- func (self Instance) AutoExposureMinExposureValue() Float.X
- func (self Instance) ExposureAperture() Float.X
- func (self Instance) ExposureShutterSpeed() Float.X
- func (self Instance) FrustumFar() Float.X
- func (self Instance) FrustumFocalLength() Float.X
- func (self Instance) FrustumFocusDistance() Float.X
- func (self Instance) FrustumNear() Float.X
- func (self Instance) GetFov() Float.X
- func (self Instance) ID() ID
- func (self Instance) SetAutoExposureMaxExposureValue(value Float.X)
- func (self Instance) SetAutoExposureMinExposureValue(value Float.X)
- func (self Instance) SetExposureAperture(value Float.X)
- func (self Instance) SetExposureShutterSpeed(value Float.X)
- func (self Instance) SetFrustumFar(value Float.X)
- func (self Instance) SetFrustumFocalLength(value Float.X)
- func (self Instance) SetFrustumFocusDistance(value Float.X)
- func (self Instance) SetFrustumNear(value Float.X)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsCameraAttributes ¶
func (self *Extension[T]) AsCameraAttributes() CameraAttributes.Instance
func (*Extension[T]) AsCameraAttributesPhysical ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.CameraAttributesPhysical
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCameraAttributes ¶
func (self Instance) AsCameraAttributes() CameraAttributes.Instance
func (Instance) AsCameraAttributesPhysical ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) 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.
func (Instance) AutoExposureMinExposureValue ¶
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.
func (Instance) 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.
func (Instance) 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.
func (Instance) FrustumFar ¶
Override value for Camera3D.Far. Used internally when calculating depth of field. When attached to a Camera3D as its Camera3D.Attributes, it will override the Camera3D.Far property.
func (Instance) 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 Camera3D.Attributes, it will override the Camera3D.Fov property and the Camera3D.KeepAspect property.
func (Instance) 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.
func (Instance) FrustumNear ¶
Override value for Camera3D.Near. Used internally when calculating depth of field. When attached to a Camera3D as its Camera3D.Attributes, it will override the Camera3D.Near property.
func (Instance) GetFov ¶
Returns the vertical field of view that corresponds to the FrustumFocalLength. This value is calculated internally whenever FrustumFocalLength is changed.
func (Instance) SetAutoExposureMaxExposureValue ¶
SetAutoExposureMaxExposureValue sets the property returned by [GetAutoExposureMaxExposureValue].
func (Instance) SetAutoExposureMinExposureValue ¶
SetAutoExposureMinExposureValue sets the property returned by [GetAutoExposureMinExposureValue].
func (Instance) SetExposureAperture ¶
SetExposureAperture sets the property returned by [GetAperture].
func (Instance) SetExposureShutterSpeed ¶
SetExposureShutterSpeed sets the property returned by [GetShutterSpeed].
func (Instance) SetFrustumFar ¶
SetFrustumFar sets the property returned by [GetFar].
func (Instance) SetFrustumFocalLength ¶
SetFrustumFocalLength sets the property returned by [GetFocalLength].
func (Instance) SetFrustumFocusDistance ¶
SetFrustumFocusDistance sets the property returned by [GetFocusDistance].
func (Instance) SetFrustumNear ¶
SetFrustumNear sets the property returned by [GetNear].