I am currently building a simulator using the Blender Game Engine. I got stuck at the point where I need to extract the camera image from the virtual camera.
I've found the VideoTexture.ImageRender class but this class does not provide any image.
The code I am using is the following:
import GameLogic import VideoTexture scene = GameLogic.getCurrentScene() cam = scene.active_camera imageRender = VideoTexture.ImageRender(scene, cam) imageRender.refresh() if(imageRender.valid): print(imageRender.image) else: print("No image available")
The output imageRender.image is always
None. Am I missing something? Anyone knows where the problem might be?
Thank you very much for your help.