How do I change cameras during an animation?

Haven’t been able to find much info about using multiple cameras in animations.

Does anyone know any good tuts or have any info on how to use more than one camera in an animation please?

I don’t believe that you can actually change camera during an animation. However, there are two possible routes to take:

  1. Change the position of the camera using IPO curves, so that in one frame it’s in one position, and then in ther next frame it’s in the second position. (This can be a problem if you’re using motion blur)
  2. Make the two separate parts of your animation, then concatenate them together using Blender’s inbuilt sequence editor.
    Hope that helps. Just ask if you need any more info.

To elaborate on option 2:

Create a new scene and choose “Linked Copy”
In the new scene, switch to another camera.
Any changes to the objects (including animation etc) will automatically be carried between the scenes, but if you add a new object you’ll need to link it with Ctrl+L.
Then stitch the two scenes together with the Sequence Editor

Also, there is an option 3 involving a python script, but I don’t know the details.

You could use python for that.
First step, create a text file in the text editor and give it a name, for example ‘MyCameraChange’.
Then add this text to it:

import Blender
from Blender import *

def CheckCam():
	frame = Blender.Get("curframe")
	if (frame<=335 and frame >=1):
		Scene.getCurrent().setCurrentCamera(Object.Get("Camera01"))

	if (frame>=336):
		Scene.getCurrent().setCurrentCamera(Object.Get("Camera02"))

CheckCam()

Add and edit the if (frame… parts as much as you need. In this example the active camera from frame 1 up to and including frame 335 is Camera01 (this is the OB name of the camera), after that the active camera is Camera02

Then go to the script section (between logic and shading), ‘Display world script links’, add a New Selected scriptlink.
Leave the event set at FrameChanged. Enter as name of the scriptlink: ‘MyCameraChange’ (or whatever you named the textfile in the first step).

That’s it. I know it might sound a bit difficult, but it’s a really easy way.
If somehow you can’t figure it out and you do want to use this way, just ask for help and I’ll post an example blend-file.

Hey thanks very much for the info ppl.

I’ll give all those methods a go tomorrow and let you know how I get on.

I made a quick sample file, which can be found here. I’ll remove it after a week or something, because I don’t have much space on that account.

Spent the day trying all three methods and I can see that they all have their merits.

I could see myself using each method at different times and even combining them to achieve different results depending on the project and what I wanted to achieve.

Thanks again to all who contributed to this post.

My favourite method atm is the python script…it rocks…thanks for that :slight_smile:

I modified it to allow for a third camera:


import Blender 
from Blender import * 

def CheckCam(): 
   frame = Blender.Get("curframe") 
   if (frame<=25 and frame >=1): 
      Scene.getCurrent().setCurrentCamera(Object.Get("Camera01")) 

   if (frame<=50 and frame >=26): 
      Scene.getCurrent().setCurrentCamera(Object.Get("Camera02")) 

   if (frame>=51): 
      Scene.getCurrent().setCurrentCamera(Object.Get("Camera03")) 


CheckCam() 

For the benefit of others reading this who may not know, when you have more than one camera in a scene you may wish to know how to view from a different camera when hitting “0” on the numpad.

Just select the camera you wish to view from and hit “Ctrl+0”

I’m glad the script is of use to you.
Currently I’m trying to write a python script with a GUI (Graphical User Interface) for this problem, which also optionally hides the camera at a different layer if not active.
The idea is that you just select the camera you want to use and insert from which frame to which frame it should be active. I don’t know if I’ll succeed though, but if I do I’ll post a message over here.

EDIT: there already is a python script with a GUI by jms, you can find it here.

The best way to “change cameras” during an animation is … don’t. %|

Set up all of your cameras the way you want them. Then, shoot the scene from each camera angle separately, allowing about 1-second on either side for cutting.

Then, use a video editor or the Sequence Editor tool to cut the film together.

In the early stages of production, shoot quick-and-dirty “animatics” of each shot (using the button on the right-hand end of the 3D Window toolbar), and cut these together. In this way you can decide exactly how the film is going to flow, and you can make final decisions about exactly what you are going to need before you final-render any of it. And, unlike conventional filmmaking, you have to do that: it takes just one second to shoot one second’s worth of conventional film, whereas a CG rendering of the same amount might take all day.

Very useful stuff here, especially the animatics thing and python. Cheers!

Hey, wow! I have been looking for a great way to render a model from several angles for some time now. This is the best thing I have found since the script is saved and you do not have to re-do any work. I typically generate about 4 or 5 views of a model I create and it is tedious to sit there and wait for one to generate, then switch the camera and wait for the next one. Now, with this python script, I can simply hit ANIM and when I return, all 4 or 5 views will be created and saved for me. Too cool! Just thought this python script deserved a bump and a thanks. It saved me a lot of time and enegry!

reap