UOverAnimComponent: Camera Safety and Readability
Header: OverAnimation/Runtime/OverAnimComponent.h
Camera Safety is a safety cap that only reduces excessive projected displacement. Camera Readability Correction adds bounded correction when already active OverAnim deformation appears shortened or thin due to camera projection. The two features can be enabled independently.
Details: Camera Safety
| UI name | C++ property | Default / range | Visibility condition | Effect |
|---|---|---|---|---|
| Enable Camera Safety Limit | bEnableScreenSpaceSilhouetteLimit |
false |
Always | Applies a projected-displacement cap to the fully composed result after asset and Region limits. Does not create new camera stylization. |
| Camera Safety Limit Mode | ScreenSpaceSilhouettePolicy |
Per-Region Ratio + Global Pixel Limit (RegionRelativeReadability) |
Camera Safety enabled | Global Pixel Limit uses only one pixel budget. Per-Region Ratio + Global Pixel Limit applies the Region projected-diameter ratio cap before the global cap. |
| Global Screen Displacement Limit (Pixels) | MaximumProjectedDisplacementPixels |
48.0 px / minimum 1.0 |
Camera Safety enabled | Absolute pixel cap applied to the fully composed OverAnim result from the primary local camera. |
| Per-Region Screen Displacement Ratio | MaximumProjectedRegionDisplacementRatio |
0.25 / 0.01–1.0 |
Camera Safety + RegionRelativeReadability |
Displacement cap relative to the Region's projected diameter. Computed before the global cap and scales with body size, camera distance, and FOV changes. |
EOverAnimScreenSpaceSilhouettePolicy
| Value | UI name | Meaning |
|---|---|---|
AbsolutePixelSafety |
Global Pixel Limit | Applies only Global Screen Displacement Limit (Pixels) to every composed point. |
RegionRelativeReadability |
Per-Region Ratio + Global Pixel Limit | Applies the Region on-screen-diameter ratio cap first, followed by the global pixel cap. |
Details: Camera Readability Correction
ViewDependentStylization is expanded in Details as a Show Only Inner Properties struct named Camera Readability Correction. Values passed through setters/shot overrides are sanitized to the ranges below; non-finite values are replaced by their defaults.
| UI name | C++ property | Default / range | Visibility condition | Effect |
|---|---|---|---|---|
| Enable Camera Readability Correction | bEnabled |
false |
Always | Corrects only when active deformation is weakened by camera projection. Does not create effects or change the source pose/collision. |
| Overall Readability Strength | Intensity |
1.0 / 0.0–1.0 |
bEnabled |
Multiplies the strength of all readability corrections below. Does not directly change the authored deformation amount. |
| Reveal Actions Pointing Into Camera | bEnableForeshortening |
true |
bEnabled |
Allows silhouette emphasis for actions along camera depth. |
| Depth Action Reveal Strength | ForeshorteningStrength |
0.2 / 0.0–1.0 |
bEnabled && bEnableForeshortening |
Readability emphasis added to camera-depth actions. 0 leaves authored deformation unchanged. |
| Depth Alignment Focus | AlignmentExponent |
2.0 / 0.1–8.0 |
bEnabled && bEnableForeshortening |
Higher values focus depth correction on actions more directly aligned with the camera. |
| Prevent Thin On-Screen Silhouettes | bEnableSilhouetteGuard |
true |
bEnabled |
Restores only missing screen-plane thickness for Regions thinned by active deformation. Does not enlarge unaffected Regions. |
| Minimum Retained Screen Thickness | MinimumSilhouetteThicknessRatio |
0.6 / 0.0–1.0 |
bEnabled && bEnableSilhouetteGuard |
Minimum on-screen thickness retained relative to the source Region silhouette. |
| Maximum Thickness Recovery Scale | MaximumSilhouetteCorrectionScale |
1.35 / 1.0–3.0 |
bEnabled && bEnableSilhouetteGuard |
Hard limit on thickness recovery, preventing camera correction from over-inflating a Region. |
| Reveal Hidden Depth Motion | DirectionReorientationStrength |
0.15 / 0.0–1.0 |
bEnabled |
Redirects some camera-depth displacement toward an already authored screen-plane direction. 0 preserves the authored direction. |
| Fade Camera Correction Near Frame Edge | bEnableFramingGuard |
true |
bEnabled |
Fades only the added camera correction as the Region approaches or leaves the viewport edge. Source animation and authored deformation remain. |
| Safe Frame Margin | FramingSafeMarginRatio |
0.05 / 0.0–0.25 |
bEnabled && bEnableFramingGuard |
Viewport margin relative to the shorter screen dimension. Correction reaches full strength inside this margin. |
| Frame Edge Fade Strength | FramingGuardStrength |
1.0 / 0.0–1.0 |
bEnabled && bEnableFramingGuard |
Amount of added camera correction removed at an unsafe edge. |
| Fade Camera Correction After Cuts | bEnableCameraCutGuard |
true |
bEnabled |
Fades Camera Readability Correction back in after a discontinuous camera change. Does not delay the Camera Safety cap. |
| Translation Cut Ratio | CameraCutTranslationRatio |
0.35 / 0.01–2.0 |
bEnabled && bEnableCameraCutGuard |
Treats a one-frame camera movement exceeding this ratio of current camera distance as a cut. |
| Rotation Cut Angle | CameraCutRotationAngleDegrees |
45 deg / 1–180 deg |
bEnabled && bEnableCameraCutGuard |
One-frame camera-rotation cut threshold. |
| Projection Scale Cut Ratio | CameraCutProjectionScaleRatio |
0.25 / 0.01–2.0 |
bEnabled && bEnableCameraCutGuard |
Treats a one-frame FOV, orthographic-width, or viewport-scale change exceeding this ratio as a cut. |
| Correction Fade-In Time | CameraCutRecoveryDuration |
0.08 s / 0.0–1.0 s |
bEnabled && bEnableCameraCutGuard |
Time to restore readability correction after a detected cut. |
Debug Details
| UI name | C++ property | Default / range | Visibility condition | Effect |
|---|---|---|---|---|
| Draw Camera Readability Correction | bDrawViewDependentStylizationDebug |
false |
Always | Draws Region action axis, camera alignment, and correction values for PIE/development diagnostics. |
| Camera Readability Draw Scale | ViewDependentStylizationDebugDrawScale |
60.0 cm / minimum 1.0 |
Draw Camera Readability Correction enabled | Debug-draw size. Does not affect runtime deformation. |
Blueprint API
| Blueprint name | C++ declaration | Input | Return | Preconditions, rejection, and state changes |
|---|---|---|---|---|
| Set Camera Safety Limit Enabled | void SetScreenSpaceSilhouetteLimitEnabled(bool bEnabled) |
enable flag | none | Changes Camera Safety state. After disabling, resets camera-projection-limit state if there is also no effective readability correction. |
| Get Camera Safety Limit Enabled | bool GetScreenSpaceSilhouetteLimitEnabled() const |
none | bool |
Returns only the stored Camera Safety enable value. |
| Set Camera Readability Correction Enabled | void SetViewDependentStylizationEnabled(bool bEnabled) |
enable flag | none | Changes base settings' bEnabled. After disabling, resets camera-projection-limit state if there is no active shot override or Camera Safety. |
| Get Camera Readability Correction Enabled | bool GetViewDependentStylizationEnabled() const |
none | bool |
Returns only base ViewDependentStylization.bEnabled. An active shot override may exist separately. |
| Set Camera Readability Correction Settings | void SetViewDependentStylizationSettings(const FOverAnimViewDependentStylizationSettings& Settings) |
complete settings struct | none | Sanitizes all numeric values to their ranges and stores them as base settings. Resets projection-limit state if base is disabled and no override or safety is active. |
| Get Camera Readability Correction Settings | FOverAnimViewDependentStylizationSettings GetViewDependentStylizationSettings() const |
none | copy of base settings | Returns base settings stored on the Component, not effective settings composed with shot overrides. |
| Push Camera Readability Shot Override | int32 PushViewDependentStylizationShotOverride(const FOverAnimViewDependentStylizationSettings& Settings, int32 Priority = 0, float BlendInDuration = 0.08f) |
settings, priority, blend-in time | positive handle | Sanitizes settings and adds an override. Non-finite/negative blend-in becomes 0; 0 gives immediate full weight. Sequentially blends in a stable order: lower priority first, then insertion order for equal priority. |
| Pop Camera Readability Shot Override | bool PopViewDependentStylizationShotOverride(int32 OverrideHandle, float BlendOutDuration = 0.08f) |
handle, blend-out time | true when found |
Returns false when no handle exists. Non-finite/negative duration becomes 0; 0 removes immediately, and a positive value removes after blend-out. |
| Clear Camera Readability Shot Overrides | void ClearViewDependentStylizationShotOverrides() |
none | none | Immediately removes all shot overrides. Also resets projection-limit state if both base readability and Camera Safety are disabled. |
C++ Projection Helpers
The following are static C++ helpers and do not change Component state.
| C++ declaration | Input | Return | Validation and calculation |
|---|---|---|---|
static FOverAnimViewDependentStylizationSettings BlendViewDependentStylizationSettings(const FOverAnimViewDependentStylizationSettings& From, const FOverAnimViewDependentStylizationSettings& To, float Alpha) |
two settings, alpha | sanitized, blended settings | Alpha <= 0 returns sanitized From; Alpha >= 1 returns sanitized To. Intermediate values linearly interpolate with master intensity and per-feature enables applied. |
static float CalculateScreenSpaceMaximumDisplacement(float CameraDepth, float HorizontalFieldOfViewDegrees, int32 ViewportWidthPixels, float MaximumProjectedDisplacementPixels) |
depth, horizontal FOV, viewport width, pixel limit | maximum world-space displacement | Invalid input returns MAX_flt, effectively applying no cap. Valid input returns pixels × depth / focalLengthPixels. |
static float CalculateHorizontalFocalLengthPixels(float HorizontalFieldOfViewDegrees, int32 ViewportWidthPixels) |
horizontal FOV, viewport width | focal length (px) | FOV must be finite, >0, and <179; width must be positive. Returns 0 when invalid or when the calculated result is not sufficiently large. |
static float CalculateOrthographicPixelsPerWorldUnit(float OrthographicWidth, int32 ViewportWidthPixels) |
ortho width, viewport width | pixels/world unit | Width and ortho width must be valid and positive; otherwise returns 0. |
If there is no primary player camera for camera projection, or projection scale is invalid, the Component resets camera-limit/readability runtime state.