#include <ComposableCameraCameraBase.h>
Camera pose state produced by node evaluation and consumed by the PCM.
Field categories:
-
Transform (Position, Rotation) — always lerped.
-
FOV dual-mode (FieldOfView, FocalLength) — a pose expresses FOV either in degrees (FieldOfView > 0) or via physical optics (FocalLength > 0), never both. Use GetEffectiveFieldOfView() to resolve to degrees. BlendBy() resolves both sides to degrees BEFORE lerping and emits a degrees-mode result (FocalLength = -1). See "FOV resolution invariant" in DesignDoc.
-
Physical camera (SensorWidth/Height, Aperture, FocusDistance, ISO, etc.) — always lerped; only applied to post-process when PhysicalCameraBlendWeight > 0 via ApplyPhysicalCameraSettings().
-
Projection & aspect (ProjectionMode, ConstrainAspectRatio, ...) — booleans and enums snap at 50% blend factor; numerics (OrthographicWidth etc.) lerp normally.
Sentinel semantics (<= 0 means "unset"):
-
FieldOfView: -1 means "use FocalLength".
-
FocusDistance: -1 means "no DoF override". These fields use LerpOptional semantics in BlendBy(): if one side is unset, the valid side's value is inherited across the blend rather than lerped through a meaningless range.
Public Attributes¶
| Return | Name | Description |
|---|---|---|
FVector |
Position |
|
FRotator |
Rotation |
|
double |
FieldOfView |
Horizontal FOV in degrees. If <= 0, FocalLength is used instead. |
float |
FocalLength |
Focal length in mm. If <= 0, FieldOfView (in degrees) is used instead. |
float |
SensorWidth |
Sensor width in mm. Super35 default. |
float |
SensorHeight |
Sensor height in mm. |
float |
Aperture |
Lens aperture in f-stops. Used for DoF when PhysicalCameraBlendWeight > 0. |
float |
FocusDistance |
Focus distance in world units. <= 0 means "no DoF override" (sentinel). |
float |
ShutterSpeed |
Shutter speed in 1/seconds. Used for auto-exposure when PhysicalCameraBlendWeight > 0. |
float |
ISO |
Sensor sensitivity in ISO. |
int32 |
DiaphragmBladeCount |
Number of blades in the lens diaphragm (affects bokeh shape). |
float |
SqueezeFactor |
Anamorphic squeeze factor. 1.0 = spherical. |
float |
Overscan |
Sensor overscan percentage (0 = none). |
float |
PhysicalCameraBlendWeight |
Blend weight for physical-camera post-process contribution. 0 = skip ApplyPhysicalCameraSettings entirely (no DoF/exposure override). 1 = apply physical settings at full strength. Naturally gates the fade-in of DoF during non-physical -> physical transitions. |
TEnumAsByte< ECameraProjectionMode::Type > |
ProjectionMode |
Projection mode (Perspective or Orthographic). Snapped at 50% blend. |
bool |
ConstrainAspectRatio |
Whether to constrain aspect ratio (letterbox). Snapped at 50% blend. |
bool |
OverrideAspectRatioAxisConstraint |
Whether to override the default aspect ratio axis constraint. Snapped at 50% blend. |
TEnumAsByte< EAspectRatioAxisConstraint > |
AspectRatioAxisConstraint |
Axis constraint (only honored when OverrideAspectRatioAxisConstraint is true). Snapped at 50% blend. |
float |
OrthographicWidth |
Orthographic view width in world units (only honored when ProjectionMode = Orthographic). |
float |
OrthoNearClipPlane |
Ortho near clip plane (only honored when ProjectionMode = Orthographic). |
float |
OrthoFarClipPlane |
Ortho far clip plane (only honored when ProjectionMode = Orthographic). |
Position¶
FVector Position { 0, 0, 0 }
Rotation¶
FRotator Rotation { 0, 0, 0 }
FieldOfView¶
double FieldOfView { -1.0 }
Horizontal FOV in degrees. If <= 0, FocalLength is used instead.
FocalLength¶
float FocalLength { 35.f }
Focal length in mm. If <= 0, FieldOfView (in degrees) is used instead.
SensorWidth¶
float SensorWidth { 24.89f }
Sensor width in mm. Super35 default.
SensorHeight¶
float SensorHeight { 18.67f }
Sensor height in mm.
Aperture¶
float Aperture { 2.8f }
Lens aperture in f-stops. Used for DoF when PhysicalCameraBlendWeight > 0.
FocusDistance¶
float FocusDistance { -1.f }
Focus distance in world units. <= 0 means "no DoF override" (sentinel).
ShutterSpeed¶
float ShutterSpeed { 60.f }
Shutter speed in 1/seconds. Used for auto-exposure when PhysicalCameraBlendWeight > 0.
ISO¶
float ISO { 100.f }
Sensor sensitivity in ISO.
DiaphragmBladeCount¶
int32 DiaphragmBladeCount { 8 }
Number of blades in the lens diaphragm (affects bokeh shape).
SqueezeFactor¶
float SqueezeFactor { 1.f }
Anamorphic squeeze factor. 1.0 = spherical.
Overscan¶
float Overscan { 0.f }
Sensor overscan percentage (0 = none).
PhysicalCameraBlendWeight¶
float PhysicalCameraBlendWeight { 0.f }
Blend weight for physical-camera post-process contribution. 0 = skip ApplyPhysicalCameraSettings entirely (no DoF/exposure override). 1 = apply physical settings at full strength. Naturally gates the fade-in of DoF during non-physical -> physical transitions.
ProjectionMode¶
TEnumAsByte< ECameraProjectionMode::Type > ProjectionMode { ECameraProjectionMode::Perspective }
Projection mode (Perspective or Orthographic). Snapped at 50% blend.
ConstrainAspectRatio¶
bool ConstrainAspectRatio { false }
Whether to constrain aspect ratio (letterbox). Snapped at 50% blend.
OverrideAspectRatioAxisConstraint¶
bool OverrideAspectRatioAxisConstraint { false }
Whether to override the default aspect ratio axis constraint. Snapped at 50% blend.
AspectRatioAxisConstraint¶
TEnumAsByte< EAspectRatioAxisConstraint > AspectRatioAxisConstraint { EAspectRatioAxisConstraint::AspectRatio_MaintainYFOV }
Axis constraint (only honored when OverrideAspectRatioAxisConstraint is true). Snapped at 50% blend.
OrthographicWidth¶
float OrthographicWidth { 512.f }
Orthographic view width in world units (only honored when ProjectionMode = Orthographic).
OrthoNearClipPlane¶
float OrthoNearClipPlane { 0.f }
Ortho near clip plane (only honored when ProjectionMode = Orthographic).
OrthoFarClipPlane¶
float OrthoFarClipPlane { 10000.f }
Ortho far clip plane (only honored when ProjectionMode = Orthographic).
Public Methods¶
| Return | Name | Description |
|---|---|---|
double |
GetEffectiveFieldOfView const |
Resolve the effective horizontal FOV in degrees. Uses FocalLength + SensorWidth if FocalLength > 0, otherwise uses FieldOfView directly. Falls back to a reasonable default if both are unset. |
void |
SetFieldOfViewDegrees |
Set FOV in degrees, clearing the FocalLength sentinel so this pose is unambiguously in degrees mode. Nodes that produce an FOV in degrees (like FieldOfViewNode) should call this instead of assigning FieldOfView directly. |
bool |
ApplyPhysicalCameraSettings const |
Apply physical-camera-derived settings (DoF, auto-exposure) to a post-process settings block. No-op if PhysicalCameraBlendWeight <= 0. Scales contribution by PhysicalCameraBlendWeight. Mirrors GameplayCameras' FCameraPose::ApplyPhysicalCameraSettings. |
void |
BlendBy |
Blend this pose toward Other by OtherWeight in [0, 1]. Blend rules (see struct comment for categories): |
GetEffectiveFieldOfView¶
const
double GetEffectiveFieldOfView() const
Resolve the effective horizontal FOV in degrees. Uses FocalLength + SensorWidth if FocalLength > 0, otherwise uses FieldOfView directly. Falls back to a reasonable default if both are unset.
SetFieldOfViewDegrees¶
void SetFieldOfViewDegrees(double InFieldOfViewDegrees)
Set FOV in degrees, clearing the FocalLength sentinel so this pose is unambiguously in degrees mode. Nodes that produce an FOV in degrees (like FieldOfViewNode) should call this instead of assigning FieldOfView directly.
ApplyPhysicalCameraSettings¶
const
bool ApplyPhysicalCameraSettings(FPostProcessSettings & PostProcessSettings, bool bOverwriteSettings) const
Apply physical-camera-derived settings (DoF, auto-exposure) to a post-process settings block. No-op if PhysicalCameraBlendWeight <= 0. Scales contribution by PhysicalCameraBlendWeight. Mirrors GameplayCameras' FCameraPose::ApplyPhysicalCameraSettings.
Parameters
-
PostProcessSettingsTarget to modify. -
bOverwriteSettingsIf true, overwrites already-set post-process entries; else only writes unset ones.
Returns
true if any settings were written, false if the call was a no-op.
BlendBy¶
void BlendBy(const FComposableCameraPose & Other, float OtherWeight)
Blend this pose toward Other by OtherWeight in [0, 1]. Blend rules (see struct comment for categories):
-
Position: linear lerp.
-
Rotation: delta-angle lerp (normalized).
-
FOV: resolve both sides via GetEffectiveFieldOfView(), lerp degrees, emit degrees-mode result (FocalLength = -1).
-
Physical numerics: linear lerp.
-
Sentinel fields (FocusDistance): LerpOptional — inherit valid side if the other is unset.
-
Projection booleans/enums: snap at OtherWeight >= 0.5.