Captura frames from a camera in the scene

Hello,

I’m searching a way to captura one or more frames from a camera in the scene. My project simulates a Lego NXT robot and i need to simulate a color sensor and later a camera sensor.

Any idea how can that be done? a magical camera.getFrame() :slight_smile:

Use the VideoTexture or bge.texture (in Blender 2.5) module to render the camera’s view to a texture. Check it out here. The API is for the VideoTexture module, but just swap out that with the bge.texture module, and it’ll be fine.

Perfect! Thank very much.

The only problem is i can’t find any documentation for bge.texture (i’m using 2.5). I managed to clear most of the erros but the play() function is not recognised. Is there an api for this? or any piece of documentation for blender 2.5.

Thank you

play() isn’t recognized? Odd… It works for me. Make sure it’s the source’s play function. I.E.

obj[‘texture’].source.play()

Yes, my bad. It works. so i have a texture that has as a source a scene camera and look very good. Any idea on how to capture a frame from that stream?

Maybe a matrix with RGB values for every pixel?