About Cameras


An essential part of rendering is determining the point of view for your scene. Any time you view a scene in Maya, you're looking through a camera. The four viewsTop, Front, Side, and Perspectiveare actually four different cameras. You can render from any of these views, but in most cases you'll want to create a new camera specifically for rendering.

Cameras determine your view of the scene as well as the view that is rendered. When you tumble and track in the Perspective view, you're really just moving and rotating the persp camera. You can switch any view to a camera you've created, and then tumble, track, and dolly to reposition it.

In addition to creating a standard camera, Maya also lets you create a camera and aim or a camera, aim, and up (Figure 16.3). A camera and aim has an extra aim control. You can move the camera and aim independently, and the camera automatically rotates so that it always points at the aim. A camera, aim, and up has an additional up control, which allows you to adjust the tilt of the camera.

Figure 16.3. From left to right: a camera; camera and aim; and camera, aim, and up.


To create and adjust a camera:

1.

Choose Create > Cameras > Camera.

A new camera appears in the scene (Figure 16.4).

Figure 16.4. When a new camera is created, it appears at the origin.


2.

Use the Move and Rotate tools to adjust the camera's position and angle.

3.

From the Panels menu in the Perspective view, select Look Through Selected.

You're now looking through the camera that you just created. Note that the camera name at the bottom of the view has changed from persp to camera1 (Figure 16.5).

Figure 16.5. The camera has been moved and rotated, and the Perspective view has been switched to looking through the camera.


4.

Dolly, track, and tumble to further adjust the camera's placement.

Tips

  • You can also change the camera you're looking through from the Panels > Perspective menu in the Perspective view (Figure 16.6).

    Figure 16.6. You can use the Panels > Perspective menu in any view to switch to a different camera.


  • Scaling a camera can make it easier to select, and doing so doesn't affect your view through it.


To create and adjust a camera and aim:

1.

Choose Create > Cameras > Camera and Aim.

A new camera appears in the Perspective view. The dot in front of the camera is the aim (Figure 16.7).

Figure 16.7. A camera and aim has been created. The aim is represented by a small circle with a dot in the middle.


2.

Open the Outliner, either by selecting it from the Window menu or by switching to a layout that includes it in a panel.

3.

In the Outliner, select the group node of the camera (Figure 16.8).

Figure 16.8. Click to select the camera group in the Outliner.


4.

Move the camera group.

The aim and camera move together.

5.

In the Perspective view, select and then move the aim.

The camera rotates to point at the aim.

6.

In the Perspective view, select and then move the camera.

The camera moves, but it continues to point at the aim (Figure 16.9).

Figure 16.9. Wherever you move the aim, the camera rotates to point at it.


Tip

  • You can change whether the camera has an aim or aim and up control after the camera has been created. Select the camera and open the Attribute Editor, and then expand the Camera Attributes section if necessary. You can choose among the three types of cameras from the Controls drop-down menu (Figure 16.10).

    Figure 16.10. You can change a camera's control type in the Attribute Editor.


Animating the camera

By animating a camera, you can simulate the camera motion used in real-world film or create fly-throughs and other shots that would be impossible with a physical camera. You can also simulate camera cuts, where the view appears to switch to another camera at a different angle, simply by keyframing a camera using stepped tangents.

Animating a camera is, in essence, the same as animating anything else: You select it, keyframe it, change the current time, move it, and keyframe it again. It's often convenient to move a camera by tumbling, tracking, and dollying while using it to view your scene. Animation techniques like stepped tangents and motion paths can be very useful for animating cameras. Also, if your camera has an aim control, you can animate it independently, or even constrain it to another object.

One point you need to understand before you begin animating is that the selected camera isn't necessarily the one you're looking through. You can see the name of the camera you're looking through at the bottom of the view, and you can see the name of the currently selected camera in the Channel Box (Figure 16.11). One common mistake is to move the view and then set keyframes without having the camera you're looking through selected. If you do this, the camera won't be keyframed.

Figure 16.11. Here camera1 is selected, but the view is from the perspective camera, indicated by persp at the bottom of the view.


To animate the camera using tumble, track, and dolly:

1.

Create some objects, and arrange them in the scene so you have something to look at.

2.

From the View menu in the Perspective view, choose Select Camera (Figure 16.12).

Figure 16.12. You can select a view's camera from its View menu.


