FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.76k stars 353 forks source link

How to capture rendered scene from Camera Node? #312

Closed mikhailzagurskiy closed 2 years ago

mikhailzagurskiy commented 2 years ago

I have just one camera and some cyclic movement of one dynamic object over one ground object. I want to record a video of the moving object (to avi or mp4) or at least series of the screen (or window or scene) frames with precise FPS.

How can I achieve that?

mrDIMAS commented 2 years ago

You could specify a render target for your scene and then after each engine.render call read the contents of the texture and dump it to the RAM. After that you could use some video encoder to write it to preferable format.