MovieRenderPipeline.FrameStepDebug
MovieRenderPipeline.FrameStepDebug
#Overview
name: MovieRenderPipeline.FrameStepDebug
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
How many frames should the Movie Render Pipeline produce before pausing. Set to zero on launch to stall at the first frame. Debug tool.\n-1: Don\'t pause after each frame (default)\n0: Process engine ticks but don\'t progress in the movie rendering pipeline.\n1+: Run this many loops of the movie rendering pipeline before pausing again.\n
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of MovieRenderPipeline.FrameStepDebug is to provide a debugging tool for the Movie Render Pipeline in Unreal Engine 5. It allows developers to control the number of frames the pipeline should produce before pausing, which is particularly useful for debugging and inspecting the rendering process.
This setting variable is primarily used by the Movie Render Pipeline module, which is part of the MovieScene plugin in Unreal Engine 5. It’s specifically designed for the rendering system, focusing on the movie rendering pipeline.
The value of this variable is set through a console variable (CVar) named CVarMovieRenderPipelineFrameStepper. It can be set via the console or through code using the Set method of the CVar.
The associated variable CVarMovieRenderPipelineFrameStepper directly interacts with MovieRenderPipeline.FrameStepDebug. They share the same value and purpose.
Developers must be aware of the following when using this variable:
- The default value is -1, which means the pipeline won’t pause after each frame.
- Setting it to 0 will process engine ticks but won’t progress in the movie rendering pipeline.
- Values of 1 or greater will run that many loops of the movie rendering pipeline before pausing again.
Best practices when using this variable include:
- Use it judiciously during debugging sessions, as it can significantly slow down the rendering process.
- Remember to reset it to -1 when not actively debugging to ensure normal performance.
- Combine it with other debugging tools and breakpoints for comprehensive debugging of the movie rendering pipeline.
Regarding the associated variable CVarMovieRenderPipelineFrameStepper:
- It’s an TAutoConsoleVariable
that directly controls the frame stepping behavior. - It’s used in methods like IsDebugFrameStepIdling() and DebugFrameStepPreTick() to control the flow of the rendering pipeline.
- When using this variable, developers should be aware that it affects the entire movie rendering process and should be used carefully to avoid unintended pauses in production environments.
The best practice for using CVarMovieRenderPipelineFrameStepper is to modify it through the console or debugging interfaces rather than hardcoding changes, allowing for flexible debugging without code modifications.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipeline.cpp:64
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarMovieRenderPipelineFrameStepper(
TEXT("MovieRenderPipeline.FrameStepDebug"),
-1,
TEXT("How many frames should the Movie Render Pipeline produce before pausing. Set to zero on launch to stall at the first frame. Debug tool.\n")
TEXT("-1: Don't pause after each frame (default)\n")
TEXT("0: Process engine ticks but don't progress in the movie rendering pipeline.\n")
TEXT("1+: Run this many loops of the movie rendering pipeline before pausing again.\n"),
ECVF_Default);
#Associated Variable and Callsites
This variable is associated with another variable named CVarMovieRenderPipelineFrameStepper
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipeline.cpp:63
Scope: file
Source code excerpt:
#define LOCTEXT_NAMESPACE "MoviePipeline"
static TAutoConsoleVariable<int32> CVarMovieRenderPipelineFrameStepper(
TEXT("MovieRenderPipeline.FrameStepDebug"),
-1,
TEXT("How many frames should the Movie Render Pipeline produce before pausing. Set to zero on launch to stall at the first frame. Debug tool.\n")
TEXT("-1: Don't pause after each frame (default)\n")
TEXT("0: Process engine ticks but don't progress in the movie rendering pipeline.\n")
TEXT("1+: Run this many loops of the movie rendering pipeline before pausing again.\n"),
#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipeline.cpp:1315
Scope (from outer to inner):
file
function bool UMoviePipeline::IsDebugFrameStepIdling
Source code excerpt:
// take into account whether or not we've queued up a pause at the end of the frame
// which is indicator that we want to process the current frame.
int32 DebugFrameStepValue = CVarMovieRenderPipelineFrameStepper.GetValueOnGameThread();
return DebugFrameStepValue == 0 && !bPauseAtEndOfFrame;
}
bool UMoviePipeline::DebugFrameStepPreTick()
{
int32 DebugFrameStepValue = CVarMovieRenderPipelineFrameStepper.GetValueOnGameThread();
if (DebugFrameStepValue == 0)
{
// A value of 0 means that they are using the frame stepper and that we have stepped
// the specified number of frames. We will create a DeltaTime for the engine
// and not process anything below, which prevents us from trying to produce an
// output frame later.
#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipeline.cpp:1335
Scope (from outer to inner):
file
function bool UMoviePipeline::DebugFrameStepPreTick
Source code excerpt:
// They want to process at least one frame, deincrement, then we
// process the frame. We pause the game here to preserve render state.
CVarMovieRenderPipelineFrameStepper->Set(DebugFrameStepValue - 1, ECVF_SetByConsole);
// We want to run this one frame and then pause again at the end.
bPauseAtEndOfFrame = true;
}
return false;