3.

Press to keyframe the camera.

4.

In the Time Slider, change the current frame to 30 by clicking the number 30 (Figure 16.13).

Figure 16.13. Click 30 in the Time Slider to move to frame 30.


5.

Tumble, track, and dolly the camera to change the point of view.

(See Chapter 2 for more on how to tumble, track, and dolly.)

6.

Press to keyframe the camera again.

7.

Play the animation by clicking the play button in the timeline .

Because the camera's motion is animated, the view changes as you play the animation (Figure 16.14).

Figure 16.14. When you click play, the view changes over time, reflecting the camera's animation.


To make the aim of the camera follow an object:

1.

Choose Create > NURBS Primitives > Sphere.

2.

Choose Create > Cameras > Camera and Aim.

A new camera with an aim control appears in the scene.

3.

While the camera and aim are still selected, move them so that the aim control is at the center of the sphere (Figure 16.15).

Figure 16.15. When a camera and aim is created, both the camera and its aim are selected, so you can move them together.


4.

Select the sphere, and then -select the aim of the newly created camera.

5.

From the Constrain menu in the Animation menu set, choose Point.

The aim of the camera is point constrained to the sphere.

6.

Select and move the sphere.

The camera aims at the sphere (Figure 16.16). You can now animate the sphere, and the camera will automatically follow it.

Figure 16.16. Once the camera's aim is point constrained to the sphere, the camera automatically aims at it.


To animate a camera along a path:

1.

Create a row of cones.

2.

In the Top view, create a NURBS curve that weaves through the cones (Figure 16.17).

Figure 16.17. It's easiest to create this curve from the Top view.


3.

Choose Create > Cameras > Camera.

A new camera appears in the scene.

4.

With the camera still selected, -select the curve.

5.

Choose Animate > Motion Paths > Attach to Motion Path.

The camera jumps to the beginning of the path, but it may not be pointing in the right direction (Figure 16.18).

Figure 16.18. The camera is attached to this motion path, so it jumps to the beginning of the curve. However, it's facing the wrong way.


6.

With the camera still selected, click motionPath1 in the Inputs section of the Channel Box.

Four attributes of the motion path appear.

7.

Click Up Twist in the Channel Box, and then click and drag with the middle mouse button in the Perspective view until the camera is pointing down the path correctly.

8.

Click the play button to play the animation.

The camera travels down the path (Figure 16.19).

Figure 16.19. The camera, now oriented correctly, follows the curve as the animation is played back.


About the frustum

The frustum is the volume of space that can be viewed by a camera. Its cross-section is determined by the render resolution, and its depth is determined by the near and far clipping planes(Figure 16.20). The near clipping plane prevents objects that are too close to the camera from being displayed or rendered (Figure 16.21), and the far clipping plane does the same for distant objects. If this creates undesirable results for your scene, you can adjust the clipping planes in the Attribute Editor.

Figure 16.20. A camera's frustum encompasses the area that the camera can render; it's bounded by the near and far clipping planes.


Figure 16.21. In this extreme close-up, the character's nose is intersected by the near clipping plane in the Perspective view, making part of it invisible.


Depending on its aspect ratio (which is the ratio between width and height), a view may display a larger area than is encompassed by the camera's frustum. If you want to know what portion of a view will be visible when the scene is rendered, you can turn on the resolution gate for the camera. This displays a rectangular outline around the area that will be rendered.

To adjust the clipping planes:

1.

Select the camera.

2.

Press to display the Attribute Editor.

3.

Under Camera Attributes, enter a new value for Near Clip Plane or Far Clip Plane.

To display the resolution gate:

  • In the View menu of the camera's view, choose Camera Settings > Resolution Gate.

    A rectangle frames the area that will be rendered (Figure 16.22).

    Figure 16.22. The resolution gate indicates the area of the view that will be rendered.


Focal Length

Adjusting a camera's Focal Length attribute creates a zoom effect, making objects in the view appear larger or smaller. This is different from dollying in and out, because the camera doesn't actually move. Instead, the camera's angle of view gets wider or narrower (Figure 16.23). When the focal length is decreased, the angle gets wider, so more of the scene is visible in the view. Increasing the focal length makes the angle of view narrower so that less of the scene is displayed in the view. Decreasing the focal length also has the effect of exaggerating distances, whereas increasing it flattens them.

