Render sequences at runtime?

We’re developing an app that renders out high res videos of sequences. Currently when you hit export, a command line instance of Unreal opens in the background and it executes a command to render the sequence. It works, but it’s slow and prevents us from ever packaging the app. Is there any way to build the rendering/exporting functionality into the main instance of the app itself? We’re using MovieSceneCapture.AutomatedLevelSequenceCapture in the command line and I see there’s a Cast To SequencerExportTask node, but not sure how to use them. Any ideas?

there’s a new renderer for sequencer in 4.25 maybe there’s new code for it. Movie Render Queue.
there’s like 2 different ways python fbx imports. so there must be multiple ways to render if there’s a new one out

Thanks, that’s super promising- it has a lot of the functionality we’re going to need to build. There’s so little documentation though, have you found any?

nope, I’m just fiddling with it at the moment myself, seems straightforward but there’s details that need to be worked out around

Hey Jake,
can you elaborate how you‘ve setup the background render? I need exactly that and don‘t care about packing the app (at the moment at least).

Any help or nudge in the right direction would be great!

Thanks!

No problem. I misspoke, it’s not actually a background render, it’s a render that launches in another UE4 instance. I’m not the engineer so I can’t speak to a lot of the details, but more or less we set up our scenes with a launch condition of “RENDER” that bypasses most of the “game” logic and runs a sequence export at its highest quality. So when we hit our render button, it sets a ton of variables- what save file, sequence, where is the engine, etc, and executes a command line command to run our Render.bat script. The script picks up the variables, the new instance of UE4 (with the render launch condition) opens and reads it, then executes the command. We render PNGs and then use FFMPEG to compress that into ProRes, but now that there’s ProRes support we’ll move to that soon. This is what the important parts of our Render.bat script looks like, I anonymized it with PROJECTNAME where needed.


set enginepath=%1
set enginepath=%enginepath:/=\%
set enginepath=%enginepath:"=%

set projpath=%2
set projpath=%projpath:/=\%
set projpath=%projpath:"=%

set savefile=%3
set savefile=%savefile:"=%

set resWidth=%4
set resHeight=%5

set RenderWidth=%6
set RenderHeight=%7

set AspectRatio=%8

)
copy "%projpath%Builds\renderable\WindowsNoEditor\PROJECTNAME\Saved\SaveGames\%savefile%.sav" "%projpath%Saved\SaveGames\%savefile%.sav"
"%enginepath%Engine\Binaries\Win64\UE4Editor.exe" "%projpath%PROJECTNAME.uproject" /Game/Maps/PARENTLEVEL -game -MovieSceneCaptureType="/Script/MovieSceneCapture.AutomatedLevelSequenceCapture" -LevelSequence="/Game/Audio/Music/Render_Seq" -MovieFrameRate=23.976 -noloadingscreen -NoTextureStreaming -ResX=%6 -ResY=%7 -ForceRes -CaptureGamut="HCGM_Rec709" -WINDOWED -VSync -MovieFolder="%projpath%Renders\%savefile%\ImgSeq" -MovieFormat=PNG -MovieQuality=100 -MovieDelayBeforeWarmUp=0 -MovieWarmUpFrames=0 -Render -LoadProfile=%savefile%.

"%projpath%Scripts\ffmpeg\bin\ffmpeg.exe" -f image2 -framerate 23.976 -i "%projpath%Renders\%savefile%\ImgSeq\PROJECTNAME.%%04d.png" -c:v prores_ks -profile:v 2 -vf scale=in_range=pc:out_range=pc -y -s %4x%5 -acodec copy "%projpath%Renders\%savefile%\%savefile%_%9_%8.mov"
"%projpath%Renders\%savefile%\%savefile%_%9_%8.mov"