|Attention||Topic was automatically imported from the old Question2Answer platform.|
|Old Version||Published before Godot 3 was released.|
I want to render my game to image animation frames using a cheat code. This is what I am imagining:
- Start Game and execute cheat code, like hold “R” key.
- For every frame that the game is running, save to a subfolder of my game folder called “_render_frames” on my computer.
How would I go about creating this?
Rendering every frame this way might take a bit too long, maybe you could use a screen recording software?
Zylann | 2017-11-16 01:52
Rendering every frame this way might take a bit too long, maybe you
could use a screen recording software?
Why would it take too long? I have my reasons for rendering out actual frames of my project. I am aware there are screen recorders that can do this. However, I don’t want a screen recorder for this task. I want the frame output to indicate actual frames in my project.
davidpgil | 2017-11-17 15:57
It may take too long because the engine is not designed to do this. You can see this straight away with the
take_screenshot API, you will see it waits before giving you the resulting image: Viewport — Godot Engine (stable) documentation in English
That’s because doing this, you are asking the renderer to lock the current frame and download it back to CPU side, which may stall rendering.
I also believe screen recorders use a specific driver to accomplish this in realtime, which Godot doesn’t use anyways because the engine isn’t designed for this.
You may try though, see if you get all frames. I’d be curious to know if it works.
Zylann | 2017-11-17 19:45