Hi, I want to render a complex scene with animations into a video and I’m not sure which apporach I should take. I know there is the built-in
VideoRecorder in Babylon.js, but it uses the MediaRecorder which I don’t want to use. In case of a complex scene and a slow rendering device, the MediaRecorder won’t record the scene at smooth 60FPS (at least in my experiment it didn’t work). So what I want to achive is that every single frame gets rendered into the video and that no frame gets skipped.
So far, I had only success with running the engine in deterministic mode and pause the engine after each frame to fetch the image data from the canvas. But somehow the solution looks very hacky and I’m not sure if there is a better approach. I’ve tried also fetching the media stream but had so far no luck with it.
Here is my playground: Frame Rendering | Babylon.js Playground (babylonjs.com) and here is an example with the native video recording feature using the MediaRecorder on a “heavy” scene (video gets downloaded after a few seconds) Slow video rendering | Babylon.js Playground (babylonjs.com)
Any input would be helpful, thanks