Chapter 26: Configuring Cameras


Do you remember as a kid when you first got your own camera? After taking the usual pictures of your dog and the neighbor's fence, you quickly learned how much fun you could have with camera placement, such as a picture of a flagpole from the top of the flagpole or your mom's timeless expression when she found you inside the dryer. Cameras in Max can also offer all kinds of amusing views of your scene.

The benefit of cameras is that you can position them anywhere within a scene to offer a custom view. You can open camera views in a viewport, and you can also use them to render images or animated sequences. Cameras in Max can also be animated (without damaging the camera, even if your mischievous older brother turns on the dryer).

In the Camera Parameters rollout is a section for enabling Multi-Pass Camera Effects. These effects include Motion Blur and Depth of Field. Essentially, these effects are accomplished by taking several rendered images of a scene and combining them with some processing.

Learning to Work with Cameras

If you're a photography hobbyist or like to take your video camera out and shoot your own footage, then many of the terms in this section will be familiar to you. The cameras used in Max to get custom views of a scene behave in many respects just like real-world cameras.

Max and real-world cameras both work with different lens settings, which are measured and defined in millimeters. You can select from a variety of preset stock lenses, including 35mm, 80mm, and even 200mm. Max cameras also offer complete control over the camera's focal length, field of view, and perspective for wide-angle or telephoto shots. The big difference is that you never have to worry about setting flashes, replacing batteries, or loading film.

Light coming into a camera is bent through the camera lens and focused on the film, where the image is captured. The distance between the film and the lens is known as the focal length. This distance is measured in millimeters, and you can change it by switching to a different lens. On a camera that shoots 35mm film, |a lens with a focal length of 50mm produces a view similar to what your eyes would see. A lens with a focal length less than 50mm is known as a wide-angle lens because it displays a wider view of the scene. A lens longer than 50mm is called a telephoto lens because it has the ability to give a closer view of objects for more detail, as a telescope does.

Field of view is directly related to focal length and is a measurement of how much of the scene is visible. It is measured in degrees. The shorter the focal length, the wider the field of view.

When we look at a scene, objects appear larger if they are up close than they would be lying at a farther distance. This effect is referred to as perspective and helps us to interpret distances. As mentioned, a 50mm lens gives a perspective similar to what our eyes give. Images taken with a wide field of view look distorted because the effect of perspective is increased.

Creating a camera object

To create a camera object, you can use the Create image from book Cameras menu, or you can open the familiar Create panel and click the Cameras category button. The two types of cameras that you can create are a Free camera and a Target camera.

Camera objects are visible as icons in the viewports, but they aren't rendered. The camera icon looks like a box with a smaller box in front of it, which represents the lens or front end of the camera. Both the Free and Target camera types include a rectangular cone that shows where the camera is pointing.

Free camera

The Free camera object offers a view of the area that is directly in front of the camera and is the better choice if the camera will be animated. When a Free camera is initially created, it points at the negative Z-axis of the active viewport.

Target camera

A Target camera always points at a controllable target point some distance in front of the camera. Target cameras are easy to aim and are useful for situations where the camera won't move. To create this type of camera, click a viewport to position the camera and drag to the location of its target. The target can be named along with the camera. When a target is created, Max automatically names the target by attaching ".target" to the end of the camera name. You can change this default name by typing a different name in the Name field.

Creating a camera view

You can change any viewport to show a camera's viewpoint. To do so, right-click the viewport's title, and select View and the camera's name from the pop-up menu. Any movements done to the camera are reflected immediately in the viewport.

Another way to select a camera for a viewport is to press the C key. This keyboard shortcut makes the active viewport into a camera view. If several cameras exist in a scene, then the Select Camera dialog box appears, from which you can select a camera to use. You also can select a camera and choose the Set View to Selected Camera from the right-click pop-up menu. Figure 26.1 shows two Target cameras pointing at a car. The two viewports on the right are the views from these cameras.

image from book
Figure 26.1: A car as seen by two different cameras

You can turn off the camera object icons using the Display panel. In the Display panel, under the Hide by Category rollout, select the Cameras option. When selected, the camera icons are not visible in the viewports.

