[SOLVED] Render only one frame and other questions

Thank’s a lot, this greatly helps.

However, my application is really only a render-one-frame-and-go, rendering a frame and saving it to an image is really the only thing it does, so there’s no worry about networking and stuffs.

When I asked about performances, I was more specifically wondering if using Panda3D wouldn’t be overkill in my situation, where I just render 1 frame for every access to the script, but there can be maaaaanyyyy concurrent access at once. In the end, I think that the optimizations and the modularity makes Panda3D a perfect fit, as long as I load only the very specific modules I need.

Anyway, I’m still stuck at trying to do my rendering.

Your solution work (thank’s a lot!):

import direct.directbase.DirectStart

base.graphicsEngine.renderFrame()
base.screenshot(namePrefix='screenshot', defaultFilename=1, source=None, imageComment="")

But it still opens a window whenever I launch the script.

So I’ve stumbled over a few other threads on the subject, and this is what I pieced together:

from panda3d.core import loadPrcFileData
loadPrcFileData("", "window-type none" ) # Make sure we don't need a graphics engine (Will also prevent X errors / Display errors when starting on linux without X server)
loadPrcFileData("", "audio-library-name null" ) # Prevent ALSA errors

import direct.directbase.DirectStart

base.graphicsEngine.renderFrame()
base.screenshot(namePrefix='screenshot', defaultFilename=1, source=None, imageComment="")

NB: I think this tip should be in the manual for those who want to make a server-side application. This is a common application.

Anyway now the screenshot doesn’t work, as I expected, because it cannot find a window anymore!

So I’m stuck here, I’m trying to re-read the manual (I’ve spent the whole day reading it, it’s quite nice but long!) and the reference API, but I’m kinda stuck… Any help is welcome!