Can some one help me out, maybe it’s a camera setting ?
I’m trying to render a dynamic texture imprinted on an object with render to texture.
The render to texture function works and projects the image from a camera that takes feed from some objects in the scene, but with the other camera in the scene pointed at the plane/wall I’m trying to render to file the image captured on the wall.
When I start the game engine the texture shows up fine in my cam view and I get a view on the wall from the other camera that takes feed from some objects in the scene. It’s sort of like a security cam, one cam takes image and imprints in on a wall that is sort of the monitor, and the other camera is pointed at the monitor wall to view it, like looking on a tv, problem is when I save to file the wall is blank in the image I saved and the dynamic texture is not there. But while I’m in the game viewing the texture is projected as a feed from the other camera.
I save with bpy render.render function to file. Can it be some camera setting ? or something else.
It works with screenshot function, but I have no way of controling screenshot function, I have to log in manually in the camera , where as with render.render the camera takes pictures and saves to file without me touching anything, setting viewport and so on, moving the scene.
Why is the dynamic texture not shown in the images I save ?
I want to take picture with camera that is pointed at the wall/monitor where the texture is imprinted.
Here is what I’m using.
scene = bpy.context.scene
bpy.context.scene.camera = bpy.context.scene.objects[“Camera”]
scene.render.resolution_x = 320
scene.render.resolution_y = 240
scene.render.resolution_percentage = 100
scene.render.image_settings.file_format = ‘JPEG’
scene.render.filepath = “/temp/”
bpy.ops.render.render(write_still = 1)
Saves image without the texture on the wall in the game engine .
It takes picture of wall from camera view regardless if I’m in or out of this camera view.
I can have set up multiple cameras each doing their thing like capturing scense from the game.
makescreenshot you have to log in manually in the camera view, but if I do log inside the camera view and I press start game it saves to file the image with the dynamic texture on it, like I saw it live in the game, I have no way of controlling screenshot function. I have to point manually where I want to take screenshot and then press start game engine.