UOverAnimComponent: Camera Safety와 Readability
헤더: OverAnimation/Runtime/OverAnimComponent.h
Camera Safety는 과도한 projected displacement를 줄이기만 하는 safety cap입니다. Camera Readability Correction은 이미 활성화된 OverAnim deformation이 camera projection 때문에 짧거나 얇게 보일 때 제한된 보정을 더합니다. 두 기능은 독립적으로 켜고 끌 수 있습니다.
Details: Camera Safety
| UI 이름 | C++ 속성 | 기본값 / 범위 | 표시 조건 | 영향 |
|---|---|---|---|---|
| Enable Camera Safety Limit | bEnableScreenSpaceSilhouetteLimit |
false |
항상 | asset 및 Region limit 뒤의 fully composed result에 projected-displacement cap을 적용합니다. camera stylization을 새로 만들지 않습니다. |
| Camera Safety Limit Mode | ScreenSpaceSilhouettePolicy |
Per-Region Ratio + Global Pixel Limit (RegionRelativeReadability) |
Camera Safety가 켜진 경우 | Global Pixel Limit은 하나의 pixel budget만 사용합니다. Per-Region Ratio + Global Pixel Limit은 Region projected diameter 비율 cap 후 global cap을 적용합니다. |
| Global Screen Displacement Limit (Pixels) | MaximumProjectedDisplacementPixels |
48.0 px / 최소 1.0 |
Camera Safety가 켜진 경우 | primary local camera에서 fully composed OverAnim 결과에 적용할 절대 pixel cap입니다. |
| Per-Region Screen Displacement Ratio | MaximumProjectedRegionDisplacementRatio |
0.25 / 0.01–1.0 |
Camera Safety + RegionRelativeReadability |
Region projected diameter에 대한 displacement cap입니다. global cap보다 먼저 계산되며 body size, camera distance, FOV 변화에 비례합니다. |
EOverAnimScreenSpaceSilhouettePolicy
| 값 | UI 이름 | 의미 |
|---|---|---|
AbsolutePixelSafety |
Global Pixel Limit | 모든 composed point에 Global Screen Displacement Limit (Pixels) 하나만 적용합니다. |
RegionRelativeReadability |
Per-Region Ratio + Global Pixel Limit | Region의 on-screen diameter 비율 cap을 먼저 적용한 뒤 global pixel cap을 적용합니다. |
Details: Camera Readability Correction
ViewDependentStylization은 Camera Readability Correction이라는 Show Only Inner Properties 구조체로 Details에 펼쳐집니다. setter/shot override로 들어온 값은 아래 범위로 sanitize되며 비유한 값은 각 기본값으로 대체됩니다.
| UI 이름 | C++ 속성 | 기본값 / 범위 | 표시 조건 | 영향 |
|---|---|---|---|---|
| Enable Camera Readability Correction | bEnabled |
false |
항상 | active deformation이 camera projection으로 약해질 때만 보정합니다. effect를 새로 만들거나 source pose·collision을 바꾸지 않습니다. |
| Overall Readability Strength | Intensity |
1.0 / 0.0–1.0 |
bEnabled |
아래 readability correction 전체의 강도를 곱합니다. authored deformation 양을 직접 바꾸지 않습니다. |
| Reveal Actions Pointing Into Camera | bEnableForeshortening |
true |
bEnabled |
camera 깊이 방향 action의 silhouette emphasis를 허용합니다. |
| Depth Action Reveal Strength | ForeshorteningStrength |
0.2 / 0.0–1.0 |
bEnabled && bEnableForeshortening |
camera depth 방향 action에 추가할 읽기 쉬운 강조량입니다. 0은 authored deformation을 그대로 둡니다. |
| Depth Alignment Focus | AlignmentExponent |
2.0 / 0.1–8.0 |
bEnabled && bEnableForeshortening |
값이 높을수록 camera와 더 직접 정렬된 action에만 depth correction을 집중합니다. |
| Prevent Thin On-Screen Silhouettes | bEnableSilhouetteGuard |
true |
bEnabled |
active deformation으로 얇아진 Region의 누락된 screen-plane thickness만 복원합니다. 영향 없는 Region을 키우지 않습니다. |
| Minimum Retained Screen Thickness | MinimumSilhouetteThicknessRatio |
0.6 / 0.0–1.0 |
bEnabled && bEnableSilhouetteGuard |
source Region silhouette에 대해 남겨 둘 최소 on-screen thickness 비율입니다. |
| Maximum Thickness Recovery Scale | MaximumSilhouetteCorrectionScale |
1.35 / 1.0–3.0 |
bEnabled && bEnableSilhouetteGuard |
thickness recovery의 hard limit입니다. camera correction이 Region을 과도하게 부풀리는 것을 막습니다. |
| Reveal Hidden Depth Motion | DirectionReorientationStrength |
0.15 / 0.0–1.0 |
bEnabled |
이미 authored된 screen-plane 방향 쪽으로 camera-depth displacement 일부를 재지정합니다. 0은 authored 방향을 보존합니다. |
| Fade Camera Correction Near Frame Edge | bEnableFramingGuard |
true |
bEnabled |
Region이 viewport edge에 접근하거나 나갈 때 추가된 camera correction만 fade합니다. source animation과 authored deformation은 유지됩니다. |
| Safe Frame Margin | FramingSafeMarginRatio |
0.05 / 0.0–0.25 |
bEnabled && bEnableFramingGuard |
짧은 screen dimension에 대한 viewport margin입니다. 이 안에서 correction이 완전 강도에 도달합니다. |
| Frame Edge Fade Strength | FramingGuardStrength |
1.0 / 0.0–1.0 |
bEnabled && bEnableFramingGuard |
unsafe edge에서 added camera correction을 제거하는 정도입니다. |
| Fade Camera Correction After Cuts | bEnableCameraCutGuard |
true |
bEnabled |
discontinuous camera change 뒤 camera readability correction을 다시 fade-in합니다. camera safety cap은 지연하지 않습니다. |
| Translation Cut Ratio | CameraCutTranslationRatio |
0.35 / 0.01–2.0 |
bEnabled && bEnableCameraCutGuard |
한 frame camera 이동이 현재 camera distance의 이 비율을 넘으면 cut으로 봅니다. |
| Rotation Cut Angle | CameraCutRotationAngleDegrees |
45 deg / 1–180 deg |
bEnabled && bEnableCameraCutGuard |
한 frame camera rotation cut 임계 각도입니다. |
| Projection Scale Cut Ratio | CameraCutProjectionScaleRatio |
0.25 / 0.01–2.0 |
bEnabled && bEnableCameraCutGuard |
FOV, orthographic width, viewport scale의 한 frame 변화가 이 비율을 넘으면 cut으로 봅니다. |
| Correction Fade-In Time | CameraCutRecoveryDuration |
0.08 s / 0.0–1.0 s |
bEnabled && bEnableCameraCutGuard |
감지한 cut 뒤 readability correction을 복원하는 시간입니다. |
Debug Details
| UI 이름 | C++ 속성 | 기본값 / 범위 | 표시 조건 | 영향 |
|---|---|---|---|---|
| Draw Camera Readability Correction | bDrawViewDependentStylizationDebug |
false |
항상 | PIE/development 진단용으로 Region action axis, camera alignment, correction 값을 그립니다. |
| Camera Readability Draw Scale | ViewDependentStylizationDebugDrawScale |
60.0 cm / 최소 1.0 |
Draw Camera Readability Correction이 켜진 경우 | debug draw 크기입니다. runtime deformation에는 영향을 주지 않습니다. |
Blueprint API
| Blueprint 이름 | C++ 선언 | 입력 | 반환 | 전제 조건·거부 및 상태 변화 |
|---|---|---|---|---|
| Set Camera Safety Limit Enabled | void SetScreenSpaceSilhouetteLimitEnabled(bool bEnabled) |
enable flag | 없음 | Camera Safety 상태를 바꿉니다. 끈 뒤 effective readability correction도 없으면 camera projection limit 상태를 reset합니다. |
| Get Camera Safety Limit Enabled | bool GetScreenSpaceSilhouetteLimitEnabled() const |
없음 | bool |
저장된 Camera Safety enable 값만 반환합니다. |
| Set Camera Readability Correction Enabled | void SetViewDependentStylizationEnabled(bool bEnabled) |
enable flag | 없음 | base settings의 bEnabled를 변경합니다. 끈 뒤 active shot override와 Camera Safety도 없으면 camera projection limit 상태를 reset합니다. |
| Get Camera Readability Correction Enabled | bool GetViewDependentStylizationEnabled() const |
없음 | bool |
base ViewDependentStylization.bEnabled만 반환합니다. active shot override가 별도로 있을 수 있습니다. |
| Set Camera Readability Correction Settings | void SetViewDependentStylizationSettings(const FOverAnimViewDependentStylizationSettings& Settings) |
전체 settings 구조체 | 없음 | 모든 수치값을 범위에 맞게 sanitize해 base settings에 저장합니다. base가 꺼져 있고 override·safety도 없으면 projection limit 상태를 reset합니다. |
| Get Camera Readability Correction Settings | FOverAnimViewDependentStylizationSettings GetViewDependentStylizationSettings() const |
없음 | base settings 복사본 | shot override를 합성한 effective settings가 아니라 Component에 저장된 base settings를 반환합니다. |
| Push Camera Readability Shot Override | int32 PushViewDependentStylizationShotOverride(const FOverAnimViewDependentStylizationSettings& Settings, int32 Priority = 0, float BlendInDuration = 0.08f) |
settings, priority, blend-in 시간 | 양수 handle | settings를 sanitize하고 override를 추가합니다. blend-in이 비유한수/음수면 0; 0이면 즉시 full weight입니다. priority가 낮은 override부터, 같은 priority에서는 추가 순서대로 안정 정렬하여 순차 blend합니다. |
| Pop Camera Readability Shot Override | bool PopViewDependentStylizationShotOverride(int32 OverrideHandle, float BlendOutDuration = 0.08f) |
handle, blend-out 시간 | 존재하면 true |
handle이 없으면 false입니다. duration이 비유한수/음수면 0; 0이면 즉시 제거하고, 양수면 blend-out 종료 시 제거합니다. |
| Clear Camera Readability Shot Overrides | void ClearViewDependentStylizationShotOverrides() |
없음 | 없음 | 모든 shot override를 즉시 제거합니다. base readability와 Camera Safety 모두 꺼져 있으면 projection limit 상태도 reset합니다. |
C++ projection helper
아래 함수는 static C++ helper이며 Component state를 바꾸지 않습니다.
| C++ 선언 | 입력 | 반환 | 유효성 및 계산 |
|---|---|---|---|
static FOverAnimViewDependentStylizationSettings BlendViewDependentStylizationSettings(const FOverAnimViewDependentStylizationSettings& From, const FOverAnimViewDependentStylizationSettings& To, float Alpha) |
두 settings, alpha | sanitize·blend된 settings | Alpha <= 0은 sanitize된 From, Alpha >= 1은 sanitize된 To입니다. 중간값은 master intensity·각 feature enable을 반영해 선형 보간합니다. |
static float CalculateScreenSpaceMaximumDisplacement(float CameraDepth, float HorizontalFieldOfViewDegrees, int32 ViewportWidthPixels, float MaximumProjectedDisplacementPixels) |
depth, horizontal FOV, viewport width, pixel limit | world-space 최대 displacement | 입력이 유효하지 않으면 MAX_flt로 사실상 cap을 적용하지 않습니다. 유효하면 pixels × depth / focalLengthPixels를 반환합니다. |
static float CalculateHorizontalFocalLengthPixels(float HorizontalFieldOfViewDegrees, int32 ViewportWidthPixels) |
horizontal FOV, viewport width | focal length(px) | FOV가 유한 >0, <179, width가 양수여야 합니다. 유효하지 않거나 계산 결과가 충분히 크지 않으면 0입니다. |
static float CalculateOrthographicPixelsPerWorldUnit(float OrthographicWidth, int32 ViewportWidthPixels) |
ortho width, viewport width | pixels/world unit | width와 ortho width가 유효·양수여야 합니다. 그렇지 않으면 0입니다. |
Camera projection을 계산할 primary player camera가 없거나 projection scale이 유효하지 않으면 Component는 camera limit/readability runtime state를 reset합니다.