2
$\begingroup$

I would like to be able to render images from 12+ cameras all in one click. How would one accomplish this?

$\endgroup$
1
$\begingroup$

There are many ways to do this.

You can bind markers to cameras

(How can I make a camera the active one?.) and then render as an image sequence. Read: How swap views between multiple cameras? and continuous sequence of frames with multiple cameras with each camera starting at start of animation?

Or you can create different scenes, (Move a set to another scene even though it’s done) each one with a different active camera. Then on the compositor assign the output of each scene to a file node (or whatever it is that you want to do with the rendered images). Additional info here: https://blender.stackexchange.com/a/23371/1853 and how to take images with multiple cameras with Script?

Or you can have the same scene but with cameras in different collection (if you are using blender 2.8) and, again, accessing the output of those different collections in the compositor.

$\endgroup$
  • $\begingroup$ or write a short python script that loops through your camera objects setting them as the active camera "bpy.context.scene.camera = myCamObj" and renders to a unique filename "bpy.ops.render.render(write_still=True) " "bpy.context.scene.render.filepath = OUTPUTFILENAME" $\endgroup$ – rob May 23 at 14:49
  • $\begingroup$ @Rob please write an answer witht that info! $\endgroup$ – cegaton May 23 at 14:52
  • 1
    $\begingroup$ @Rob , yes, please do write an answer for that one! Being able to save the files automatically is ideal. $\endgroup$ – John Wesley May 23 at 15:56
2
$\begingroup$

From @Rob:

It will render all camera object with filename as camera name. Render path should set as a Directory

import bpy
import os

path_dir = bpy.context.scene.render.filepath #save for restore

for cam in [obj for obj in bpy.data.objects if obj.type == 'CAMERA']:
    bpy.context.scene.camera = cam
    bpy.context.scene.render.filepath = os.path.join(path_dir, cam.name)
    bpy.ops.render.render(write_still=True)
    bpy.context.scene.render.filepath = path_dir
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.