Титульная страница
ISO 9000 ISO 14000
GMP Consulting
 
Mastering 3D Studio MAX R3

Previous Table of Contents Next


Understanding Camera Mapping

Camera mapping is an exceedingly powerful technique that allows you to use a 2D photograph with simple geometry to substitute for very complex geometry and mapping. The beauty of the technique, and the difference between this and sophisticated compositing, is that the camera can move (within limits) within the scene, and the features of the photograph will appear to move as they should relative to the camera, with the parallax that would occur if the camera were really in the 3D scene of the photograph. This can achieve extremely realistic shots with very little work.

Camera mapping is often used in film to create establishing shots of exotic locales without going to the trouble and expense of a location shot. The groundbreaking subway shot in The Matrix also employed a very similar principle to camera mapping. The CG camera was programmed to choose between several photographs of different angles of the subway, based on its position and the angle of incidence to the geometry. Because of this, you got a very realistic shot without every detail of the subway having to be modeled and individually mapped. This is more complex than MAX’s camera mapping, but it is essentially the same “cheat.”

Very few people realize how much camera mapping is used in big-budget films. This is one of the tricks of the big boys (and girls).

How Camera Mapping Works

Camera mapping starts with a photograph of the scene you want to create. What you want to do is map crude versions of the main features of the photograph with the same map as the background, so that when the camera moves, its relation to these features changes realistically. (Parallax is the illusion of background elements moving more slowly than foreground elements, due to the perspective effect that makes background distances appear smaller. Recreating this illusion when using a 2D background makes the difference between a fake-looking composite and a shot that can be mistaken for real film footage.)

The difference between camera-mapping your features and just mapping them with regular UVW mapping is that camera maps are projected with the converging perspective lines of an actual camera lens, whereas normal mapping is projected along parallel lines. You can’t get the same effect from one photograph with just normal mapping.

Matching Your Camera to Your Photo

When you’ve got your photo, the first step in camera mapping is to match your CG camera to the exact position and focal length of the camera that took the photograph. If you took the photograph, this may be quite straightforward. If not, you may have to deduce this from clues in the photograph.

Loading background images into a viewport is covered in Chapter 5. You will need to pan and orbit your camera viewport so that the ground plane and horizon line of the camera match the ground plane and horizon line of the photograph.


TIP In Create Ø Helpers, you can choose Camera Match from the drop-down list to create camera points in your scene. You can then use Camera Match in the Utilities tab to assign these camera points to correspond with points in the background photo. Click Create Camera to create a CG camera to match the real camera that took the photograph. (In this case, you would build the geometry determining the camera points first.)

Matching Simple Geometry to Your Photo

The next step is to model geometry corresponding to the main features of the landscape: the tall buildings, mountains, large bridges, and so forth. These models can be very rudimentary—a box for a building, a box or patch grid edited to fit the curvature for a mountain, and so forth. You need to include the features that the camera passes and those that stand out from the background as it approaches.

Applying the Camera Map Modifier

To apply the Camera Map modifier in MAX, you must have your background photo loaded as an Environment background. (This will be covered in Chapter 10.) Apply a Camera Map modifier (World Space type) to each of your modeled features. Go to the frame where you need to match the backplate, click Pick Camera, and (using Select by Name) select the camera of the view you want to match. You need to turn off all the foreground objects’ shading properties, so make a material that has zero Specular Level and Glossiness, set Self-Illumination to 100, apply the background image to the Diffuse channel, and then assign it to your objects.


NOTE Apply a seperate Camera Map modifier to each feature, rather than instancing the modifier between them.

The World Space version of the Camera Map modifier allows your camera to move in the scene within the range covered by your photograph, because it locks the mapping coordinates to world space rather than local space. If you actually pass an object, you need another image describing what is behind the object. You can make a new version of the image by taking it into Photoshop and cloning in what you want. You can apply this map to the scenery behind the feature by creating a second camera to pick with the Camera Map modifier and a second material that uses the altered image in the diffuse map slot.

Camera mapping is a very advanced feature, but there’s an excellent tutorial on it that comes with MAX R3. Learning camera mapping brings us almost full circle through the development of computer graphics—from 2D images to mapped 3D geometry, back to what might be called 2½D... where 2D images are being substituted for geometry, but in a manner that is educated by the geometry and camera information of your 3D scene.

Summary

In this chapter, we introduced the Raytrace material, the Matte/Shadow material, and four compound materials: Double Sided, Top/Bottom, Composite, and Shellac. We also discussed some of the materials features that are new to MAX R3.

In the next chapter, you will learn about lighting and how to apply lighting techniques to your MAX scenes.


Previous Table of Contents Next

© 2000, Frol (selection, edition, publication)

 
Rambler's Top100