Repository navigation
Movie Render Pipeline
Offline cinematic rendering pipeline for high-quality frame output with deterministic time stepping and temporal accumulation.
Source: SparkEngine/Source/Engine/Rendering/MovieRenderPipeline.h
The Movie Render Pipeline renders cinematic sequences offline at arbitrary resolution and quality settings. Unlike real-time rendering, it steps the simulation deterministically at a fixed timestep, accumulates multiple sub-frames for anti-aliasing and motion blur, and writes each completed frame to disk.
The pipeline supports quality presets ranging from fast Preview (1x AA, no motion blur) to Cinematic (32x AA, 16 motion blur sub-frames). A DeterministicTimeController overrides the engine's delta time during rendering to ensure frame-perfect reproducibility. Optional warm-up frames allow particle systems, physics, and other time-dependent effects to settle before recording begins.
Output formats include PNG (8-bit RGBA), EXR (32-bit HDR), and TGA (uncompressed). Console variable overrides let you force maximum quality settings during the render without changing the game's runtime configuration.
MovieRenderPipeline (singleton)
+-- MovieRenderJob (active job state)
| +-- MovieRenderSettings (resolution, frame range, quality)
| +-- progress, timing, output file list
+-- DeterministicTimeController (fixed dt override)
+-- accumulation buffer (sub-frame blending)
+-- callbacks (per-frame, completion)
+-- completed jobs history
StartRender() --> [WarmUp frames] --> [Render frames]
|
For each frame: |
For each sub-frame: |
Step(fixedDt) |
CaptureFrame() |
--> Complete/Finalize
| Class | Description |
|---|---|
MovieRenderPipeline |
Singleton managing offline render jobs |
MovieRenderSettings |
Configuration for a render job (resolution, quality, frame range) |
MovieRenderJob |
Active or completed job with state, progress, and output files |
DeterministicTimeController |
Overrides engine time with fixed delta for reproducible simulation |
auto& pipeline = Spark::Rendering::MovieRenderPipeline::GetInstance();
pipeline.Initialize();
Spark::Rendering::MovieRenderSettings settings;
settings.width = 3840;
settings.height = 2160;
settings.frameRate = 24.0f;
settings.startFrame = 0;
settings.endFrame = 240;
settings.qualityPreset = Spark::Rendering::RenderQuality::Cinematic;
settings.outputFormat = Spark::Rendering::OutputFormat::EXR;
settings.warmUpFrames = 30;
settings.outputDirectory = "Renders/Scene01";
pipeline.SetFrameCapturedCallback([](int32_t frame, const std::string& path) {
// Per-frame notification
});
pipeline.StartRender(std::move(settings));
// In the main loop:
pipeline.Update(deltaTime); // Uses fixed dt internally
float progress = pipeline.GetProgress(); // 0.0 to 1.0| Method | Description |
|---|---|
Initialize() / Shutdown() |
Lifecycle management |
StartRender(settings) |
Begin an offline render job |
CancelRender() |
Cancel the active render |
Update(float dt) |
Per-frame update (call every frame) |
IsRendering() |
True if a render is in progress |
GetProgress() |
Current progress [0, 1] |
GetCurrentJob() |
Access the active job state |
GetCompletedJobs() |
History of completed jobs |
SetFrameCapturedCallback() |
Callback per captured frame |
SetRenderCompleteCallback() |
Callback on job completion |
| Field | Default | Description |
|---|---|---|
width / height |
1920x1080 | Output resolution |
frameRate |
30.0 | Target FPS |
startFrame / endFrame |
0 / 300 | Frame range (inclusive) |
qualityPreset |
Standard | Preview, Standard, High, Cinematic, Custom |
outputFormat |
PNG | PNG, EXR, TGA |
aaSamples |
1 | Temporal AA samples (1, 4, 8, 16, 32) |
motionBlurSubFrames |
1 | Motion blur sub-frames (1-16) |
warmUpFrames |
0 | Simulation warm-up before recording |
cvarOverrides |
empty | CVar key-value pairs to override during render |
| Preset | AA Samples | Motion Blur Sub-frames |
|---|---|---|
| Preview | 1 | 1 |
| Standard | 4 | 2 |
| High | 8 | 4 |
| Cinematic | 32 | 16 |
| Custom | user-defined | user-defined |
- Cinematic System -- Sequencer for driving camera and actors
- Graphics Engine -- RHI and rendering pipeline
- Screen Capture -- Pixel readback for frame output
Published from 2b03dc797148. Edit the canonical source in wiki/.
- Documentation
- Docs route
- Wiki index
- Guides
- Tutorials
- Samples
- Examples
- API Reference
- API route
- Reference
- Build Guide
- Dependencies
- FAQ
- Changelog
- Roadmap
- Contributing
- Code of Conduct
- Home
- FAQ
- Getting Started
- Quick-Start Tutorial
- Making Your First Game
- Making Your First Multiplayer Game
- Artist Workflow Guide
- Editor Walkthrough
- Migration Guide
- How SparkEngine Works
- Architecture Overview
- Engine Architecture Flowchart
- Creating a Game Module
- Game Modules (catalog)
- Entity Component System
- Rendering and Graphics
- Physics
- Cloth Simulation
- Audio
- Input System
- Camera System
- Scripting with AngelScript
- Visual Scripting
- AI and Navigation
- Animation
- 2D Systems
- Networking
- Dedicated Server
- Multiplayer Quick Start
- Area Server Architecture
- Scene Management
- Large World Support
- Collaborative Editing
- Coroutine System
- Event System
- Event Response System
- Job System
- UI System
- UI Layout Extensions
- Localization
- Dialogue System
- Destruction System
- Replay System
- Achievement System
- Loading System
- Mod System
- Content Delivery
- Tween System
- Memory Integrity
- Gameplay Systems
- Terrain and Procedural Generation
- Save System
- Persistence System
- Day Night Cycle and Weather
- Cinematic Sequencer
- Runtime Prefabs
- SparkEditor
- Editor Tutorials
- SparkConsole
- SparkDaemon
- Shader Pipeline
- Asset Pipeline
- Asset Validation
- Asset Migration
- Game Packaging
- Online Services
- DataTable System
- Loot and Crafting System
- CSG System
- Font System
- Timer Manager
- Movie Render Pipeline
- HLOD and World Partition
- Remote Debug System
- Selection Manager
- Asset Dependency Graph
- Editor Automation
- File Watcher
- Project Templates
- System Requirements
- VR Support
- Mobile Platform
- Accessibility
- Platform Input
- Platform Certification
- Cross-Compilation: Wine Testing
- RHI Abstraction Layer
- D3D11 Backend
- D3D12 Backend
- Vulkan Backend
- OpenGL Backend
- Metal Backend
- DXR Raytracing
- Hybrid Ray Tracing
- Upscaling (DLSS/FSR)
- Render Graph
- Shader Graph
- GPU Particles
- GPU-Driven Rendering
- Volumetric Fog
- Volumetric Clouds
- Global Illumination
- Virtual Texturing
- Water Rendering
- Clustered Lighting
- Material System
- Post-Processing
- Shadow System
- Particle System
- Decal System
- Sky and Atmosphere
- Foliage System
- Mesh Shaders
- Neural Rendering
- Configuration Reference
- Performance Tips
- Benchmark Framework
- Threading Model
- Fuzz Policy and Parser Security
- Memory Safety
- Memory Management Patterns
- Build System and CMake Modules
- Profiler and Debugging
- Performance Profiling Guide
- Telemetry System
- Crash Reporting
- Golden Image Testing
- Utilities
- Testing
- Fuzz Policy and Parser Security
- Codebase Statistics
- Codebase Health
- Error Handling Patterns
- Hot Reload Overview
- Troubleshooting
- Contributing
- Workflow Patterns
- Build Optimizations
- CI Reproducible Builds
- GitHub API and PR Checks
- Git Rebase Conflicts
- Clang-Format
- Code Quality Violations
- AI Bloat Pattern
- MinGW + Wine Cross-Compilation
- Live Editor Testing
- Engine & Renderer Landscape
- DuetOS Portability Catalog
- Five-Engine Analysis
- Eleven-Engine Analysis
- ThorVG / Unity Graphics Analysis
- Advanced Techniques Catalog
- Third-Party Library Evaluation
- Engine Viability Evaluation
- Engine Feature Recommendations
- Project Recommendations
- Mac Compatibility Analysis
- Codebase Observations
- Codebase Bloat Audit
- Test Suite Audit
- Documentation Coverage Audit
- ThirdParty Dependencies Audit
- Load Test Baseline
- Gameplay Systems Status
- SparkGame Module Status
- Stub and Abandoned Features
- Memory Integrity System
- Memory Safety Evaluation
- Hardware Acceleration Systems
- Jolt Physics Integration
- GPU/CPU Separation Plan
- Daemon Services Architecture
- Reflection & Polymorphism Refactoring Plan
- SparkBuild In-Tree
- Wine No-JobSystem Breakthrough
- Wine Role and Fallback Tiers