Figure 16.23. A wider angle of view (right) means objects will appear smaller, although the distance of the camera doesn't change.


To adjust a camera's focal length:

1.

Create a cube at the origin (Figure 16.24).

Figure 16.24. This cube appears as usual in the Perspective view, which has a default focal length of 35.


2.

From the View menu in the Perspective view, choose Select Camera.

The perspective camera becomes selected.

3.

In the Channel Box, change Focal Length to 10.

The cube seems farther away (Figure 16.25).

Figure 16.25. With the focal length set to 10, the cube seems much further away, even though the camera hasn't moved.


4.

Dolly the camera in toward the object.

The object appears to be distorted (Figure 16.26).

Figure 16.26. The camera has been moved close to the cube, with the focal length still set to 10. The effect is similar to that of a fisheye lens.


Depth of field

A real camera can only focus within a specific range, referred to as its depth of field. Objects that are in focus appear sharp. Objects that are out of focus, either because they're too close to the camera or too far away from it, are blurred. You can re-create this effect in Maya. Depth of field can be useful when you want your rendered image to look like a photograph, or when you're trying to focus the viewer's attention on a specific area of your scene.

To use depth of field:

1.

Create a scene with three spheres and a plane. Move the spheres so that one is close to the camera, one is at the origin of the scene, and one is far away (Figure 16.27).

Figure 16.27. These spheres are positioned to display a depth of field effect when rendered.


2.

Assign a checkerboard material to the spheres.(See Chapter 14, "Shaders, Materials, and Mapping" for more information.)

This will help you see the final depth of field effect.

3.

From the View menu in the Perspective view, choose Select Camera.

The perspective camera becomes selected.

4.

Open the Channel Box.

The camera's attributes are displayed.

5.

Set FStop to 32.

A larger FStop value will cause a larger portion of the scene to be in focus.

6.

Set Focus Distance to approximately the same value as Center Of Interest (Figure 16.28).

Figure 16.28. The Focus Distance setting allows you to determine where the depth of field effect is centered.


Focus Distance determines the midpoint of the area that is in focus. Center Of Interest is the distance from the camera to the origin, where the middle sphere is positioned. Setting Focus Distance to the same value as Center Of Interest ensures that the middle sphere is in focus.

7.

Open the Attribute Editor. In the Depth of Field section, select the Depth Of Field check box (Figure 16.29).

Figure 16.29. You must enable depth of field for a camera to use the effect.


This option enables depth of field for the camera.

8.

Choose Render > Render Current Frame.

The scene is rendered. The depth of field causes the middle sphere to be in focus, while the other two are blurred and out-of-focus (Figure 16.30).

Figure 16.30. Depth of field causes the sphere closest to the camera and the sphere farthest from the camera to be blurred.


Image planes

An image plane is a component of the camera that remains in the background of the view regardless of how the camera is moved. An image plane can come in handy when you want to use an image as a template for modeling a character. Because image planes are rendered with the scene, you can also use an image plane as a backdrop.

To create an image plane:

1.

From the View menu of the Perspective view, select Image Plane > Import Image.

An Open dialog box appears.

2.

Browse for your image, and click Open.

The image plane now appears behind all the objects visible in the view (Figure 16.31).

Figure 16.31. A sky image has been added to the background of this scene. This image plane will stay in the same place relative to the camera even if you tumble, track, or dolly.


To position an image plane:

1.

Change the selection mask to Select by Component Type , and select the Miscellaneous icon .

2.

Click the image plane to select it.

3.

Open the Channel Box, and adjust the image plane's Offset X and Offset Y attributes (Figure 16.32).

Figure 16.32. Increasing the image plane's Offset Y causes it to appear higher in the view.


The image plane is now correctly positioned for your scene (Figure 16.33).

Figure 16.33. The sky image is now positioned correctly.


Tips

  • To delete an image plane, select it by following steps 1-2 above, and then press .

  • A quick way to hide an image plane is to uncheck Cameras on the view's Show menu. Because the image plane is a component of the camera, the image plane is also hidden.





Maya 7 for Windows and Macintosh(c) Visual Quickstart Guide
Maya 7 for Windows & Macintosh
ISBN: 0321348990
EAN: 2147483647
Year: 2006
Pages: 185

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net