Note 

Cameras are usually positioned at some distance away from the rest of the scene. Their distant position can make scene objects appear very small when the Zoom Extents button is used. If the visibility of the camera icons is turned off, Zoom Extents does not include them in the zoom. You can also enable the Ignore Extents option in the camera's Object Properties dialog box.

Tutorial: Setting up an opponent's view

There is no limit to the number of cameras that you can place in a scene. Placing two cameras in a scene showing a game of checkers lets you see the game from the perspective of either player.

To create a new aligned view from the opponent's perspective, follow these steps:

  1. Open the image from book Checkers game.max file from the Chap 26 directory on the DVD.

  2. Select Create image from book Cameras image from book Target Camera, and drag in the Top viewport to create the camera. Then give the new camera the name Opponents Camera.

  3. Position the new target camera behind the opponent's pieces roughly symmetrical to the other camera.

  4. With the new camera selected, drag the target point and position it on top of the other camera's target point somewhere below the center of the board.

To see the new camera view, right-click the Perspective viewport title and choose View image from book Black Camera (or select the camera and the Perspective viewport, and press the C key). Figure 26.2 shows the view from this camera.

image from book
Figure 26.2: Positioning an additional camera behind the Black player's pieces offers the opponent's view.

Controlling a camera

I was once on a ride at Disneyland when a person behind me decided to blatantly disregard the signs not to take photographs. As he leaned over to snap another picture, I heard a fumbling noise, a faint, "Oh no," and then the distinct sound of his camera falling into the depths of the ride. (That was actually more enjoyable than the ride. It served him right.) As this example shows, controlling a camera can be difficult. This chapter offers many tips and tricks for dealing with the cameras in Max, and you won't have to worry about dropping them.

You control the camera view in a viewport by means of the Camera Navigation controls located in the lower-right corner of the screen. These controls replace the viewport controls when a camera view is selected and are different from the normal Viewport Navigation controls. The Camera Navigation controls are identified and defined in Table 26.1.

Table 26.1: Camera Navigation Control Buttons
Open table as spreadsheet

Control

Button Name

Description

image from book

Dolly Camera, Dolly Target, Dolly Camera +Target

Moves the camera, its target, or both the camera and its target closer to or farther away from the scene in the direction it is pointing.

image from book

Perspective

Increases or decreases the viewport's perspective by dollying the camera and altering its field of view.

image from book

Roll Camera

Spins the camera about its local Z-axis.

image from book

Zoom Extents All, Zoom Extents All Selected

Zooms in on all objects or the selected objects by reducing the field of view until the objects fill the viewport.

image from book

Field of View

Changes the width of the view, similar to changing the camera lens or zooming without moving the camera.

image from book

Truck Camera, Walk Through

The Truck Camera button moves the camera perpendicular to the line of sight, and the Walk Through button enables a mode in which you can control the camera using the arrow keys and the mouse.

image from book

Orbit, Pan Camera

The Orbit button rotates the camera around the target, and the Pan button rotates the target around the camera.

image from book

Min/Max Toggle

Makes the current viewport fill the screen. Clicking this button a second time returns the display to several viewports.

Note 

Many of these controls are identical to the controls for lights.

You can constrain the movements to a single axis by holding down the Shift key. The Ctrl key causes the movements to increase rapidly. For example, holding down the Ctrl key while dragging the Perspective tool magnifies the amount of perspective applied to the viewport.

You can undo changes in the normal viewports using the Views image from book Undo (Shift+Z) command, but you undo camera viewport changes with the regular Edit image from book Undo command because it involves the movement of an

Note 

If a Free camera is selected, then the Dolly Target and Dolly Camera + Target buttons are not available.

Aiming a camera

In addition to the Camera Navigation buttons, you can use the Transformation buttons on the main toolbar to reposition the camera object. To move a camera, select the camera object and click the Select and Move button (W). Then drag in the viewports to move the camera.

Using the Select and Rotate (E) button changes the direction in which a camera points, but only Free cameras rotate in all directions. When applied to a Target camera, the rotate transformation spins only the camera about the axis pointing to the target. You aim Target cameras by moving their targets.

