Animating A Camera In Blender And Exporting to COLLADA Format

In this tutorial, I’ll show you how to rotate a camera around an object in Blender and export the scene to COLLADA format.

Making the Camera Circle an Object

Blender-Collada-tutorial2-Image1

Our object and camera, awaiting animation

The simplest way to rotate the camera around a target object is to add an Empty object at the location of the target, parent the camera to it, and then to rotate the empty. It’s less complicated than it might sound.

The steps are as follows:

Press Shift-A and select Camera. Position your camera, framing the object you want it to circle. You can see what your camera is looking at by pressing 0 on the Numpad.

Blender-Collada-tutorial2-Image2

You can position the camera using the normal transform tools like any other object. You can also move it around using the same controls you move the 3d view with. In the 3d View press N to open the properties panel and under View select Lock Camera to View.

Blender-Collada-tutorial2-Image3.jpg

Now when you press 0 the border of the camera view will be highlighted with a red dotted line. When you move and rotate the view with the mouse controls the camera moves and rotates to match it. When you have your object framed press 0 again to leave the camera view.

Blender-Collada-tutorial2-Image4

Select the object you want the camera to circle, press Shift-S and select Cursor to Selected. Objects added to the scene will be positioned at the location of the cursor.

Blender-Collada-tutorial2-Image5.jpg

Press Shift-A and select Empty -> Plain Axes

Blender-Collada-tutorial2-Image6.jpg

In the Outliner, select the camera, hold shift, then select the Empty. With the mouse over the 3d View, press Ctrl-P and select Object.

Blender-Collada-tutorial2-Image7.jpg

Now when you change the Z rotation of the Empty the camera will rotate around it in a circle.

Blender-Collada-tutorial2-Image8.jpg

Animating the Camera

Select the Empty in the Outliner. Press N to open the properties panel and enter 0 into the Rotation Z field if it is not already at 0.

With the mouse over the 3d view, press I and select LocRot. This creates a Keyframe which can be seen on the Timeline at the bottom of the interface. If you want to delete a Keyframe drag the pointer over it and with the mouse over the 3d view, press Alt-I and select Delete Keyframe.

Blender-Collada-tutorial2-Image9.jpg

Move the pointer to the end of the timeline at the 250 mark. Now set the Empty’s Rotation Z to 360. Press I again and select LocRot. There should now be two Keyframes on the Timeline. When you drag the pointer between them the camera will move around the target object in a circle.

Blender-Collada-tutorial2-Image10.jpg

To see view the camera’s animation, drag the pointer to the beginning of the timeline, press 0 on the numpad to enter camera view if you are not already in it, and select the Play button at the bottom of the Timeline view. The view should rotate around you object slowly. If it does you’re ready to export your animation.

Export into COLLADA

Select File > Export > Collada (Default) (.dae), navigate to the location you’d like to export the scene and animations to, and select Export COLLADA.

See the previous tutorial for more details on Blender’s Collada exporter.

Importing into Vanda Engine

Before importing the model into Vanda Engine, add “_LOD1.dae” post-fix to your dae file (for example Spaceship_LOd1.dae). No run Vanda Engine and make sure that you are in Prefab Mode (Mode | Prefab). Select File > Import > External Scene (*.dae) …, find the file you exported before, select it, and select open. Your scene should appear in the 3d window with a camera symbol rotating around your object. To view the scene through the animated camera, select Tools > Camera and Rendering…, select the imported camera from the list, and select Activate. The view should now rotate around the object.

The Author

Patrick Manhatton (macklehatton@gmail.com)
Patrick is an independent game designer interested in absolutely every aspect of making games. He does a little of everything involved in game development and a lot of conceptual design and 3d modelling. He is currently studying computer science and psychology and hopes work in research using games.

(c) copyright Zehne Ziba Co., Ltd. For more information, please refer to copyright notice.

adminAnimating A Camera In Blender And Exporting to COLLADA Format