Getting the Screenshot from another Camera

Well, I have my whole world set up, I want to set a new camera, the will not be drawn to display, but, i need to get a Screenshot from it, or a AddRenderTexture from the vision of this new camera, doing all this without changing the view of the user.

I was making it from the same camera that makes the view of the game, all I needed to do was:

Tex = Texture(“new tex”)
win.addRenderTexture(Tex)

From now, Tex will be like a screenshot, but I want it to get the photo, from another camera, without changing the resulting screen.

Someone can help me please? ^^

Have you looked at the render2texture sample which comes with your panda installation? you should be able to save a buffer’s content to disk.

I didnt find any sample with this name, I tried to save a buffer already, using this code snippet: [HDScreenShot)

but i dont want to save it to file, i adapted it as well, but i dont know why, the buffer started to act weird, it was like the buffer was being rendered together within the main buffer.

Just use the texture returned by mybuffer.getTexture(); don’t create a new one, and don’t call win.addRenderTexture(). Also pass False instead of True for the last parameter of makeTextureBuffer(), and make the resolution more reasonable unless there’s really a reason you need that much space.

Sounds like you’re on the right track, though, but we can’t give you more specific advice unless you ask a more specific question. :slight_smile:

David

Thanks alot, my problem is solved, you guys helped alot.