compositing tutorial

by Maarten Gribnau
Updated for Maya 6 ( Daniel Saakes )

1. Introduction

This document will introduce you to the art of rendering a Maya model on top of a background image (or compositing). There are basically two ways to do it (that are both covered in this single tutorial)

Deciding whether to do compositing in Maya or in an external editor is difficult since it depends on the complexity of the compositing and your experience with image editing applications such as Adobe's Photoshop. Hopefully, this tutorial will help you to decide what is most appropriate in your situation.

We suggest you will you Mental Ray as your renderer instead of the Maya software renderer. This is the only technique to catch shadows and reflections in external compositing tools.

Result of merging a stool with a background image

2. Scanning

Both techniques have one thing in common: you need a background image. If you have an image in print (magazine advertisement for instance), you will need to scan it. For the IDE521 course, you will need to scan the image with its largest dimension equal to 1024 pixels. If your image has a landscape layout (image width is larger than the image height), than the width of the scanned image should be equal to 1024 pixels. If your background image has a portrait layout (the image height is larger than the image width), than the height of the scanned image should be equal to 1024 pixels.

Dimensions of images in landscape (left) and portrait layout (right).

One tip: background images in Maya work best when they have a landscape layout. If your background image has a portrait layout, make the image square while working with Maya and restore the original layout in the end.

Original background image (left) and square version for working with Maya (right).

3. Setting up

You will use an existing project directory that you need to copy to your own home directory. The project contains the scene and image files you need in the following lesson.

Recommended layout for this lesson

4. Importing the background image

We will now import the background image and use it as a background for the camera we just created. The image will be used as a reference for positioning the stool and to set up the lights.

5. Adding lights

You will now set up some lights in the scene to match the light conditions of the background image. If you look at the background image, you see light coming from the right side of the picture. This is probably daylight entering the bar. From the shadow of the legs on the bar, you can deduce that light is coming from a position somewhat left to the camera. There is also a light source on the left side of the bar. We will try to match these light sources in Maya.

6. Adding shadows

Now you will add planes to catch the casted shadows on the bar.

7. Rendering for compositing in an external program

Sometimes you want to composit your render in an external program like Photoshop.