Add Planar Capture System implementation checklist and developer reference
- Created a comprehensive implementation checklist for the Planar Capture System (Systems 136-147) detailing tasks across multiple phases including C++ core, material foundation, Blueprint actors, data assets, integration, and performance testing. - Added a developer reference document outlining the architecture, data flow, state machine, budget enforcement, render target pooling, horror features, integration points, multiplayer networking, performance characteristics, debugging methods, and build order for the capture systems. - Introduced examples of capture surface usage in the Project Void horror game, including specific implementations for mirrors, monitors, portals, and fake windows, along with a checklist for integration tasks.
This commit is contained in:
157
docs/blueprints/17-capture/136_BPC_PlanarCapture.md
Normal file
157
docs/blueprints/17-capture/136_BPC_PlanarCapture.md
Normal file
@@ -0,0 +1,157 @@
|
||||
# 136 — Planar Capture Component (`BPC_PlanarCapture`)
|
||||
|
||||
## Purpose
|
||||
Core capture component managing `USceneCaptureComponent2D` lifecycle for mirrors, portals, monitors, and horror surfaces. All camera math, render target management, and per-frame capture decisions happen here in C++ for performance.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `SS_PlanarCaptureManager` (138) for quality tier assignment and RT pool, `UPlanarCaptureCameraUtils` for camera math
|
||||
- **Required By:** `BP_PlanarCaptureActor` (137) — owned by parent actor
|
||||
- **Engine/Plugin Requirements:** Renderer, RenderCore modules
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Parent Class** | `ActorComponent` (C++ `UBPC_PlanarCapture`) |
|
||||
| **Class Type** | Blueprint Component (C++ Full Implementation) |
|
||||
| **Asset Path** | `Content/Framework/Capture/` |
|
||||
| **C++ Header** | `Source/PG_Framework/Public/Capture/BPC_PlanarCapture.h` |
|
||||
| **C++ Source** | `Source/PG_Framework/Private/Capture/BPC_PlanarCapture.cpp` |
|
||||
| **C++ Status** | ✅ Full Implementation |
|
||||
| **BP Asset** | None — use C++ component directly on actors |
|
||||
|
||||
## 1. Enums
|
||||
*Defined in `PlanarCaptureCommon.h` — see Architecture doc for full listing.*
|
||||
|
||||
| Enum | Values | Description |
|
||||
|------|--------|-------------|
|
||||
| `EPlanarCaptureMode` | Mirror, Portal, Monitor, HorrorMirror, HorrorPortal, FakeWindow | Capture surface mode |
|
||||
| `EPlanarCaptureQualityTier` | Off, Low, Medium, High, Hero | Quality tier levels |
|
||||
| `EPlanarCaptureInitResult` | Success, NoRenderTargetPool, InvalidSurfaceMesh, BudgetExceeded, ManagerUnavailable | Init result codes |
|
||||
|
||||
## 2. Structs
|
||||
*Defined in `PlanarCaptureCommon.h`*
|
||||
|
||||
### `FPlanarCaptureQualityProfile`
|
||||
| Field | Type | Default | Description |
|
||||
|-------|------|---------|-------------|
|
||||
| `RenderTargetSize` | int32 | 512 | Square RT resolution (256/512/1024/2048) |
|
||||
| `CaptureInterval` | float | 0.0667 | Min seconds between captures (~15fps default) |
|
||||
| `bEnableShadows` | bool | true | Shadow rendering toggle |
|
||||
| `bEnablePostProcess` | bool | false | Post-process toggle |
|
||||
| `bEnableFog` | bool | false | Exponential height fog toggle |
|
||||
| `bEnableBloom` | bool | false | Bloom toggle |
|
||||
| `bEnableAO` | bool | false | Ambient occlusion toggle |
|
||||
| `bEnableLumen` | bool | false | Lumen GI toggle (expensive) |
|
||||
| `bEnableMotionBlur` | bool | false | Motion blur toggle |
|
||||
| `bEnableClipPlane` | bool | true | Oblique near-plane toggle |
|
||||
| `DelayedFrameCount` | int32 | 0 | Horror delayed frame ring buffer size |
|
||||
|
||||
## 3. Variables
|
||||
|
||||
### Configuration (EditAnywhere, BlueprintReadOnly)
|
||||
| Variable | Type | Default | Category | Description |
|
||||
|----------|------|---------|----------|-------------|
|
||||
| `CaptureMode` | EPlanarCaptureMode | Mirror | `Capture\|Config` | Surface type |
|
||||
| `QualityProfiles` | TArray〈FPlanarCaptureQualityProfile〉 | 4 entries | `Capture\|Config` | Quality profiles per tier [0=Low,1=Med,2=High,3=Hero] |
|
||||
| `CaptureFOV` | float | 90.0 | `Capture\|Config` | Capture camera FOV |
|
||||
| `MaxViewDistance` | float | 5000.0 | `Capture\|Config` | Max render distance |
|
||||
| `ShowOnlyActors` | TArray〈FPlanarCaptureActorListEntry〉 | — | `Capture\|ActorLists` | Exclusive show actors |
|
||||
| `HiddenActors` | TArray〈FPlanarCaptureActorListEntry〉 | — | `Capture\|ActorLists` | Hidden actors |
|
||||
| `WrongReflectionActor` | TSoftObjectPtr〈AActor〉 | — | `Capture\|Horror` | Horror mode wrong reflection swap |
|
||||
| `SurfaceMeshComponent` | TSoftObjectPtr〈UStaticMeshComponent〉 | — | `Capture\|Config` | Mesh for clip plane calculation |
|
||||
| `LinkedTargetSurface` | TSoftObjectPtr〈ABP_PlanarCaptureActor〉 | — | `Capture\|Portal` | Portal destination surface |
|
||||
| `FixedCameraActor` | TSoftObjectPtr〈AActor〉 | — | `Capture\|Monitor` | Monitor fixed camera |
|
||||
|
||||
### Runtime (BlueprintReadOnly)
|
||||
| Variable | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `CurrentQualityTier` | EPlanarCaptureQualityTier | Assigned quality tier |
|
||||
| `bIsCapturing` | bool | Is capture currently active |
|
||||
| `CaptureRenderTarget` | UTextureRenderTarget2D* | Active render target |
|
||||
|
||||
## 4. Functions
|
||||
|
||||
### Public (BlueprintCallable)
|
||||
|
||||
#### `InitializeCapture()` → `EPlanarCaptureInitResult`
|
||||
- **Description:** Allocates RT from pool, creates USceneCaptureComponent2D, configures show flags
|
||||
- **Flow:** Request RT → Create SceneCapture → ApplyShowFlags → UpdateActorLists → Set bIsCapturing
|
||||
- **Nodes Used:** `RequestRenderTarget`, `CreateSceneCaptureComponent2D`, `ApplyShowFlags`, `UpdateActorLists`
|
||||
|
||||
#### `ShutdownCapture()`
|
||||
- **Description:** Stops capture, releases RT to pool, destroys SceneCapture2D
|
||||
- **Flow:** Set bIsCapturing=false → DestroyComponent → ReleaseRenderTarget → Clear ring buffer
|
||||
|
||||
#### `ApplyQualityTier(Tier: EPlanarCaptureQualityTier)`
|
||||
- **Description:** Apply a quality tier profile immediately. Called by SS_PlanarCaptureManager.
|
||||
- **Flow:** If Off → ShutdownCapture. If transitioning from Off → InitializeCapture. Else → UpdateShowFlags + ApplyProfile.
|
||||
|
||||
#### `CaptureNow()`
|
||||
- **Description:** Bypasses tick interval, captures immediately. Used for event-driven captures.
|
||||
- **Blueprint Authority:** Any (local)
|
||||
- **Flow:** Get viewer camera → ComputeCaptureCameraTransform → Set SceneCapture transform → CaptureScene → PushMPCParameters
|
||||
|
||||
#### `ActivateHorrorReflection()`
|
||||
- **Description:** Saves original ShowOnly list, swaps to WrongReflectionActor
|
||||
- **Flow:** Save ShowOnlyActors → Clear list → Add WrongReflectionActor → UpdateActorLists
|
||||
|
||||
#### `DeactivateHorrorReflection()`
|
||||
- **Description:** Restores original ShowOnly list after horror event
|
||||
- **Flow:** Clear list → Restore from SavedShowOnlyActors → UpdateActorLists
|
||||
|
||||
#### `SetScriptedPriority(Priority: float)`
|
||||
- **Description:** Scripted priority override (0.0-1.0). Higher values force higher quality tier.
|
||||
|
||||
#### `PushMPCParameters(MPC: UMaterialParameterCollection*)`
|
||||
- **Description:** Push all 10 MPC scalar parameters for surface material effects
|
||||
|
||||
### Compute (BlueprintPure)
|
||||
|
||||
#### `ComputeCaptureCameraTransform(ViewerCamera: FTransform)` → `FTransform`
|
||||
- **Description:** Computes capture camera position based on mode (mirror reflection, portal relative, etc.)
|
||||
|
||||
#### `GetCurrentScore()` → `FPlanarCaptureScore`
|
||||
- **Description:** Returns current composite quality score for this surface
|
||||
|
||||
## 5. Event Dispatchers
|
||||
| Dispatcher | Parameters | Description |
|
||||
|------------|-----------|-------------|
|
||||
| `OnCaptureQualityChanged` | OldTier, NewTier | Quality tier changed |
|
||||
| `OnCaptureInitialized` | Result: EPlanarCaptureInitResult | Init completed |
|
||||
| `OnCaptureRendered` | — | Each frame rendered |
|
||||
|
||||
## 6. Communication Matrix
|
||||
| Target System | Method | What |
|
||||
|---------------|--------|------|
|
||||
| `SS_PlanarCaptureManager` | Direct (cached reference) | RT requests, quality tier reception |
|
||||
| `BP_PlanarCaptureActor` | Direct (owner) | Surface mesh, MPC reference |
|
||||
| `UPlanarCaptureCameraUtils` | Static function calls | Mirror/portal/oblique math |
|
||||
| `USceneCaptureComponent2D` | Direct (owns) | Full lifecycle control |
|
||||
|
||||
## 7. Manual Implementation Guide
|
||||
|
||||
*The C++ component is fully functional. Blueprint users interact through the public API:*
|
||||
|
||||
1. To force a capture (e.g., on a sequencer event):
|
||||
```
|
||||
Get BPC_PlanarCapture → Call CaptureNow()
|
||||
```
|
||||
|
||||
2. To trigger a horror mirror wrong reflection:
|
||||
```
|
||||
Get BPC_PlanarCapture → Call ActivateHorrorReflection()
|
||||
Wait (duration from curve) → Call DeactivateHorrorReflection()
|
||||
```
|
||||
|
||||
3. To boost a specific mirror for a scare moment:
|
||||
```
|
||||
Get BPC_PlanarCapture → Call SetScriptedPriority(1.0)
|
||||
Wait (scare duration) → Call SetScriptedPriority(0.0)
|
||||
```
|
||||
|
||||
## 8. Build Checklist
|
||||
- [ ] C++ component compiled and functional
|
||||
- [ ] No BP child needed — attach directly to actor
|
||||
- [ ] Configure QualityProfiles array in component defaults (4 entries)
|
||||
- [ ] Set CaptureMode in component defaults
|
||||
- [ ] Assign SurfaceMeshComponent reference
|
||||
125
docs/blueprints/17-capture/137_BP_PlanarCaptureActor.md
Normal file
125
docs/blueprints/17-capture/137_BP_PlanarCaptureActor.md
Normal file
@@ -0,0 +1,125 @@
|
||||
# 137 — Planar Capture Actor (`BP_PlanarCaptureActor`)
|
||||
|
||||
## Purpose
|
||||
Placeable actor wrapping a `BPC_PlanarCapture` component. Owns the surface mesh, material dynamic instances, proximity trigger for quality scoring, and the capture component. Blueprint children (139-143) extend this for specific modes.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `BPC_PlanarCapture` (136), `SS_PlanarCaptureManager` (138)
|
||||
- **Required By:** `BP_Mirror` (139), `BP_Portal` (140), `BP_Monitor` (141), `BP_HorrorMirror` (142), `BP_FakeWindow` (143)
|
||||
- **Engine/Plugin Requirements:** Renderer module
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Parent Class** | `Actor` (C++ `ABP_PlanarCaptureActor`) |
|
||||
| **Class Type** | Blueprint Actor |
|
||||
| **Asset Path** | `Content/Framework/Capture/` |
|
||||
| **C++ Header** | `Source/PG_Framework/Public/Capture/BP_PlanarCaptureActor.h` |
|
||||
| **C++ Status** | ✅ Full Implementation |
|
||||
| **BP Asset** | BP children: `BP_Mirror`, `BP_Portal`, `BP_Monitor`, `BP_HorrorMirror`, `BP_FakeWindow` |
|
||||
|
||||
## 1. Components
|
||||
| Component | Type | Description |
|
||||
|-----------|------|-------------|
|
||||
| `Root` | SceneComponent | Root transform |
|
||||
| `SurfaceMesh` | StaticMeshComponent | Surface plane/quad mesh, collision enabled |
|
||||
| `ProximityTrigger` | BoxComponent | Overlap volume for player proximity scoring (500x500x500 default) |
|
||||
| `CaptureComponent` | UBPC_PlanarCapture | Core capture logic |
|
||||
|
||||
## 2. Variables
|
||||
|
||||
### Configuration
|
||||
| Variable | Type | Default | Category | Description |
|
||||
|----------|------|---------|----------|-------------|
|
||||
| `SurfaceDisplayName` | FString | "" | `Capture\|Config` | Debug/display name |
|
||||
| `bStartEnabled` | bool | true | `Capture\|Config` | Start active on BeginPlay |
|
||||
| `bDestructible` | bool | false | `Capture\|Config` | Can be destroyed (shattered mirror) |
|
||||
| `SurfaceMPC` | UMaterialParameterCollection* | — | `Capture\|Material` | Global MPC reference |
|
||||
|
||||
### Runtime
|
||||
| Variable | Type | Description |
|
||||
|----------|------|-------------|
|
||||
| `bIsActive` | bool | Current active state |
|
||||
| `SurfaceMaterialInstance` | UMaterialInstanceDynamic* | Created dynamic material instance |
|
||||
|
||||
### Replicated
|
||||
| Variable | Type | Condition | Description |
|
||||
|----------|------|-----------|-------------|
|
||||
| `bRepIsActive` | bool | ReplicatedUsing OnRep_IsActive | Server-authoritative active state |
|
||||
|
||||
## 3. Functions
|
||||
|
||||
#### `EnableSurface()`
|
||||
- **Description:** Activates the surface, initializes capture component
|
||||
- **Flow:** Set bIsActive=true → CaptureComponent.InitializeCapture()
|
||||
|
||||
#### `DisableSurface()`
|
||||
- **Description:** Deactivates the surface, shuts down capture
|
||||
- **Flow:** Set bIsActive=false → CaptureComponent.ShutdownCapture()
|
||||
|
||||
#### `SetCaptureMode(NewMode: EPlanarCaptureMode)`
|
||||
- **Description:** Change capture mode at runtime
|
||||
- **Flow:** Shutdown → Change CaptureComponent.CaptureMode → Re-initialize → Broadcast OnModeChanged
|
||||
|
||||
#### `SetSurfaceMaterial(NewMaterial: UMaterialInterface*)`
|
||||
- **Description:** Swap surface material at runtime (clean ↔ dirty mirror, etc.)
|
||||
- **Flow:** SurfaceMesh.CreateDynamicMaterialInstance(NewMaterial) → Store as SurfaceMaterialInstance
|
||||
|
||||
#### `SetSurfaceMPCParameter(ParameterName: FName, Value: float)`
|
||||
- **Description:** Set a single MPC scalar parameter on the surface's MID
|
||||
|
||||
#### `DestroySurface()`
|
||||
- **Description:** Destroy the surface (shatter mirror, break monitor). Respects bDestructible flag.
|
||||
- **Flow:** DisableSurface → Broadcast OnSurfaceDestroyed → (BP child handles visual FX)
|
||||
|
||||
## 4. Event Dispatchers
|
||||
| Dispatcher | Parameters | Description |
|
||||
|------------|-----------|-------------|
|
||||
| `OnModeChanged` | NewMode: EPlanarCaptureMode | Mode changed at runtime |
|
||||
| `OnSurfaceDestroyed` | Surface: ABP_PlanarCaptureActor* | Surface destroyed |
|
||||
|
||||
## 5. Overlap Events
|
||||
| Event | Logic |
|
||||
|-------|-------|
|
||||
| `OnProximityBeginOverlap` | If OtherActor has Tag "Player" → CaptureComponent.SetScriptedPriority(0.3) |
|
||||
| `OnProximityEndOverlap` | If OtherActor has Tag "Player" → CaptureComponent.SetScriptedPriority(0.0) |
|
||||
|
||||
## 6. Communication Matrix
|
||||
| Target System | Method | What |
|
||||
|---------------|--------|------|
|
||||
| `SS_PlanarCaptureManager` | Direct (RegisterSurface) | Registers on BeginPlay |
|
||||
| `BPC_PlanarCapture` | Direct (owns) | Full component access |
|
||||
| `BPC_ScareEventSystem` (101) | Dispatcher / Interface | Horror mirror scare triggers |
|
||||
| `SS_AudioManager` (132) | Direct | Surface audio (shatter, portal whoosh) |
|
||||
|
||||
## 7. Manual Implementation Guide
|
||||
|
||||
### 7.1 Blueprint Child Setup
|
||||
1. Create Blueprint Class: Parent = `BP_PlanarCaptureActor`, Name = `BP_Mirror` (or `BP_Portal`, etc.)
|
||||
2. Assign a plane/quad StaticMesh to `SurfaceMesh` in Components panel
|
||||
3. Set `CaptureComponent.CaptureMode` in Class Defaults
|
||||
4. Assign `SurfaceMPC` to `MPC_CaptureSurface`
|
||||
5. Assign material to SurfaceMesh slot 0
|
||||
|
||||
### 7.2 Proximity Trigger Adjustments
|
||||
- Resize `ProximityTrigger.BoxExtent` per surface (larger mirrors = larger trigger)
|
||||
- The trigger boosts priority when player is near — adjust size for desired quality bump radius
|
||||
|
||||
### 7.3 Destruction Handling
|
||||
```
|
||||
Event OnSurfaceDestroyed
|
||||
→ Play shatter sound via SS_AudioManager.PlaySoundAtLocation()
|
||||
→ Spawn particle effect at actor location
|
||||
→ (Optional) Notify BPC_ScareEventSystem for jump scare
|
||||
→ (Optional) Set narrative flag via BPC_NarrativeStateSystem
|
||||
```
|
||||
|
||||
## 8. Build Checklist
|
||||
- [ ] C++ base class compiles
|
||||
- [ ] Create BP child with correct mesh
|
||||
- [ ] Assign material and MPC
|
||||
- [ ] Configure CaptureComponent defaults
|
||||
- [ ] Adjust proximity trigger size
|
||||
- [ ] Test BeginPlay registration with manager
|
||||
- [ ] Test Enable/Disable surface
|
||||
- [ ] Test proximity overlap quality boost
|
||||
108
docs/blueprints/17-capture/138_SS_PlanarCaptureManager.md
Normal file
108
docs/blueprints/17-capture/138_SS_PlanarCaptureManager.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# 138 — Planar Capture Manager Subsystem (`SS_PlanarCaptureManager`)
|
||||
|
||||
## Purpose
|
||||
Global budget manager for all planar capture surfaces in the world. One instance per World (World Subsystem). Scores every registered surface each frame and assigns quality tiers to stay within configurable budget limits. Owns the shared render target pool.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `BP_PlanarCaptureActor` (137) for surface registration, `BPC_PlanarCapture` (136) for tier assignment
|
||||
- **Required By:** All capture surfaces in the world
|
||||
- **Engine/Plugin Requirements:** WorldSubsystem (auto-created)
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Parent Class** | `WorldSubsystem` (C++ `ASS_PlanarCaptureManager`) |
|
||||
| **Class Type** | World Subsystem |
|
||||
| **Asset Path** | N/A (auto-created by engine) |
|
||||
| **C++ Header** | `Source/PG_Framework/Public/Capture/SS_PlanarCaptureManager.h` |
|
||||
| **C++ Status** | ✅ Full Implementation |
|
||||
| **BP Asset** | None — engine auto-creates |
|
||||
|
||||
## 1. Variables
|
||||
|
||||
### Configuration (Budget)
|
||||
| Variable | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `GlobalQualityCap` | EPlanarCaptureQualityTier | High | Max quality tier for any surface |
|
||||
| `MaxHeroSurfaces` | int32 | 1 | Max simultaneous Hero-tier captures |
|
||||
| `MaxHighSurfaces` | int32 | 3 | Max simultaneous High-tier captures |
|
||||
| `MaxMediumSurfaces` | int32 | 6 | Max simultaneous Medium-tier captures |
|
||||
| `MaxTotalRenderTargetMemoryMB` | float | 128.0 | Total RT memory budget |
|
||||
| `MaxCaptureDistance` | float | 10000.0 | Distance at which surface goes Off |
|
||||
| `FullEvaluationInterval` | float | 0.5 | Seconds between full re-evaluation |
|
||||
|
||||
## 2. Functions
|
||||
|
||||
#### `RegisterSurface(Surface: ABP_PlanarCaptureActor*)`
|
||||
- **Description:** Register a surface with the manager. Called by BP_PlanarCaptureActor.BeginPlay.
|
||||
- **Flow:** Check duplicates → Add to RegisteredSurfaces → Log → Broadcast OnSurfaceRegistered → EvaluateAllSurfaces
|
||||
|
||||
#### `UnregisterSurface(Surface: ABP_PlanarCaptureActor*)`
|
||||
- **Description:** Remove a surface. Called on EndPlay.
|
||||
- **Flow:** Remove from RegisteredSurfaces → Log → Broadcast OnSurfaceUnregistered
|
||||
|
||||
#### `RequestRenderTarget(Size: int32)` → `UTextureRenderTarget2D*`
|
||||
- **Description:** Get a render target from the pool (or allocate new). Returns nullptr if pool exhausted.
|
||||
- **Flow:** Check pool for matching size + not in use → If found, mark in use → If not, CreateRenderTarget
|
||||
|
||||
#### `ReleaseRenderTarget(RT: UTextureRenderTarget2D*)`
|
||||
- **Description:** Return a render target to the pool. Marks as free for reuse.
|
||||
|
||||
#### `ForceAllSurfacesToTier(Tier: EPlanarCaptureQualityTier)`
|
||||
- **Description:** Override all surfaces to a specific tier (e.g., Hero during a cutscene mirror moment).
|
||||
|
||||
#### `ReleaseForceTier()`
|
||||
- **Description:** Remove force override, resume normal scoring.
|
||||
|
||||
#### `GetNearestSurfaceOfMode(Mode, Location, MaxDistance)` → `ABP_PlanarCaptureActor*`
|
||||
- **Description:** Find nearest surface of a given mode (e.g., find nearest portal for teleport).
|
||||
|
||||
## 3. Event Dispatchers
|
||||
| Dispatcher | Parameters | Description |
|
||||
|------------|-----------|-------------|
|
||||
| `OnSurfaceRegistered` | Surface, TotalSurfaces | Surface added |
|
||||
| `OnSurfaceUnregistered` | Surface, TotalSurfaces | Surface removed |
|
||||
| `OnGlobalQualityCapChanged` | NewCap | Quality cap changed |
|
||||
|
||||
## 4. Scoring Algorithm (Internal)
|
||||
```
|
||||
CompositeScore = (ScreenCoverage × 0.5) + (FacingAngle × 0.3) + (DistanceFactor × 0.1) + (ScriptedPriority × 0.1)
|
||||
|
||||
Tier: Score ≥ 0.8 → Hero | ≥ 0.5 → High | ≥ 0.2 → Medium | > 0 → Low | 0 → Off
|
||||
Budget enforcement: demote if tier count exceeds Max*Surfaces limits
|
||||
Apply GlobalQualityCap: clamp tier to cap
|
||||
```
|
||||
|
||||
## 5. Communication Matrix
|
||||
| Target System | Method | What |
|
||||
|---------------|--------|------|
|
||||
| `BP_PlanarCaptureActor` | Direct (registry) | Surface tracking |
|
||||
| `BPC_PlanarCapture` | Direct (ApplyQualityTier) | Tier assignment |
|
||||
| `UTextureRenderTarget2D` | Direct (create/release) | RT pool management |
|
||||
| Player Camera Manager | UGameplayStatics (indirect via Capture) | View transform for scoring |
|
||||
|
||||
## 6. Manual Implementation Guide
|
||||
|
||||
*No Blueprint implementation needed — the C++ subsystem auto-creates per world.*
|
||||
|
||||
### 6.1 Budget Tuning
|
||||
Adjust the following in `Project Settings → Plugins → PG_Framework → Planar Capture` (or via Config in DefaultEngine.ini):
|
||||
- **High-end GPU (RTX 4080+):** MaxHeroSurfaces=2, MaxHighSurfaces=5
|
||||
- **Mid-range (RTX 3060):** MaxHeroSurfaces=1, MaxHighSurfaces=3
|
||||
- **Console (PS5/Xbox):** MaxHeroSurfaces=1, MaxHighSurfaces=2, GlobalQualityCap=High
|
||||
- **Low-end (Steam Deck):** MaxHeroSurfaces=0, MaxHighSurfaces=1, GlobalQualityCap=Medium
|
||||
|
||||
### 6.2 Debug Commands
|
||||
```
|
||||
SS_PlanarCaptureManager.GetSurfaceCount() → Blueprint: print count
|
||||
SS_PlanarCaptureManager.GetPoolMemoryUsageMB() → Blueprint: print memory
|
||||
ForceAllSurfacesToTier(Hero) → test all at max quality
|
||||
ReleaseForceTier() → resume normal scoring
|
||||
```
|
||||
|
||||
## 7. Build Checklist
|
||||
- [ ] C++ subsystem compiles
|
||||
- [ ] Auto-creates per world (no manual creation needed)
|
||||
- [ ] Budget limits tested with multiple surfaces
|
||||
- [ ] RT pool reuses targets (not leaking)
|
||||
- [ ] Force tier override works for cutscenes
|
||||
110
docs/blueprints/17-capture/139_BP_Mirror.md
Normal file
110
docs/blueprints/17-capture/139_BP_Mirror.md
Normal file
@@ -0,0 +1,110 @@
|
||||
# 139 — Mirror Surface Actor (`BP_Mirror`)
|
||||
|
||||
## Purpose
|
||||
Standard planar mirror surface. Designer configures mode, dirt layers, steam parameters, and surface aging. Extends `BP_PlanarCaptureActor` with default mirror configuration.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `BP_PlanarCaptureActor` (137), `BPC_PlanarCapture` (136)
|
||||
- **Required By:** `BP_HorrorMirror` (142) — extends this for horror features
|
||||
- **Engine/Plugin Requirements:** M_CaptureSurface_Master material, MPC_CaptureSurface
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Parent Class** | `BP_PlanarCaptureActor` (C++ `ABP_PlanarCaptureActor`) |
|
||||
| **Class Type** | Blueprint Actor |
|
||||
| **Asset Path** | `Content/Framework/Capture/BP_Mirror.uasset` |
|
||||
| **C++ Status** | 🔵 BP Spec Only — extends C++ parent |
|
||||
| **BP Asset** | Create in editor: `BP_Mirror` |
|
||||
|
||||
## 1. Configuration (Class Defaults)
|
||||
|
||||
| Variable | Value | Description |
|
||||
|----------|-------|-------------|
|
||||
| `CaptureComponent.CaptureMode` | `Mirror` | Fixed to Mirror mode |
|
||||
| `bStartEnabled` | `true` | Active by default |
|
||||
| `bDestructible` | `false` | Can be shattered (override per instance) |
|
||||
| `SurfaceMPC` | `MPC_CaptureSurface` | Assign the global MPC |
|
||||
|
||||
### Mirror-Specific Properties (Set via `SetSurfaceMPCParameter`)
|
||||
| Parameter | Default | Range | Description |
|
||||
|-----------|---------|-------|-------------|
|
||||
| `DirtOpacity` | 0.0 | 0.0–1.0 | Dirt/scratch layer intensity |
|
||||
| `SteamIntensity` | 0.0 | 0.0–1.0 | Steam fog visibility |
|
||||
| `CondensationFlow` | 0.0 | 0.0–1.0 | Condensation rivulet normal intensity |
|
||||
| `SurfaceAge` | 0.0 | 0.0–1.0 | Oxidation/yellowing tint |
|
||||
|
||||
## 2. Material Setup
|
||||
| Slot | Material Instance | Description |
|
||||
|------|------------------|-------------|
|
||||
| SurfaceMesh[0] | `MI_Mirror_Clean` | Default clean mirror |
|
||||
|
||||
Pre-configured material instances to assign per mirror:
|
||||
- `MI_Mirror_Clean` — Pristine mirror, no effects
|
||||
- `MI_Mirror_Dirty` — DirtOpacity preset at 0.4
|
||||
- `MI_Mirror_Steam` — SteamIntensity preset at 0.6, animated noise enabled
|
||||
|
||||
## 3. Event Graph
|
||||
|
||||
### Event BeginPlay
|
||||
```
|
||||
Event BeginPlay
|
||||
├─ Parent: BeginPlay (registers with manager)
|
||||
├─ Set CaptureComponent.CaptureMode = Mirror
|
||||
├─ Set SurfaceMaterial(MI_Mirror_Clean) // or designer-chosen MI
|
||||
└─ [If bStartEnabled] EnableSurface()
|
||||
```
|
||||
|
||||
### Event: SetMirrorDirtLevel(Level: float)
|
||||
```
|
||||
SetMirrorDirtLevel(Level)
|
||||
├─ Clamp Level to 0.0–1.0
|
||||
├─ Call SetSurfaceMPCParameter("DirtOpacity", Level)
|
||||
└─ [If Level > threshold] Swap material to MI_Mirror_Dirty
|
||||
```
|
||||
|
||||
### Event: SetMirrorSteamLevel(Level: float)
|
||||
```
|
||||
SetMirrorSteamLevel(Level)
|
||||
├─ Clamp Level to 0.0–1.0
|
||||
├─ Call SetSurfaceMPCParameter("SteamIntensity", Level)
|
||||
└─ Call SetSurfaceMPCParameter("CondensationFlow", Level * 0.5)
|
||||
```
|
||||
|
||||
## 4. Communication Matrix
|
||||
| Target | Method | What |
|
||||
|--------|--------|------|
|
||||
| `SS_PlanarCaptureManager` | Direct (inherited) | Registration |
|
||||
| `BPC_PlanarCapture` | Direct (inherited) | Capture driving |
|
||||
| `MPC_CaptureSurface` | SetScalarParameterValue (via PushMPCParameters) | Visual parameters |
|
||||
| `SS_AudioManager` (132) | Direct (on shatter) | Shatter sound |
|
||||
|
||||
## 5. Manual Implementation Guide
|
||||
|
||||
### 5.1 Create BP_Mirror
|
||||
1. Create Blueprint Class: Parent = `BP_PlanarCaptureActor`, Name = `BP_Mirror`
|
||||
2. Open Class Defaults, set `CaptureComponent.CaptureMode` to `Mirror`
|
||||
3. In Components: select `SurfaceMesh`, assign a plane mesh (e.g., `SM_Plane_200x200`)
|
||||
4. Assign `MI_Mirror_Clean` to SurfaceMesh material slot 0
|
||||
5. Set `SurfaceMPC` to `MPC_CaptureSurface`
|
||||
|
||||
### 5.2 Add Steam/Dirt Controls
|
||||
1. In Event Graph, create custom event `SetMirrorDirtLevel(Float)`
|
||||
2. Wire: `SetSurfaceMPCParameter("DirtOpacity", Level)`
|
||||
3. Create custom event `SetMirrorSteamLevel(Float)`
|
||||
4. Wire: `SetSurfaceMPCParameter("SteamIntensity", Level)` + `SetSurfaceMPCParameter("CondensationFlow", Level * 0.5)`
|
||||
|
||||
### 5.3 Level Placement
|
||||
1. Drag `BP_Mirror` into level
|
||||
2. Rotate so surface normal faces toward player viewing area
|
||||
3. Set `SurfaceDisplayName` for debug identification
|
||||
4. Adjust `ProximityTrigger.BoxExtent` to cover expected viewing area
|
||||
|
||||
## 6. Build Checklist
|
||||
- [ ] Create BP_Mirror Blueprint child
|
||||
- [ ] Assign plane mesh and MI_Mirror_Clean material
|
||||
- [ ] Set CaptureMode=Mirror in defaults
|
||||
- [ ] Assign MPC_CaptureSurface reference
|
||||
- [ ] Test: place in level, walk up, verify reflection appears
|
||||
- [ ] Test: walk away, verify quality drops to Off
|
||||
- [ ] Test: call SetMirrorDirtLevel/SetMirrorSteamLevel from gameplay code
|
||||
124
docs/blueprints/17-capture/140_BP_Portal.md
Normal file
124
docs/blueprints/17-capture/140_BP_Portal.md
Normal file
@@ -0,0 +1,124 @@
|
||||
# 140 — Portal Surface Actor (`BP_Portal`)
|
||||
|
||||
## Purpose
|
||||
Portal surface with linked target. Renders the view from another location in the world through a planar surface. Supports one-way vs two-way rendering, teleport on overlap, and clip plane for flush geometry placement.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `BP_PlanarCaptureActor` (137), `BPC_PlanarCapture` (136), `BPC_StateManager` (130) for teleport gating
|
||||
- **Required By:** Narrative sequences, level transitions, horror portal variants
|
||||
- **Engine/Plugin Requirements:** Oblique clip plane requires Renderer module (C++)
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Parent Class** | `BP_PlanarCaptureActor` (C++ `ABP_PlanarCaptureActor`) |
|
||||
| **Class Type** | Blueprint Actor |
|
||||
| **Asset Path** | `Content/Framework/Capture/BP_Portal.uasset` |
|
||||
| **C++ Status** | 🔵 BP Spec Only |
|
||||
| **BP Asset** | Create in editor: `BP_Portal` |
|
||||
|
||||
## 1. Configuration (Class Defaults)
|
||||
|
||||
| Variable | Value | Description |
|
||||
|----------|-------|-------------|
|
||||
| `CaptureComponent.CaptureMode` | `Portal` | Fixed to Portal mode |
|
||||
| `CaptureComponent.LinkedTargetSurface` | (Set per instance) | Destination portal actor |
|
||||
| `bStartEnabled` | `true` | Active by default |
|
||||
| `SurfaceMPC` | `MPC_CaptureSurface` | Global MPC |
|
||||
|
||||
### Portal-Specific Properties (Custom Variables — add to BP)
|
||||
| Variable | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `bTeleportOnOverlap` | bool | true | Teleport player when they enter the portal volume |
|
||||
| `bOneWay` | bool | true | True = only source→target; false = bidirectional |
|
||||
| `TeleportTrigger` | BoxComponent | — | Overlap volume for teleport (separate from ProximityTrigger) |
|
||||
|
||||
## 2. Material Setup
|
||||
| Slot | Material | Description |
|
||||
|------|----------|-------------|
|
||||
| SurfaceMesh[0] | `MI_Portal_Standard` | Portal surface with edge fade |
|
||||
| Frame (optional) | Designer mesh + material | Portal frame decoration |
|
||||
|
||||
## 3. Event Graph
|
||||
|
||||
### Event BeginPlay
|
||||
```
|
||||
Event BeginPlay
|
||||
├─ Parent: BeginPlay (registers with manager)
|
||||
├─ Set CaptureComponent.CaptureMode = Portal
|
||||
├─ Validate CaptureComponent.LinkedTargetSurface != nullptr
|
||||
│ └─ If null → Log Warning: "BP_Portal missing LinkedTargetSurface!"
|
||||
├─ Bind TeleportTrigger.OnComponentBeginOverlap → OnPortalOverlap
|
||||
└─ EnableSurface()
|
||||
```
|
||||
|
||||
### Event: OnPortalOverlap(OtherActor, OtherComp, ...)
|
||||
```
|
||||
OnPortalOverlap(OtherActor)
|
||||
├─ Cast OtherActor to Player Pawn
|
||||
├─ [If bTeleportOnOverlap and HasAuthority]
|
||||
│ ├─ Query BPC_StateManager.IsActionPermitted(Framework.Action.Teleport)
|
||||
│ │ └─ If denied → return (play denied feedback)
|
||||
│ ├─ Get LinkedTargetSurface actor transform
|
||||
│ ├─ Compute exit location: TargetTransform + offset
|
||||
│ ├─ Teleport player: SetActorLocation + SetActorRotation
|
||||
│ └─ Play portal travel SFX via SS_AudioManager
|
||||
└─ [If client] Call Server_TeleportThroughPortal RPC
|
||||
```
|
||||
|
||||
### Server RPC: Server_TeleportThroughPortal
|
||||
```
|
||||
Server_TeleportThroughPortal (Server, Reliable)
|
||||
├─ Validate HasAuthority
|
||||
├─ Validate portal still active
|
||||
├─ Validate LinkedTargetSurface still valid
|
||||
├─ Teleport player (same as OnPortalOverlap logic)
|
||||
└─ Multicast_OnPlayerTeleported to notify all clients
|
||||
```
|
||||
|
||||
## 4. Communication Matrix
|
||||
| Target | Method | What |
|
||||
|--------|--------|------|
|
||||
| `BPC_StateManager` (130) | `IsActionPermitted()` | Teleport gating |
|
||||
| `SS_AudioManager` (132) | Direct | Portal whoosh/disappear SFX |
|
||||
| `SS_EnhancedInputManager` (128) | Direct (optional) | Context switch during portal transition |
|
||||
| `BPC_CameraStateLayer` (14) | Direct (optional) | Camera FOV transition during teleport |
|
||||
|
||||
## 5. Manual Implementation Guide
|
||||
|
||||
### 5.1 Create BP_Portal
|
||||
1. Create Blueprint Class: Parent = `BP_PlanarCaptureActor`, Name = `BP_Portal`
|
||||
2. In Components: add `BoxComponent` named `TeleportTrigger`
|
||||
3. Size `TeleportTrigger` slightly larger than surface mesh (50-100 units deep)
|
||||
4. Set `TeleportTrigger.CollisionEnabled = QueryOnly`, response to Pawn = Overlap
|
||||
5. Set `CaptureComponent.CaptureMode = Portal` in Class Defaults
|
||||
6. Assign `MI_Portal_Standard` to SurfaceMesh
|
||||
|
||||
### 5.2 Portal Link Setup
|
||||
1. Place `BP_Portal_Source` and `BP_Portal_Target` in level
|
||||
2. On Source: set `CaptureComponent.LinkedTargetSurface` → Target actor
|
||||
3. On Target: set `CaptureComponent.LinkedTargetSurface` → Source actor (if two-way)
|
||||
4. Position surfaces facing each other's expected viewing directions
|
||||
|
||||
### 5.3 Teleport Implementation
|
||||
```
|
||||
Create custom event OnPortalOverlap (bind to TeleportTrigger)
|
||||
→ Switch HasAuthority
|
||||
Authority:
|
||||
→ Get LinkedTargetSurface → Get Actor Transform
|
||||
→ Teleport: Set Actor Location (target location + forward * 200)
|
||||
→ Set Actor Rotation (target rotation)
|
||||
→ Play Sound 2D (portal whoosh cue via SS_AudioManager)
|
||||
Remote:
|
||||
→ Call Server_TeleportThroughPortal (RPC)
|
||||
```
|
||||
|
||||
## 6. Build Checklist
|
||||
- [ ] Create BP_Portal with TeleportTrigger component
|
||||
- [ ] Set CaptureMode=Portal
|
||||
- [ ] Assign MI_Portal_Standard material
|
||||
- [ ] Implement overlap teleport logic with HasAuthority gate
|
||||
- [ ] Add Server_TeleportThroughPortal RPC
|
||||
- [ ] Test one-way portal: source renders target view
|
||||
- [ ] Test teleport: player overlaps and appears at target
|
||||
- [ ] Test with BPC_StateManager gating (block teleport during certain states)
|
||||
129
docs/blueprints/17-capture/141_BP_Monitor.md
Normal file
129
docs/blueprints/17-capture/141_BP_Monitor.md
Normal file
@@ -0,0 +1,129 @@
|
||||
# 141 — Monitor Surface Actor (`BP_Monitor`)
|
||||
|
||||
## Purpose
|
||||
Security screen, TV, or diegetic display monitor. Uses a fixed camera actor reference instead of dynamic mirror/portal math. Runs at low FPS by default (5fps) with scanline and static noise effects.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `BP_PlanarCaptureActor` (137), `BPC_PlanarCapture` (136)
|
||||
- **Required By:** `BPC_DiegeticDisplay` (18) — can display diegetic HUD content
|
||||
- **Engine/Plugin Requirements:** None additional
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Parent Class** | `BP_PlanarCaptureActor` (C++ `ABP_PlanarCaptureActor`) |
|
||||
| **Class Type** | Blueprint Actor |
|
||||
| **Asset Path** | `Content/Framework/Capture/BP_Monitor.uasset` |
|
||||
| **C++ Status** | 🔵 BP Spec Only |
|
||||
| **BP Asset** | Create in editor: `BP_Monitor` |
|
||||
|
||||
## 1. Configuration (Class Defaults)
|
||||
|
||||
| Variable | Value | Description |
|
||||
|----------|-------|-------------|
|
||||
| `CaptureComponent.CaptureMode` | `Monitor` | Fixed to Monitor mode |
|
||||
| `CaptureComponent.CaptureFOV` | `70.0` | Narrower FOV for security camera feel |
|
||||
| `CaptureComponent.QualityProfiles[0].CaptureInterval` | `0.2` | 5fps Low quality (override) |
|
||||
| `SurfaceMPC` | `MPC_CaptureSurface` | Global MPC |
|
||||
|
||||
### Monitor-Specific Properties (Add to BP)
|
||||
| Variable | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `bPoweredOn` | bool | true | On/off state |
|
||||
| `bShowScanlines` | bool | false | CRT scanline overlay |
|
||||
| `StaticNoiseIntensity` | float | 0.0 | Static/noise overlay (0.0–1.0) |
|
||||
| `FlickerCurve` | UCurveFloat | — | On/off flicker timing curve |
|
||||
| `PoweredOffMaterial` | UMaterialInterface | — | Material shown when off (black screen, cracked) |
|
||||
|
||||
## 2. Material Setup
|
||||
| Slot | Material | Description |
|
||||
|------|----------|-------------|
|
||||
| SurfaceMesh[0] | `MI_Monitor_Security` | Security screen with scanline support |
|
||||
|
||||
## 3. Event Graph
|
||||
|
||||
### Event BeginPlay
|
||||
```
|
||||
Event BeginPlay
|
||||
├─ Parent: BeginPlay
|
||||
├─ Set CaptureComponent.CaptureMode = Monitor
|
||||
├─ Set CaptureComponent.CaptureFOV = 70.0
|
||||
├─ [If bPoweredOn] EnableSurface
|
||||
└─ [Else] SetSurfaceMaterial(PoweredOffMaterial)
|
||||
```
|
||||
|
||||
### Event: PowerOn
|
||||
```
|
||||
PowerOn()
|
||||
├─ Set bPoweredOn = true
|
||||
├─ SetSurfaceMaterial(MI_Monitor_Security)
|
||||
├─ EnableSurface()
|
||||
└─ [If FlickerCurve valid] StartFlickerTimeline
|
||||
```
|
||||
|
||||
### Event: PowerOff
|
||||
```
|
||||
PowerOff()
|
||||
├─ Set bPoweredOn = false
|
||||
├─ DisableSurface()
|
||||
├─ SetSurfaceMaterial(PoweredOffMaterial)
|
||||
└─ StopFlickerTimeline
|
||||
```
|
||||
|
||||
### Event: SetStaticNoise(Intensity: float)
|
||||
```
|
||||
SetStaticNoise(Intensity)
|
||||
├─ Clamp Intensity 0.0–1.0
|
||||
├─ Set StaticNoiseIntensity = Intensity
|
||||
└─ SetSurfaceMPCParameter("StaticNoiseIntensity", Intensity)
|
||||
```
|
||||
|
||||
## 4. Flicker Timeline Setup
|
||||
If `FlickerCurve` is assigned, create a Timeline that drives:
|
||||
```
|
||||
Timeline: FlickerTimeline
|
||||
Curve: FlickerCurve (Float Track)
|
||||
On Update:
|
||||
├─ Read curve value → bIsFlickerOn
|
||||
├─ If bIsFlickerOn and not bPoweredOn → PowerOn (brief)
|
||||
└─ If not bIsFlickerOn and bPoweredOn → PowerOff (brief)
|
||||
```
|
||||
|
||||
## 5. Communication Matrix
|
||||
| Target | Method | What |
|
||||
|--------|--------|------|
|
||||
| `BPC_DiegeticDisplay` (18) | Interface (I_DiegeticDisplay) | Can display diegetic HUD content as secondary output |
|
||||
| `SS_AudioManager` (132) | Direct | Monitor static/buzz/hum SFX |
|
||||
| `BPC_ScareEventSystem` (101) | Dispatcher | Monitor flicker/horror image scare |
|
||||
|
||||
## 6. Manual Implementation Guide
|
||||
|
||||
### 6.1 Create BP_Monitor
|
||||
1. Create Blueprint Class: Parent = `BP_PlanarCaptureActor`, Name = `BP_Monitor`
|
||||
2. Set `CaptureComponent.CaptureMode = Monitor` in defaults
|
||||
3. Set `CaptureComponent.CaptureFOV = 70.0`
|
||||
4. Override QualityProfiles[0].CaptureInterval to 0.2 (5fps Low)
|
||||
5. Assign `MI_Monitor_Security` to SurfaceMesh
|
||||
6. Create `PoweredOffMaterial` — simple dark/black emissive material
|
||||
|
||||
### 6.2 Camera Placement
|
||||
1. Create a `CameraActor` or `SceneCaptureCamera` (BP child of CameraActor) in the level
|
||||
2. Position it where the monitor should "look from"
|
||||
3. In BP_Monitor instance: set `CaptureComponent.FixedCameraActor` → your camera actor
|
||||
|
||||
### 6.3 Power Control
|
||||
For narrative-driven power control:
|
||||
```
|
||||
External system calls: BP_Monitor → PowerOn() / PowerOff()
|
||||
Trigger: Narrative flag set → Branch → PowerOn or PowerOff
|
||||
```
|
||||
|
||||
## 7. Build Checklist
|
||||
- [ ] Create BP_Monitor Blueprint child
|
||||
- [ ] Assign MI_Monitor_Security material
|
||||
- [ ] Create PoweredOffMaterial (dark screen)
|
||||
- [ ] Place camera actor and assign FixedCameraActor
|
||||
- [ ] Test PowerOn/PowerOff cycle
|
||||
- [ ] Test flicker curve timeline
|
||||
- [ ] Test static noise parameter
|
||||
- [ ] Test: place multiple monitors, verify quality budget works
|
||||
162
docs/blueprints/17-capture/142_BP_HorrorMirror.md
Normal file
162
docs/blueprints/17-capture/142_BP_HorrorMirror.md
Normal file
@@ -0,0 +1,162 @@
|
||||
# 142 — Horror Mirror Actor (`BP_HorrorMirror`)
|
||||
|
||||
## Purpose
|
||||
Horror mirror extending `BP_Mirror` with wrong-reflection Metahuman, delayed frame ring buffer, steam text reveal, mirror darkness, UV distortion, and coordinated scare events.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `BP_Mirror` (139), `BP_PlanarCaptureActor` (137), `BPC_PlanarCapture` (136)
|
||||
- **Requires (Horror Integration):** `BPC_ScareEventSystem` (101), `SS_AudioManager` (132), `BPC_StressSystem` (10)
|
||||
- **Engine/Plugin Requirements:** M_CaptureSurface_Master material (horror layers)
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Parent Class** | `BP_Mirror` (child of `BP_PlanarCaptureActor`) |
|
||||
| **Class Type** | Blueprint Actor |
|
||||
| **Asset Path** | `Content/Framework/Capture/BP_HorrorMirror.uasset` |
|
||||
| **C++ Status** | 🔵 BP Spec Only — uses C++ horror API (ActivateHorrorReflection, PushDelayedFrame) |
|
||||
| **BP Asset** | Create in editor: `BP_HorrorMirror` |
|
||||
|
||||
## 1. Configuration
|
||||
|
||||
| Variable | Value | Description |
|
||||
|----------|-------|-------------|
|
||||
| `CaptureComponent.CaptureMode` | `HorrorMirror` | Fixed to HorrorMirror mode |
|
||||
| `CaptureComponent.WrongReflectionActor` | (Set per instance) | Metahuman/ghost actor for wrong reflection |
|
||||
| `CaptureComponent.QualityProfiles[3].DelayedFrameCount` | `5` | Hero tier gets 5-frame delay |
|
||||
|
||||
### Horror-Specific Properties (Add to BP)
|
||||
| Variable | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `WrongReflectionBlendCurve` | UCurveFloat | — | 0→1→0 blend curve for wrong reflection event |
|
||||
| `MirrorDarknessCurve` | UCurveFloat | — | 0→1 darkness ramp curve |
|
||||
| `UVDistortionCurve` | UCurveFloat | — | Distortion amplitude over time |
|
||||
| `SteamTextRevealTexture` | UTexture2D | — | Mask texture for "HELP ME" text in steam |
|
||||
| `ScareEventTag` | FGameplayTag | — | Tag identifying this scare in BPC_ScareEventSystem |
|
||||
| `HorrorAudioCue` | USoundBase | — | Audio cue for horror event (played via SS_AudioManager) |
|
||||
| `ScareDuration` | float | 5.0 | Total duration of the scare event |
|
||||
|
||||
## 2. Material Setup
|
||||
| Slot | Material | Description |
|
||||
|------|----------|-------------|
|
||||
| SurfaceMesh[0] | `MI_Mirror_Horror` | Horror mirror with wrong reflection and darkness layers enabled |
|
||||
|
||||
## 3. Event Graph
|
||||
|
||||
### Event BeginPlay
|
||||
```
|
||||
Event BeginPlay
|
||||
├─ Parent: BeginPlay (from BP_Mirror)
|
||||
├─ Set CaptureComponent.CaptureMode = HorrorMirror
|
||||
├─ Validate CaptureComponent.WrongReflectionActor != nullptr
|
||||
│ └─ If null → Log Warning: "BP_HorrorMirror missing WrongReflectionActor!"
|
||||
└─ EnableSurface()
|
||||
```
|
||||
|
||||
### Core Event: TriggerHorrorScare()
|
||||
```
|
||||
TriggerHorrorScare()
|
||||
├─ [Check] BPC_StateManager.IsActionPermitted(Scare.Tag) → if denied, return
|
||||
├─ [Notify] BPC_ScareEventSystem.TriggerScareEvent(ScareEventTag)
|
||||
│ └─ This coordinates with other systems (lights, audio, pacing)
|
||||
│
|
||||
├─ [Audio] SS_AudioManager.PlaySoundAtLocation(HorrorAudioCue, GetActorLocation())
|
||||
│
|
||||
├─ [Reflection Swap] CaptureComponent.ActivateHorrorReflection()
|
||||
│ └─ C++ swaps ShowOnly list to WrongReflectionActor
|
||||
│
|
||||
├─ [Start Timeline] Play HorrorScareTimeline
|
||||
│ └─ Timeline drives: WrongReflectionBlend, MirrorDarkness, UVDistortion, TextReveal
|
||||
│
|
||||
└─ [After ScareDuration] Call FinalizeHorrorScare()
|
||||
```
|
||||
|
||||
### Timeline: HorrorScareTimeline
|
||||
```
|
||||
HorrorScareTimeline (Float Track, Length = ScareDuration)
|
||||
Track 0: WrongReflectionBlend
|
||||
Curve: WrongReflectionBlendCurve (0→1→0)
|
||||
→ SetSurfaceMPCParameter("WrongReflectionBlend", curve value)
|
||||
|
||||
Track 1: MirrorDarkness
|
||||
Curve: MirrorDarknessCurve (0→0.8→0.2 linger)
|
||||
→ SetSurfaceMPCParameter("MirrorDarkness", curve value)
|
||||
|
||||
Track 2: UVDistortion
|
||||
Curve: UVDistortionCurve (0→0.3 breath cycle)
|
||||
→ SetSurfaceMPCParameter("DistortionAmplitude", curve value)
|
||||
|
||||
Track 3: TextReveal
|
||||
Curve: 0→1 after 1.5s delay
|
||||
→ SetSurfaceMPCParameter("TextRevealProgress", curve value)
|
||||
```
|
||||
|
||||
### Event: FinalizeHorrorScare()
|
||||
```
|
||||
FinalizeHorrorScare()
|
||||
├─ CaptureComponent.DeactivateHorrorReflection()
|
||||
│ └─ C++ restores original ShowOnly list
|
||||
├─ SetSurfaceMPCParameter("WrongReflectionBlend", 0.0)
|
||||
├─ SetSurfaceMPCParameter("MirrorDarkness", 0.0)
|
||||
├─ SetSurfaceMPCParameter("DistortionAmplitude", 0.0)
|
||||
├─ SetSurfaceMPCParameter("TextRevealProgress", 0.0)
|
||||
└─ [Notify] BPC_ScareEventSystem.OnScareEventComplete(ScareEventTag)
|
||||
```
|
||||
|
||||
## 4. Communication Matrix
|
||||
| Target | Method | What |
|
||||
|--------|--------|------|
|
||||
| `BPC_ScareEventSystem` (101) | Direct (TriggerScareEvent) | Coordinated scare |
|
||||
| `SS_AudioManager` (132) | Direct | Horror SFX |
|
||||
| `BPC_StressSystem` (10) | Dispatcher (optional) | Add stress on scare |
|
||||
| `BPC_StateManager` (130) | IsActionPermitted() | Gate before triggering scare |
|
||||
| `BPC_LightEventController` (96) | Dispatcher (optional) | Sync lights with mirror scare |
|
||||
| `BPC_PacingDirector` (98) | Dispatcher (optional) | Notify of scare for pacing |
|
||||
|
||||
## 5. Manual Implementation Guide
|
||||
|
||||
### 5.1 Create BP_HorrorMirror
|
||||
1. Create Blueprint Class: Parent = `BP_Mirror`, Name = `BP_HorrorMirror`
|
||||
2. Set `CaptureComponent.CaptureMode = HorrorMirror` in defaults
|
||||
3. Assign `MI_Mirror_Horror` to SurfaceMesh
|
||||
4. Set `CaptureComponent.QualityProfiles[3].DelayedFrameCount = 5`
|
||||
|
||||
### 5.2 Setup Wrong Reflection Actor
|
||||
1. Place a skeletal mesh actor (Metahuman, ghost mesh) in a hidden room/box near the mirror
|
||||
2. Set its visibility to false in BeginPlay
|
||||
3. In BP_HorrorMirror instance: set `CaptureComponent.WrongReflectionActor` → your hidden actor
|
||||
|
||||
### 5.3 Create Curves
|
||||
Create Float Curve assets:
|
||||
- `Curve_WrongReflectionBlend`: Keys: (0,0), (1.0,1.0), (3.0,1.0), (4.0,0), (5.0,0)
|
||||
- `Curve_MirrorDarkness`: Keys: (0,0), (0.5,0.8), (2.0,0.6), (4.0,0.3), (5.0,0)
|
||||
- `Curve_UVDistortion`: Keys: (0,0), (1.0,0.3), (2.0,0.2), (3.0,0.35), (5.0,0)
|
||||
|
||||
### 5.4 Build Timeline
|
||||
1. Create Timeline node with Float Track
|
||||
2. Add 4 float output tracks
|
||||
3. Wire each track to `SetSurfaceMPCParameter` with corresponding param name
|
||||
4. Set Timeline length to `ScareDuration`
|
||||
|
||||
### 5.5 Integration Hook
|
||||
From any gameplay system (narrative trigger, AI event, proximity):
|
||||
```
|
||||
BP_HorrorMirror → TriggerHorrorScare()
|
||||
```
|
||||
|
||||
From Sequencer:
|
||||
```
|
||||
Event Track → BP_HorrorMirror → TriggerHorrorScare()
|
||||
```
|
||||
|
||||
## 6. Build Checklist
|
||||
- [ ] Create BP_HorrorMirror Blueprint child
|
||||
- [ ] Place WrongReflectionActor in level (hidden)
|
||||
- [ ] Create all 3 Float Curves
|
||||
- [ ] Build HorrorScareTimeline with 4 tracks
|
||||
- [ ] Wire MPC parameter sets
|
||||
- [ ] Wire BPC_ScareEventSystem integration
|
||||
- [ ] Wire SS_AudioManager audio cue
|
||||
- [ ] Test TriggerHorrorScare event
|
||||
- [ ] Verify wrong reflection appears and fades
|
||||
- [ ] Verify MPC params return to zero after scare
|
||||
109
docs/blueprints/17-capture/143_BP_FakeWindow.md
Normal file
109
docs/blueprints/17-capture/143_BP_FakeWindow.md
Normal file
@@ -0,0 +1,109 @@
|
||||
# 143 — Fake Window Actor (`BP_FakeWindow`)
|
||||
|
||||
## Purpose
|
||||
Architectural fake window using planar capture to simulate an outdoor view or adjacent room. Supports parallax depth, sky environment reference, weather overlay, and sublevel visibility.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `BP_PlanarCaptureActor` (137), `BPC_PlanarCapture` (136)
|
||||
- **Engine/Plugin Requirements:** Level Streaming (for sublevel reference)
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Parent Class** | `BP_PlanarCaptureActor` (C++ `ABP_PlanarCaptureActor`) |
|
||||
| **Class Type** | Blueprint Actor |
|
||||
| **Asset Path** | `Content/Framework/Capture/BP_FakeWindow.uasset` |
|
||||
| **C++ Status** | 🔵 BP Spec Only |
|
||||
| **BP Asset** | Create in editor: `BP_FakeWindow` |
|
||||
|
||||
## 1. Configuration
|
||||
|
||||
| Variable | Value | Description |
|
||||
|----------|-------|-------------|
|
||||
| `CaptureComponent.CaptureMode` | `FakeWindow` | Fixed to FakeWindow mode |
|
||||
| `CaptureComponent.CaptureFOV` | `100.0` | Wider FOV for window view |
|
||||
|
||||
### FakeWindow-Specific Properties (Add to BP)
|
||||
| Variable | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `LinkedRoomSublevel` | TSoftObjectPtr〈UWorld〉 | — | Sublevel containing the room to render |
|
||||
| `SkyReference` | AActor* | — | Sky/directional light to include in capture |
|
||||
| `ParallaxDepthScalar` | float | 1.0 | Depth exaggeration for parallax effect |
|
||||
| `WeatherOverlayType` | EWeatherType | None | Rain/Frost overlay driven by game state |
|
||||
| `bStreamSublevelOnProximity` | bool | true | Load/unload sublevel based on player distance |
|
||||
| `StreamInDistance` | float | 3000.0 | Distance to load sublevel |
|
||||
|
||||
## 2. Material Setup
|
||||
| Slot | Material | Description |
|
||||
|------|----------|-------------|
|
||||
| SurfaceMesh[0] | `MI_FakeWindow_Interior` | Window with parallax and weather overlay support |
|
||||
|
||||
## 3. Event Graph
|
||||
|
||||
### Event BeginPlay
|
||||
```
|
||||
Event BeginPlay
|
||||
├─ Parent: BeginPlay
|
||||
├─ Set CaptureComponent.CaptureMode = FakeWindow
|
||||
├─ [If bStreamSublevelOnProximity] Start distance check timer
|
||||
└─ EnableSurface()
|
||||
```
|
||||
|
||||
### Timer: CheckPlayerDistance
|
||||
```
|
||||
CheckPlayerDistance (every 2 seconds)
|
||||
├─ Get Player Pawn location
|
||||
├─ Distance = VectorDist(Player, GetActorLocation())
|
||||
├─ If Distance < StreamInDistance AND sublevel not loaded
|
||||
│ └─ Load Stream Level (LinkedRoomSublevel)
|
||||
└─ If Distance > StreamInDistance + 1000 AND sublevel loaded
|
||||
└─ Unload Stream Level (LinkedRoomSublevel)
|
||||
```
|
||||
|
||||
### Event: SetWeatherOverlay(Weather: EWeatherType)
|
||||
```
|
||||
SetWeatherOverlay(Weather)
|
||||
├─ Set WeatherOverlayType = Weather
|
||||
├─ Switch on Weather:
|
||||
│ None: SetSurfaceMPCParameter("RainIntensity", 0.0)
|
||||
│ SetSurfaceMPCParameter("FrostIntensity", 0.0)
|
||||
│ Rain: SetSurfaceMPCParameter("RainIntensity", 1.0)
|
||||
│ Frost: SetSurfaceMPCParameter("FrostIntensity", 1.0)
|
||||
└─ Trigger material update
|
||||
```
|
||||
|
||||
## 4. Communication Matrix
|
||||
| Target | Method | What |
|
||||
|--------|--------|------|
|
||||
| Level Streaming | `Load Stream Level` / `Unload Stream Level` | Sublevel management |
|
||||
| `BPC_AtmosphereStateController` (94) | Dispatcher | React to environment state changes |
|
||||
| `GS_CoreGameState` (6) | Direct (read) | Current chapter/phase for weather state |
|
||||
|
||||
## 5. Manual Implementation Guide
|
||||
|
||||
### 5.1 Create BP_FakeWindow
|
||||
1. Create Blueprint Class: Parent = `BP_PlanarCaptureActor`, Name = `BP_FakeWindow`
|
||||
2. Set `CaptureComponent.CaptureMode = FakeWindow`
|
||||
3. Set `CaptureComponent.CaptureFOV = 100.0`
|
||||
4. Assign `MI_FakeWindow_Interior` to SurfaceMesh
|
||||
|
||||
### 5.2 Setup the View Room
|
||||
1. Create a separate sublevel with the room/exterior you want to show through the window
|
||||
2. Add a `SceneCaptureCamera` actor in the sublevel positioned to capture the desired view
|
||||
3. In BP_FakeWindow instance: assign `CaptureComponent.FixedCameraActor` → the camera in the sublevel
|
||||
4. Assign `LinkedRoomSublevel` → the sublevel asset
|
||||
|
||||
### 5.3 Performance Considerations
|
||||
- Fake windows should run at Low or Medium tier by default
|
||||
- Sublevel streaming avoids rendering room geometry when player is far away
|
||||
- Consider using a static cubemap fallback at Low quality instead of live capture
|
||||
|
||||
## 6. Build Checklist
|
||||
- [ ] Create BP_FakeWindow Blueprint child
|
||||
- [ ] Create sublevel with view room
|
||||
- [ ] Place SceneCaptureCamera in sublevel
|
||||
- [ ] Configure LinkedRoomSublevel and FixedCameraActor
|
||||
- [ ] Create stream distance timer
|
||||
- [ ] Set quality profiles for Low default tier
|
||||
- [ ] Test sublevel streams in/out based on distance
|
||||
- [ ] Test weather overlay switching
|
||||
156
docs/blueprints/17-capture/144_M_CaptureSurface_Master.md
Normal file
156
docs/blueprints/17-capture/144_M_CaptureSurface_Master.md
Normal file
@@ -0,0 +1,156 @@
|
||||
# 144 — Capture Surface Master Material (`M_CaptureSurface_Master`)
|
||||
|
||||
## Purpose
|
||||
Single master material for ALL capture surface modes (mirror, portal, monitor, horror, fake window). All features are parameter-driven — inactive features have zero rendering cost.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `MPC_CaptureSurface` (145) for global scalar parameters
|
||||
- **Required By:** All capture surface actors (139-143) via their material instances
|
||||
- **Engine/Plugin Requirements:** None
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Material Domain** | Surface |
|
||||
| **Blend Mode** | Opaque |
|
||||
| **Shading Model** | Unlit |
|
||||
| **Asset Path** | `Content/Framework/Capture/M_CaptureSurface_Master.uasset` |
|
||||
| **C++ Status** | N/A (Material asset) |
|
||||
| **Asset to Create** | Material in UE5 editor |
|
||||
|
||||
## 1. Material Layer Stack (9 Layers)
|
||||
|
||||
### Layer 0: Render Target Sample
|
||||
```
|
||||
Texture Sample (parameter: "CaptureTexture", TextureRenderTarget2D)
|
||||
├─ UVs: If Mirror mode → UV * (1, -1) + (0, 1) [flip vertically for mirror reflection]
|
||||
│ If Portal/Monitor mode → straight UVs
|
||||
└─ Output → Base Color input of Layer 1
|
||||
```
|
||||
**Switch:** `StaticSwitchParameter: bIsMirror` (true = UV flip, false = straight)
|
||||
|
||||
### Layer 1: Condensation UV Distortion
|
||||
```
|
||||
Condensation Normal Map (Texture Sample, parameter: "CondensationNormal")
|
||||
├─ UVs: Panner (slow drift, driven by Time * CondensationFlow MPC param)
|
||||
├─ Normal strength: DistortionAmplitude MPC param
|
||||
└─ Output: Modified UVs for Layer 0's texture sample
|
||||
```
|
||||
**Note:** Layer 1 modifies the UVs of Layer 0, not its color.
|
||||
|
||||
### Layer 2: Fresnel Edge Fade
|
||||
```
|
||||
Fresnel node (Exponent = 2.0, BaseReflectFraction = 0.0)
|
||||
├─ Dot product: CameraVector · VertexNormal
|
||||
└─ Output: Opacity mask for edge darkening (subtle vignette)
|
||||
```
|
||||
|
||||
### Layer 3: Dirt / Scratch Multiply
|
||||
```
|
||||
Dirt Mask (Texture Sample, parameter: "DirtMask")
|
||||
├─ Multiply with DirtOpacity MPC param
|
||||
├─ Lerp: Clean RT ←→ Dirty RT using DirtOpacity
|
||||
└─ Tint: Mix with SurfaceAge MPC param (yellowing/oxidation)
|
||||
```
|
||||
|
||||
### Layer 4: Steam / Fog Lerp
|
||||
```
|
||||
Animated Noise (Procedural noise, tiling, scrolling via Time)
|
||||
├─ SteamIntensity MPC param → controls noise opacity
|
||||
├─ Lerp: Clear view ←→ Fogged view
|
||||
└─ Output: blended base color
|
||||
```
|
||||
|
||||
### Layer 5: Steam Emissive Glow
|
||||
```
|
||||
Steam mask (same noise as Layer 4, separate brightness)
|
||||
├─ Multiply by SteamEmissiveIntensity MPC param
|
||||
├─ Color: Soft warm white (backlit fog look)
|
||||
└─ Output → Emissive Color pin
|
||||
```
|
||||
|
||||
### Layer 6: Text Reveal Mask
|
||||
```
|
||||
Text Mask (Texture Sample, parameter: "TextRevealMask")
|
||||
├─ Reveal progress: TextRevealProgress MPC param (0→1 wipe)
|
||||
├─ Blend with steam carrier (appears as text IN the steam)
|
||||
└─ Output: emissive text overlay (optional) or color replacement
|
||||
```
|
||||
|
||||
### Layer 7: Mirror Darkness Multiply
|
||||
```
|
||||
MirrorDarkness MPC param (0.0 = normal, 1.0 = black)
|
||||
├─ Multiply base color by (1.0 - MirrorDarkness)
|
||||
└─ Output: darkened reflection
|
||||
```
|
||||
|
||||
### Layer 8: Wrong Reflection Crossfade
|
||||
```
|
||||
Second RT Input (parameter: "DelayedCaptureTexture" OR separate RT)
|
||||
├─ Lerp: Current_RT ←→ Delayed/Wrong_RT using WrongReflectionBlend MPC param
|
||||
└─ Final Output → Emissive Color (Unlit material)
|
||||
```
|
||||
|
||||
## 2. Material Parameters (Exposed)
|
||||
|
||||
### Texture Parameters
|
||||
| Name | Type | Default | Description |
|
||||
|------|------|---------|-------------|
|
||||
| `CaptureTexture` | TextureRenderTarget2D | — | Live capture render target |
|
||||
| `CondensationNormal` | Texture2D | T_DefaultNormal | Condensation flow normal map |
|
||||
| `DirtMask` | Texture2D | T_DefaultWhite | Dirt/scratch mask texture |
|
||||
| `TextRevealMask` | Texture2D | T_DefaultBlack | Steam text mask |
|
||||
|
||||
### Scalar Parameters (Driven by MPC)
|
||||
| Name | Default | Description |
|
||||
|------|---------|-------------|
|
||||
| `SteamIntensity` | 0.0 | Steam fog opacity |
|
||||
| `DirtOpacity` | 0.0 | Dirt/scratch opacity |
|
||||
| `CondensationFlow` | 0.0 | Condensation normal scroll speed |
|
||||
| `DistortionAmplitude` | 0.0 | UV distortion magnitude |
|
||||
| `MirrorDarkness` | 0.0 | Mirror darkening |
|
||||
| `WrongReflectionBlend` | 0.0 | Wrong reflection crossfade |
|
||||
| `TextRevealProgress` | 0.0 | Steam text reveal progress |
|
||||
| `SteamEmissiveIntensity` | 0.0 | Steam glow brightness |
|
||||
| `DelayedReflectionBlend` | 0.0 | Delayed frame blend |
|
||||
| `SurfaceAge` | 0.0 | Oxidation/yellowing tint |
|
||||
|
||||
### Static Switch Parameters
|
||||
| Name | Default | Description |
|
||||
|------|---------|-------------|
|
||||
| `bIsMirror` | true | Enable vertical UV flip for mirror mode |
|
||||
| `bEnableHorrorLayers` | false | Enable Layers 6-8 (text reveal, darkness, wrong reflection) |
|
||||
|
||||
## 3. MPC Binding
|
||||
All 10 scalar parameters are NOT material-instance parameters — they are driven by `MPC_CaptureSurface` (145) at runtime. The C++ component calls `PushMPCParameters()` each frame to update these values globally.
|
||||
|
||||
In the material: use `Collection Parameter` nodes referencing `MPC_CaptureSurface` for each of the 10 scalars listed above.
|
||||
|
||||
## 4. Manual Implementation Guide
|
||||
|
||||
### 4.1 Create Master Material
|
||||
1. Create Material: Name = `M_CaptureSurface_Master`
|
||||
2. Set Material Domain = Surface, Blend Mode = Opaque, Shading Model = Unlit
|
||||
3. Build Layer 0: `Texture Sample Parameter` node named "CaptureTexture"
|
||||
4. Add Static Switch: "bIsMirror" → UV flip branch (Custom UV × (1,-1) + (0,1))
|
||||
5. Build Layers 1-8 as described above
|
||||
6. Connect final color → Emissive Color (Unlit output)
|
||||
|
||||
### 4.2 MPC Integration
|
||||
1. Create `Collection Parameter` nodes for each of the 10 MPC scalars
|
||||
2. Set the Collection asset to `MPC_CaptureSurface`
|
||||
3. Set the Parameter Name to match each MPC entry (e.g., "SteamIntensity")
|
||||
|
||||
### 4.3 Performance
|
||||
- Use `StaticSwitchParameter` for `bEnableHorrorLayers` — when false, Layers 6-8 are compiled out (zero cost)
|
||||
- Condensation normal Layer 1 is cheap (one texture sample + panner)
|
||||
- All MPC reads are free (constant buffer lookup)
|
||||
|
||||
## 5. Build Checklist
|
||||
- [ ] Create M_CaptureSurface_Master material in UE5 editor
|
||||
- [ ] Set Domain=Surface, Blend=Opaque, Shading=Unlit
|
||||
- [ ] Build all 9 layers (verify material compiles)
|
||||
- [ ] Add 10 MPC Collection Parameter nodes
|
||||
- [ ] Add bIsMirror and bEnableHorrorLayers static switches
|
||||
- [ ] Compile material — no errors
|
||||
- [ ] Create MI instances and verify parameter override works
|
||||
72
docs/blueprints/17-capture/145_MPC_CaptureSurface.md
Normal file
72
docs/blueprints/17-capture/145_MPC_CaptureSurface.md
Normal file
@@ -0,0 +1,72 @@
|
||||
# 145 — Capture Surface Material Parameter Collection (`MPC_CaptureSurface`)
|
||||
|
||||
## Purpose
|
||||
Global Material Parameter Collection with 10 scalar parameters that control all capture surface material effects at runtime. Pushed each frame by `UBPC_PlanarCapture::PushMPCParameters()`.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** None (standalone MPC asset)
|
||||
- **Required By:** `M_CaptureSurface_Master` (144), all capture surface actors (139-143)
|
||||
- **Engine/Plugin Requirements:** None
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Asset Type** | MaterialParameterCollection |
|
||||
| **Asset Path** | `Content/Framework/Capture/MPC_CaptureSurface.uasset` |
|
||||
| **C++ Status** | N/A (content asset) |
|
||||
| **Asset to Create** | MPC in UE5 editor |
|
||||
|
||||
## 1. Scalar Parameters
|
||||
|
||||
| Parameter Name | Default Value | Range | Description |
|
||||
|---------------|---------------|-------|-------------|
|
||||
| `SteamIntensity` | 0.0 | 0.0–1.0 | Steam/fog opacity on mirror surface |
|
||||
| `DirtOpacity` | 0.0 | 0.0–1.0 | Dirt/scratch layer opacity |
|
||||
| `CondensationFlow` | 0.0 | 0.0–2.0 | Condensation normal map panning speed |
|
||||
| `DistortionAmplitude` | 0.0 | 0.0–1.0 | UV distortion magnitude (breathing mirror) |
|
||||
| `MirrorDarkness` | 0.0 | 0.0–1.0 | Mirror darkening (0=normal, 1=black) |
|
||||
| `WrongReflectionBlend` | 0.0 | 0.0–1.0 | Wrong reflection crossfade (horror mode) |
|
||||
| `TextRevealProgress` | 0.0 | 0.0–1.0 | Steam text reveal wipe progress |
|
||||
| `SteamEmissiveIntensity` | 0.0 | 0.0–5.0 | Backlit fog emissive brightness |
|
||||
| `DelayedReflectionBlend` | 0.0 | 0.0–1.0 | Delayed frame ring buffer blend |
|
||||
| `SurfaceAge` | 0.0 | 0.0–1.0 | Oxidation / yellowing tint amount |
|
||||
|
||||
## 2. Vector Parameters (Optional — Legendary Tier)
|
||||
|
||||
| Parameter Name | Default Value | Description |
|
||||
|---------------|---------------|-------------|
|
||||
| `SurfaceTintColor` | (1.0, 1.0, 1.0, 1.0) | Oxidation/aging color tint |
|
||||
| `SteamColor` | (0.8, 0.85, 0.9, 1.0) | Steam emissive color |
|
||||
|
||||
## 3. Runtime Control
|
||||
|
||||
All parameters are driven by C++ via `UBPC_PlanarCapture::PushMPCParameters()`. Blueprint actors call `SetSurfaceMPCParameter(Name, Value)` on the parent `BP_PlanarCaptureActor` to override specific values for that surface.
|
||||
|
||||
### Per-Surface Override Pattern
|
||||
```
|
||||
BP_HorrorMirror → SetSurfaceMPCParameter("WrongReflectionBlend", 1.0)
|
||||
└─ This sets the scalar on the surface's MID, which overrides the MPC value
|
||||
(MID overrides take priority over MPC in UE5 material system)
|
||||
```
|
||||
|
||||
### Global Override Pattern
|
||||
```
|
||||
SS_PlanarCaptureManager → all surfaces get MPC pushed each frame
|
||||
└─ A gameplay system changes MPC global → affects ALL mirrors/potals/monitors
|
||||
```
|
||||
|
||||
## 4. Manual Implementation Guide
|
||||
|
||||
1. Create Material Parameter Collection: Name = `MPC_CaptureSurface`
|
||||
2. Add all 10 scalar parameters with names and default values from Section 1
|
||||
3. Add 2 optional vector parameters if using color tinting
|
||||
4. Assign this MPC to every capture surface actor's `SurfaceMPC` variable
|
||||
5. In `M_CaptureSurface_Master`, link all `Collection Parameter` nodes to this MPC
|
||||
|
||||
## 5. Build Checklist
|
||||
- [ ] Create MPC_CaptureSurface in editor
|
||||
- [ ] Add all 10 scalar parameters
|
||||
- [ ] Add 2 vector parameters (optional)
|
||||
- [ ] Assign to all BP_* capture actors' SurfaceMPC variable
|
||||
- [ ] Verify material compiles with MPC references
|
||||
- [ ] Test: change SteamIntensity in MPC, verify all mirrors fog
|
||||
94
docs/blueprints/17-capture/146_DA_PlanarCaptureProfile.md
Normal file
94
docs/blueprints/17-capture/146_DA_PlanarCaptureProfile.md
Normal file
@@ -0,0 +1,94 @@
|
||||
# 146 — Planar Capture Profile Data Asset (`DA_PlanarCaptureProfile`)
|
||||
|
||||
## Purpose
|
||||
Designer-configurable capture profile for individual surfaces. Defines default mode, quality profile overrides, actor lists, and surface material. Referenced by `BP_PlanarCaptureActor` at BeginPlay.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `PlanarCaptureCommon.h` (C++ enums/structs)
|
||||
- **Required By:** All capture surface actors (139-143)
|
||||
- **Engine/Plugin Requirements:** None
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Parent Class** | `PrimaryDataAsset` (C++ may extend) |
|
||||
| **Class Type** | Data Asset |
|
||||
| **Asset Path** | `Content/Framework/Capture/DA_PlanarCaptureProfile.uasset` |
|
||||
| **C++ Status** | N/A (Data Asset) |
|
||||
| **Asset to Create** | Data Asset in UE5 editor |
|
||||
|
||||
## 1. Variables
|
||||
|
||||
| Variable | Type | Default | Description |
|
||||
|----------|------|---------|-------------|
|
||||
| `DefaultMode` | EPlanarCaptureMode | Mirror | Default capture mode |
|
||||
| `QualityProfileOverrides` | TArray〈FPlanarCaptureQualityProfile〉 | — | Override specific quality tier settings (0=Low, 1=Medium, 2=High, 3=Hero) |
|
||||
| `DefaultShowOnlyActors` | TArray〈FPlanarCaptureActorListEntry〉 | — | Pre-configured ShowOnly actors |
|
||||
| `DefaultHiddenActors` | TArray〈FPlanarCaptureActorListEntry〉 | — | Pre-configured Hidden actors |
|
||||
| `bStartEnabled` | bool | true | Surface starts active |
|
||||
| `bDestructible` | bool | false | Can be destroyed |
|
||||
| `SurfaceMaterialOverride` | TSoftObjectPtr〈UMaterialInterface〉 | — | Override surface material |
|
||||
| `SurfaceMPCOverride` | TSoftObjectPtr〈UMaterialParameterCollection〉 | — | Override MPC reference |
|
||||
| `DefaultFOV` | float | 90.0 | Override capture FOV |
|
||||
| `MaxViewDistance` | float | 5000.0 | Override max view distance |
|
||||
|
||||
## 2. Usage Pattern
|
||||
|
||||
### At BeginPlay (BP_PlanarCaptureActor)
|
||||
```
|
||||
Event BeginPlay
|
||||
├─ If DA_PlanarCaptureProfile is assigned:
|
||||
│ ├─ CaptureComponent.CaptureMode = Profile.DefaultMode
|
||||
│ ├─ CaptureComponent.CaptureFOV = Profile.DefaultFOV
|
||||
│ ├─ CaptureComponent.ShowOnlyActors = Profile.DefaultShowOnlyActors
|
||||
│ ├─ CaptureComponent.HiddenActors = Profile.DefaultHiddenActors
|
||||
│ ├─ bStartEnabled = Profile.bStartEnabled
|
||||
│ ├─ bDestructible = Profile.bDestructible
|
||||
│ ├─ [If SurfaceMaterialOverride] SetSurfaceMaterial(Override)
|
||||
│ └─ [If SurfaceMPCOverride] SurfaceMPC = Override
|
||||
└─ Continue with normal BeginPlay
|
||||
```
|
||||
|
||||
This allows placing 20 BP_Mirror instances in a level, each referencing a different DA_PlanarCaptureProfile — no per-instance variable tweaking needed.
|
||||
|
||||
## 3. Profile Examples
|
||||
|
||||
### Profile: HeroMirror
|
||||
| Variable | Value |
|
||||
|----------|-------|
|
||||
| DefaultMode | Mirror |
|
||||
| QualityProfileOverrides[3] | Hero: RT 2048, 60fps, Full Lumen, Post |
|
||||
| bStartEnabled | true |
|
||||
| bDestructible | false |
|
||||
|
||||
### Profile: SecurityMonitor
|
||||
| Variable | Value |
|
||||
|----------|-------|
|
||||
| DefaultMode | Monitor |
|
||||
| DefaultFOV | 70.0 |
|
||||
| QualityProfileOverrides[0] | Low: RT 256, 5fps |
|
||||
| MaxViewDistance | 3000.0 |
|
||||
|
||||
### Profile: HorrorMirror_ScareReady
|
||||
| Variable | Value |
|
||||
|----------|-------|
|
||||
| DefaultMode | HorrorMirror |
|
||||
| QualityProfileOverrides[3] | Hero: RT 2048, 12fps, DelayedFrame=5 |
|
||||
| bDestructible | true |
|
||||
| SurfaceMaterialOverride | MI_Mirror_Horror |
|
||||
|
||||
## 4. Manual Implementation Guide
|
||||
|
||||
1. Create Data Asset: Parent = `PrimaryDataAsset`, Name = `DA_PlanarCaptureProfile`
|
||||
2. Add variables as listed in Section 1 (create struct for QualityProfileOverrides if needed)
|
||||
3. Create multiple profile instances per surface type
|
||||
4. In each BP_* child, add variable: `CaptureProfile: DA_PlanarCaptureProfile` (Instance Editable, Expose on Spawn)
|
||||
5. In BeginPlay override, read profile and apply all settings before EnableSurface()
|
||||
|
||||
## 5. Build Checklist
|
||||
- [ ] Create DA_PlanarCaptureProfile Data Asset (or C++ struct)
|
||||
- [ ] Add all 10 variables
|
||||
- [ ] Create profile instances: DA_HeroMirror, DA_SecurityMonitor, DA_HorrorMirror
|
||||
- [ ] Add CaptureProfile variable to BP_PlanarCaptureActor
|
||||
- [ ] Wire BeginPlay to apply profile
|
||||
- [ ] Test: place mirror with different profiles, verify settings apply
|
||||
130
docs/blueprints/17-capture/147_MI_MirrorInstances.md
Normal file
130
docs/blueprints/17-capture/147_MI_MirrorInstances.md
Normal file
@@ -0,0 +1,130 @@
|
||||
# 147 — Capture Surface Material Instances (`MI_Mirror_*`, `MI_Portal_*`, `MI_Monitor_*`, `MI_FakeWindow_*`)
|
||||
|
||||
## Purpose
|
||||
Pre-configured Material Instance Constants (MICs) for common capture surface states. These are children of `M_CaptureSurface_Master` (144) with static switches and default parameters pre-set for each use case.
|
||||
|
||||
## Dependencies
|
||||
- **Requires:** `M_CaptureSurface_Master` (144), `MPC_CaptureSurface` (145)
|
||||
- **Required By:** All capture surface actors (139-143)
|
||||
- **Engine/Plugin Requirements:** None
|
||||
|
||||
## Class Info
|
||||
| Property | Value |
|
||||
|----------|-------|
|
||||
| **Asset Type** | MaterialInstanceConstant |
|
||||
| **Parent Material** | `M_CaptureSurface_Master` |
|
||||
| **Asset Path** | `Content/Framework/Capture/Materials/` |
|
||||
| **C++ Status** | N/A |
|
||||
| **Assets to Create** | 7 material instances |
|
||||
|
||||
## 1. Material Instance Catalog
|
||||
|
||||
### MI_Mirror_Clean
|
||||
| Static Switch | Value |
|
||||
|---------------|-------|
|
||||
| `bIsMirror` | `true` |
|
||||
| `bEnableHorrorLayers` | `false` |
|
||||
|
||||
| Scalar Override | Value | Note |
|
||||
|-----------------|-------|------|
|
||||
| `SteamIntensity` | 0.0 | No fog |
|
||||
| `DirtOpacity` | 0.0 | Clean |
|
||||
| `SurfaceAge` | 0.0 | No oxidation |
|
||||
|
||||
### MI_Mirror_Dirty
|
||||
| Static Switch | Value |
|
||||
|---------------|-------|
|
||||
| `bIsMirror` | `true` |
|
||||
| `bEnableHorrorLayers` | `false` |
|
||||
|
||||
| Scalar Override | Value | Note |
|
||||
|-----------------|-------|------|
|
||||
| `DirtOpacity` | 0.4 | Moderate dirt |
|
||||
| `SurfaceAge` | 0.3 | Slight yellowing |
|
||||
|
||||
### MI_Mirror_Steam
|
||||
| Static Switch | Value |
|
||||
|---------------|-------|
|
||||
| `bIsMirror` | `true` |
|
||||
| `bEnableHorrorLayers` | `false` |
|
||||
|
||||
| Scalar Override | Value | Note |
|
||||
|-----------------|-------|------|
|
||||
| `SteamIntensity` | 0.6 | Visible fog |
|
||||
| `CondensationFlow` | 0.5 | Slow rivulet drift |
|
||||
| `DistortionAmplitude` | 0.2 | Slight warp |
|
||||
| `SteamEmissiveIntensity` | 0.3 | Subtle glow |
|
||||
|
||||
### MI_Mirror_Horror
|
||||
| Static Switch | Value |
|
||||
|---------------|-------|
|
||||
| `bIsMirror` | `true` |
|
||||
| `bEnableHorrorLayers` | `true` |
|
||||
|
||||
| Scalar Override | Value | Note |
|
||||
|-----------------|-------|------|
|
||||
| `WrongReflectionBlend` | 0.0 | Starts off (driven by MPC at runtime) |
|
||||
| `MirrorDarkness` | 0.0 | Starts normal |
|
||||
| `TextRevealProgress` | 0.0 | Hidden until scare |
|
||||
| `DistortionAmplitude` | 0.0 | Normal until scare |
|
||||
|
||||
### MI_Portal_Standard
|
||||
| Static Switch | Value |
|
||||
|---------------|-------|
|
||||
| `bIsMirror` | `false` |
|
||||
| `bEnableHorrorLayers` | `false` |
|
||||
|
||||
| Texture Override | Value | Note |
|
||||
|------------------|-------|------|
|
||||
| `CaptureTexture` | (set at runtime by component) | RT assigned dynamically |
|
||||
|
||||
### MI_Monitor_Security
|
||||
| Static Switch | Value |
|
||||
|---------------|-------|
|
||||
| `bIsMirror` | `false` |
|
||||
| `bEnableHorrorLayers` | `false` |
|
||||
|
||||
| Scalar Override | Value | Note |
|
||||
|-----------------|-------|------|
|
||||
| `ScanlineIntensity` | 0.3 | CRT scanline overlay (add as custom parameter) |
|
||||
|
||||
### MI_FakeWindow_Interior
|
||||
| Static Switch | Value |
|
||||
|---------------|-------|
|
||||
| `bIsMirror` | `false` |
|
||||
| `bEnableHorrorLayers` | `false` |
|
||||
|
||||
| Scalar Override | Value | Note |
|
||||
|-----------------|-------|------|
|
||||
| `RainIntensity` | 0.0 | Weather overlay off (add as custom parameter) |
|
||||
| `FrostIntensity` | 0.0 | Weather overlay off (add as custom parameter) |
|
||||
|
||||
## 2. Usage Assignment
|
||||
|
||||
| Actor | Default MI | Swap Options |
|
||||
|-------|-----------|--------------|
|
||||
| `BP_Mirror` | MI_Mirror_Clean | MI_Mirror_Dirty, MI_Mirror_Steam |
|
||||
| `BP_Portal` | MI_Portal_Standard | — |
|
||||
| `BP_Monitor` | MI_Monitor_Security | PoweredOffMaterial (custom) |
|
||||
| `BP_HorrorMirror` | MI_Mirror_Horror | MI_Mirror_Clean (pre-scare), MI_Mirror_Steam |
|
||||
| `BP_FakeWindow` | MI_FakeWindow_Interior | — |
|
||||
|
||||
## 3. Manual Implementation Guide
|
||||
|
||||
1. Create all 7 Material Instance Constants
|
||||
2. Parent: `M_CaptureSurface_Master`
|
||||
3. For each, set Static Switch Parameters as listed above
|
||||
4. Set Scalar Parameter Overrides where non-zero
|
||||
5. Assign to corresponding Blueprint actor defaults
|
||||
6. Test: place mirror with MI_Mirror_Steam, verify fogged appearance
|
||||
|
||||
## 4. Build Checklist
|
||||
- [ ] Create MI_Mirror_Clean (bIsMirror=true, all scalars=0)
|
||||
- [ ] Create MI_Mirror_Dirty (DirtOpacity=0.4)
|
||||
- [ ] Create MI_Mirror_Steam (SteamIntensity=0.6)
|
||||
- [ ] Create MI_Mirror_Horror (bEnableHorrorLayers=true)
|
||||
- [ ] Create MI_Portal_Standard (bIsMirror=false)
|
||||
- [ ] Create MI_Monitor_Security (bIsMirror=false)
|
||||
- [ ] Create MI_FakeWindow_Interior (bIsMirror=false)
|
||||
- [ ] Assign defaults to each BP child's SurfaceMesh
|
||||
- [ ] Verify all compile without material errors
|
||||
Reference in New Issue
Block a user