output the image
filepath = self.output_dir + '/images/' + str(i + 1) + '.png' bpy.context.scene.render.filepath = filepath
change the viewpoint
bpy.data.objects['Camera'].location = [20,1,0] bpy.data.objects['Camera'].rotation_euler = [20,30,40) ]
My objective is to let python program collect the images in all camera perspective, what I can do at the current time is to use the render function during the for loop
for i in range(0, car_num): self.changeCameraPerspective() self.saveLocalImage(i) bpy.ops.render.render(write_still = True)
however each new rendering take 2 minutes to load everything from the beginning.
so my question is how to program to make the scene change the camera perspective or modify the object at the runtime (without loading and rendering 2 minutes every time when a small change occurs) , like what we do in the game or 3d modeling?