Match Light and Shadows to Background Image

Match Light and Shadows to Background Image

Maya 2012 Tutorial

 

How to Match 3D Objects to a Background Image in Maya

 

 

Have you ever tried to composite a computer model into a still image or video sequence? It can be quite a challenge to match the lighting, shadows, reflections, perspective and other nuances in the image.

In this example we will start with a beach image taken on a semi-sunny day. Our goal is to create a cube in Maya and place the cube on the beach.

 

Step One

Begin by starting a new project and save your Maya scene in the scenes folder. For more information, see topic, Starting a Project.

Step Two

Add a cube to the scene by choosing Create > Polygon Primitives > Cube.

Step Three

Add a polygon plane to the scene by choosing Create > Polygon Primitives > Plane. The cube should be resting on the plane.

Step Four

Scale the plane larger with the Scale tool (e key). The purpose of the plane is to catch the shadow cast by the cube.

Step Five

Right-click the plane and choose Assign New Material. Choose Use Background from the Maya Surface section.

Step Six

Place your jpg background image in your project's sourceimages folder. The image should match the size of your final output image.

Step Seven

Open the Outliner (Window > Outliner) and click the Perspective camera. Open the Attribute Editor to view the camera options.

Step Eight

Open the Environment section and click the Create button next to Image Plane.

Step Nine

In the Image Plane Attributes section, click the folder icon next to Image Plane to navigate to your background image.

Step Ten

Using the camera Dolly, Tumble and Track tools, rotate and move the Perspective view camera to match the background image. You may also need to change the camera focal length in the Attribute Editor, Camera tab to match the original camera lens.

Step Eleven

Analyze your background image to better understand the light and shadows. In this example the light is coming from the left and the shadows are a bit soft.

Step Twelve

Add lights to the scene so your cube's lighting matches the background image. For this image we added a Spot Light and an Ambient Light. Activate the shadows for the Spot Light.

Step Thirteen

Render your image and make adjustments as necessary. If your shadow appears to dark, adjust the Shadow Mask slider for the plane's Use Background texture.

Another Option is Compositing

In this example the entire image was rendered in one pass. Another option when doing this kind of work is to use render layers, shadow passes and render passes. For more information, see topics, Render Layers, Render Passes and Mental Ray and Render Passes and Mental Ray Multi Objects.

Use Camera Raw Meta Data

If you capture your original image as a Camera Raw file, you can open the meta data and find the Focal Length. The meta data appears in Bridge and the Camera Raw window.

You can also access the Focal Length in Photoshop by choosing File > File Info and clicking the Camera Data tab.

 

Lynda.com career skills