Caution 

Don't try to rotate a Target camera so that it is pointing directly up or down, or the camera will flip.

Select the target for a Target camera by selecting its camera object, right-clicking to open the pop-up menu, and selecting Select Camera Target.

Tutorial: Watching a rocket

Because cameras can be transformed like any other geometry, they can also be set to watch the movements of any other geometry. In this tutorial, we aim a camera at a distant rocket and watch it as it flies past us and on into the sky. Zygote Media created the rocket model used in this tutorial.

To aim a camera at a rocket as it hurtles into the sky, follow these steps:

  1. Open the image from book Following a rocket.max file from the Chap 26 directory on the DVD. This file includes a rocket mesh.

  2. Select Create image from book Cameras image from book Target Camera, and drag in the Front viewport from the top to the bottom of the viewport to create a camera. Set the Field of View value to 2.0 degrees. The corresponding Lens value is around 1031mm.

  3. Select the camera target, click the Select and Link button in the main toolbar, and drag from the target to the rocket object.

  4. To view the scene from the camera's viewpoint, right-click the Perspective viewport title and choose Views image from book Camera01 from the pop-up menu (or press the C button). Then click the Play Animation button to see how well the camera follows the target.

Figure 26.3 shows some frames from this animation.

image from book
Figure 26.3: Positioning the camera's target on the rocket enables the camera to follow the rocket's ascent.

Aligning cameras

image from book Another way to aim a camera is with the Tools image from book Align Camera menu command or by clicking the Align Camera button on the main toolbar (under the Align flyout). After selecting this command, click an object face and hold down the mouse button; the normal to the object face that is currently under the cursor icon is displayed as a blue arrow. When you've located the point at which you want the camera to point, release the mouse button. The camera is repositioned to point directly at the selected point on the selected face along the normal. The Align Camera command requires that a camera be selected before the command is used.

CROSS-REF 

The Align Camera command does the same thing for cameras that the Place Highlight command does for lights. A discussion of the Place Highlight command appears in Chapter 27, "Using Lights and Basic Lighting Techniques."

Cameras can be positioned automatically to match any view that a viewport can display, including lights and the Perspective view. The Views image from book Create Camera From View (Ctrl+C) menu command creates a new Free camera if one doesn't already exist, matches the current active viewport, and makes the active viewport a camera view. This provides you with the ability to position the view using the Viewport Navigation Controls, and it automatically makes a camera that shows that view. If a camera already exists in the scene and is selected, this command uses the selected camera for the view.

Caution 

If you use the Match Camera to View command while a camera view is the active viewport, the two cameras are positioned on top of each other.

Tutorial: Seeing the dinosaur's good side

Using the Align Camera tool, you can place a camera so that it points directly at an item or the face of an object, such as the dinosaur's good side (if a dinosaur has a good side). To align a camera with an object point, follow these steps:

  1. Open the image from book Dinosaur.max file from the Chap 26 directory on the DVD. This file includes a dinosaur model created by Viewpoint Datalabs.

  2. Select Create image from book Cameras image from book Free Camera, and click in the Top viewport to create a new Free camera in the scene.

  3. With the camera selected, choose Tools image from book Align Camera or click the Align Camera flyout button on the main toolbar.

    The cursor changes to a small camera icon.

  4. Click the cursor on the dinosaur's face just under its eye in the Perspective viewport. This point is where the camera will point.

  5. To see the new camera view, right-click the viewport title and choose Views image from book Camera01 (or press C).

    Although the camera is pointing at the selected point, you may need to change the field of view to correct the zoom ratios.

Figure 26.4 shows our dinosaur from the newly aligned camera.

image from book
Figure 26.4: This new camera view of the dinosaur shows his best side.

The Align Camera command points a camera at an object only for the current frame. It does not follow an object if it moves during an animation. To have a camera follow an object, you need to use the Look At Controller, which is covered in Chapter 32, "Animating with Constraints and Controllers."




3ds Max 9 Bible
3ds Max 9 Bible
ISBN: 0470100893
EAN: 2147483647
Year: 2007
Pages: 383

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