Cameras overview

From Valve Developer Community
Jump to: navigation, search

Scene cameras represent the various viewpoints in your sequence; they're the cameras through which the scenes will be rendered. Each shot has its own scene camera. You can manipulate cameras the same way you manipulate other objects in your scene.

Note.png Note: A shot's scene camera may share a name with scene cameras in other shots bladed from the same master shot, but it's still a different camera.

Setting the scene camera

After loading your map, you have to set the scene camera.

To set the scene camera:

  1. In the viewport, in the lower-right corner, click the drop-down arrow on the right side of the active camera button (whose label currently says "<No Camera>").
  2. Under Change Scene Camera, click New Camera. The active camera button now displays the name of the new scene camera.

Now that you have set a scene camera, you can start navigating your map.

The scene camera and the viewport

The relationship between the scene camera and the viewport can be confusing at first. Sometimes you can navigate freely in the viewport with the scene camera, and sometimes you can't.

Whether or not you can navigate in the viewport with the scene camera depends on whether the scene camera already has animation attached to it. If it doesn't, you can navigate freely. Cameras you create directly in the viewport don't have animation attached yet.

If, however, your scene camera does have animation attached to it, you must select the camera's animation set in the Animation Set Editor before you can move around in a viewport using that camera, and doing so modifies the camera's animation.

What gets especially tricky is that a camera can have animation attached to it but not yet have an animation set in the Animation Set Editor. This happens when you record gameplay. The scene camera in your recorded gameplay is animated—it tracks your player character—but when you look in the Animation Set Editor, you won't see an entry for that camera. That's because the Animation Set Editor lists only the animation sets that you add manually; otherwise, it would list all the thousands of elements in your recorded gameplay, which would clutter it up and make it hard to find the animation sets that you're most likely to want to work with.

If you want to navigate in the viewport with a scene camera that was created by recording gameplay, you must first manually add an animation set for it as an existing element in the Animation Set Editor. Once you've done so, you can select that camera's animation set. Doing this turns the viewport into a camera manipulator; any movements you make in the viewport with the scene camera will modify the camera's animation set.

After you've got an animation set for the scene camera in the Animation Set Editor, you can animate the camera, zoom it, and otherwise modify its controls as you would any other controls.

The scene camera and the work camera

The active camera button in the lower-right corner of the viewport indicates which camera you're currently using: either the scene camera or the work camera.

The work camera is an extra camera whose movements are never recorded. This means that if, for example, you want to get a different angle on a character's face just to modify its expression, and you don't want to change the scene camera's animation to do so, you can use the work camera instead. The active camera button toggles between the scene camera and the work camera.

Tip.png Tip: To copy the scene camera's view to the work camera, hold down Ctrl and click the active camera button. You can copy the scene camera's view to the work camera anytime.

It can be confusing at first to remember which camera a viewport is currently using, even though the active camera button always reflects it. You may want to make a point of always putting the scene camera in the primary viewport and the work camera in the secondary viewport.

Tip.png Tip: If your layout currently contains only one viewport, you can add a second by clicking Secondary Viewport on the Windows menu, and then drag the secondary viewport's tab to move it where you want it to be. You can also choose a layout that has two viewports, such as the Sound Editing layout, by clicking Layouts on the Windows menu, and then choosing the layout you want.
Tip.png Tip: One way to visually differentiate the scene camera from the work camera is that by default, the work camera displays the frustum (field of view) of the scene camera as a white wireframe.

See also