0 votes

I want to render my game to image animation frames using a cheat code. This is what I am imagining:

1) Start Game and execute cheat code, like hold "R" key.
2) For every frame that the game is running, save to a subfolder of my game folder called "renderframes" on my computer.

How would I go about creating this?

in Engine by (85 points)

Rendering every frame this way might take a bit too long, maybe you could use a screen recording software?

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.

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: http://docs.godotengine.org/en/stable/classes/class_viewport.html?highlight=screenshot#class-viewport-queue-screen-capture

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.

1 Answer

+1 vote
by (106 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.

Categories