Help with specific usage: only return images

Hello,

I would like to use Panda3D with a specific task in mind that it is a bit different from normal usage.

Essentially, I only want to get Panda to return images of various 3D objects. Mainly, I want to create a method such as the following:

getImage(cameraPos, cameraLookAt, cameraTwist)

or something similar. Calling this method would return an array that represents the image (in some format… numpy? or whatever is available)

How can I go about setting up this functionality? I don’t want the main drawing window to appear, as it only causes clutter and slows down things.

Thank you!

Hey, welcome to the forums!

Unless I misunderstood what you’re trying to do, you could try requesting an off-screen buffer (by setting the “window-type” PRC variable to “offscreen”), and rendering the ‘window’ to a texture. Then, you can store the texture(s) to disk.