Render to a File


I have searched now like crazy to find out, how to put the output to a file and not to the screen. Like making an mpg film. Until now, I used a screencapturing program, but I am looking for a more direct way.

Just asked and now I found the answer.

The renderer (class com.jme.renderer.Renderer) has a method takeScreenShot. It "saves the current buffer to a png file." Exactly what I was looking for.

So to make the screenshot, write something like:


So it's solved.

You read my mind.  :smiley: I just thought, gee, I wonder how to save a screensh-- oh look, forum thread!

Thanks for posting the answer after you found it.