TUTORIAL March 6, 2000
Mapping Monument Valley
Camera mapping techniques in Play Electric Image 2.9.2
by Barry Berman
This tutorial examines one method of doing camera maps using Play Electric Image 3D 2.9.2 (www.play.com). Don't pay attention to the copyright date included in some of the screengrabs, or the man behind the curtain. Just sit back, enjoy, and learn to do something very cool.
Choosing Your Material
Choose your material wisely. A camera map is going to project the image from a single point in space over all the models visible by that camera. If the image has wires, telephone lines, telephone poles, people, or things like that, it can be difficult to model objects and place them effectively. You may want to paint them out of your image. This new image would then be your clean image.
A good image to use to learn camera mapping is one of a cityscape with skyscrapers. These areas are typically blocky and can be made from standard shapes (less modeling!). I chose an image of Monument Valley, Utah, because it has very few objects in the picture, allowing me to expand on the use of camera mapping. Most people think that camera mapping is just used for cubes and planes, but it's most often used on organic shapes.
When choosing your image, keep in mind the output size and aspect ratio, as this will ultimately determine the size of the images you use.
The following is an image you will use in Techniscope, which is generally a normal 35mm projection hard-matted to an aspect ratio of 2.35:1. The image is 640x272 pixels. You'll set the aspect ratio in EI 3D to be the same once you import the image to EI 3D.
Look closely at the image. There are four distinct features in this scene: the spire in the foreground, the collection of spires in the background, the ground, and the sky.
To have the greatest parallax (the horizontal offset between to images, based on the average distance between a pair of human eyes) in camera maps, it is advisable to work in layers. In this image, there are three layers. The first would be used for the foreground spire, the second to project onto the background collection of spires, and the third onto the ground and sky. Since each layer will show the complete object in it as the camera shifts, it will reveal hidden portions that were covered up by overlapping layers. Look at where the foreground spire overlaps the background spires. Paint out the foreground spire on this map and save it as a separate map to be used as the map for the background. See the painted-out version below.
Similarly, the background spires would look awkward if they were painted on the sky. So for greater parallax, the background spires need to be painted out as well. See the version below.
Using the Images in Electric Image
Now that youre done processing the images, you can bring them into EI 3D.
1. Launch EI 3D and create a new project.
2. Go to the Render window (Control + R) and then click on the Render tab.
3. Set the aspect ratio to Techniscope. This will set the aspect to be the same as the images you are using for the camera maps. Then set the resolution to 320x240. Note that the Y changed to 136. This is to keep it in the same 2.35:1 aspect ratio. Close the Render window.
4. Open the Project window by pressing Command + L. Then, open your Objects palette by pressing Command + E. Here, add a Standard Shape plane with the following settings:
(Note: Don't worry about the copyright date; this is the current Standard Shape plug-in in Electric Image.)
This will be used as our ground plane. Rename it Ground.
5. Double-click on the camera and go to the Projection tab. Add the Camera Map 0 image included with this tutorial. Youll come back to this and tweak additional settings later.
In the same camera window, go to the X-form tab and set the Y value for the reference to 50. Rename the camera Camera Map 0.
6. In the Camera View window, click on the color bars while holding the Option key. Then click down to the Camera Map 0 image.
7. This will display the image in the Camera view. Orbit (Space + Command) the camera until you get the ground plane to disappear at the horizon line. Alternatively, you can use the Position settings below to have the same settings as the tutorial.
Now lock the camera.
8. Let's add the other objects. Add a Standard Shape with the following settings, and rename this one Ground Ref.
This shape is for object placement reference only. It should be turned off before rendering.
9. Add another Standard Shape plane with the following settings, and name this one Sky.
You also want this shape to be set back on Z and rotated toward the camera. Use the following settings to position it correctly.
10. Open the Group Info window for the light, and change it to a Spot Light. Then change its X-form settings to the following:
The reason for this is so there is a reference point denoting the zero, zero, zero point for the ground plane. It is an aid in positioning, just like the Ground Ref plane.
11. Now, you'll add our FACT file (the native object format of Electric Image) for the foreground and background models. These were created very quickly in the Electric Image Modeler.
Add the MV Object.fact by clicking on the Fact icon in the Object palette. When importing into EI 3D, a dialog will pop up asking if you want to select a parent. You do not want a hierarchy, so choose to import the groups as separate.
12. The key to using a layered approach is using Selection Sets. Let's create some sets for your layers. Go to Select > By Set > Edit Sets. Add three sets and call them Front, Back, and Ground/Sky, respectively. Then Add Members to each. To do this, click on the Member in the Project window, select the Set in the Selection window, and click Add in the Members section.
Add the Front object in the Front set, Back object in the Back set, and Ground and Sky in the Ground/Sky set.
13. Now, you will duplicate the camera to be used for the other sets and to record with. Duplicate the camera three times. Label them Camera Map 1, Camera Map 2, and Recording Camera, respectively.
14. Open Camera Map 0 and go to the Projection tab. Highlight the Camera Map 0 image, select the Camera Map Applied as Luminence, and Camera Map Applied to Front.
15. Open Camera Map 1 and go to the Projection tab. Delete the Camera Map 0 image and add the Camera Map 1 image. Apply it as Luminence and to the Back set.
Do the same thing with Camera Map 2, except add the Camera Map 2 image and apply it to the Ground/Sky set. Close the windows and lock the cameras so you can't move them.
16. Amend the objects so the only shading they get is from the camera map images. Open the Material window for the Ground object and click on the Diffuse tab. Move the Diffuse slider all the way to Darker.
Click on the Specular tab and move its slider all the way to Darker. If you look at the shader ball in the top left corner, you'll see a black ball with no highlights, which is what you want. Do the same to the rest of the objects.
17. Now, you'll place the objects one at a time. Open the Group Link window for the Front object (Command + Option + Click). In the X-form tab, set the Link Alignment Position to Bottom.
Go to Position under the Limits tab, enable limits, and enter the following limits:
This keeps the object anchored to the ground plane while you move it. When you change the scale of the object, it will expand from the object's link position.
18. In the Project window, lock all objects except the Front object. This way you won't move something else by mistake.
19. The first thing you'll notice is that you still can't see the model in the camera window because it was created at a much smaller scale. Scale up the object by opening the Group Info window for the Front object and go to X-form. Change the scale to 180 for X, Y, and Z. This will make it visible and give you some idea of where to go from here.
20. Look at the yellow lines from the Ground Ref object in the Camera view. The edge of the Front object in the Camera Map image, where it meets the ground plane, is somewhere between the first and second grid line. In the Top view, move the Front object along the Z axis until the edge of your model meets the edge of the photo in the Camera view.
21. Once this is done, you can scale your object up along the Y axis until it is barely inside the object in the image. The X coordinates and scale need to be changed here as well. Use the previous method with the grid and scale until just inside the object in the image. Alternatively, for this tutorial, you can use the following settings:
Lock the Front object when finished.
22. Unlock the Back object. Repeat the method used on the Front object to position and scale the Back object. Alternatively, you can use the following settings:
Lock the Back object when finished.
(Note: This method is especially helpful when positioning skyscrapers. I have done a scene with over 50 buildings and 15 layers of camera maps using this method.)
Animation & Rendering
23. Let's animate the Recording Camera. Turn on the green animation control icon for the Recording Camera and unlock it. Set the time to 4.0 seconds, which is the length of the tutorial animation.
Pull the Camera's View Vector forward and to the left a bit in the Top view. You can also use the following settings:
(Note: Because of the quality and resolution of this image, the camera can only be pushed a small amount into the image.)
24. Turn on all of your objects except the Ground Ref plane and select the Recording Camera in the Camera View window.
25. Render, and you're finished.
Now go out and take some great photographs to be used as source material for your own camera maps.
Barry Berman works for Play South Incorporated in EI 3D/Universe Technical Support. You can reach him at [email protected].
The following is a FAQ on settings and methods not used in this tutorial.
Q: What is the Visible Surfaces option for in the Special tab for the Camera Map Image Alignment window?
A: This is for projecting only onto the surfaces that face the camera projecting the camera map. Without this clicked on, the map will project straight through and be on both sides of the objects it is assigned to. This is a common error when making camera maps.
Q: Why would I want to mirror the texture in X and Y?
A: Sometimes your recording camera will expose areas that aren't covered by your projection map. If these areas are very small, you can get away with using the Mirroring option to cover them up.
Q: I would like to use camera maps to texture an entire object. How is this done?
A: This can be done a couple of different ways. One way is to break up the object you're texturing into slices, then have other cameras projecting a 3D camera map onto the separate pieces.
Another method is to break up the map instead of the model. You'll still use multiple cameras, projecting onto the object at sliced angles, but use alpha channels to create the slices.
Q: When I take a snapshot through my recording camera, it looks like I have part of one building showing up on another, like a stutter. What do I do?
A: For this, you need to do one of two things: turn on Visible Surfaces Only, so it will not project through the first object, or create another camera map layer and Selection Set to separate them. In the new camera map layer, you would paint out the first object and paint in the second.
Q: How do you add a shadow pass to your camera maps?
A: This would be added as a comp in Adobe After Effects (www.adobe.com). Save your project under a name like Shadow Mask, then add a Master Material that has a white color for the diffuse color and link all your objects to it. In the Shading tab for each group, turn on Generate Shadow Mask. This will create a white shadow and leave the rest black. Bring this into After Effects and invert it. Apply the channel as multiply (blending mode). Save your project under a name like Shadow Mask, then add a Master Material that has a white color for the diffuse color and link all your objects to it. In the Shading tab for each group, turn on Generate Shadow Mask. This will create a white shadow and leave the rest black. Bring this into After Effects and invert it. Apply the channel as multiply (blending mode), and youve got it. You can also animate the opacity over time or even the tint of the shadow for greater control.
Q: My camera map is not at the aspect ratio I want to output to. What happens now?
A: Add black horizontal or vertical bars to your image to equal the aspect ratio you're outputting to. Alternatively, you can paint in the extra area to equal that aspect ratio.