Advertisement
  1. 3D & Motion Graphics
  2. 3D Studio Max
Cgi

Multi Pass Rendering and Compositing in 3ds Max and After Effects—Part 2

by
Difficulty:IntermediateLength:ShortLanguages:
Final product image
What You'll Be Creating

1. Creating a Basic Scene

Step 1

Open 3ds Max.

Open 3ds Max
Open 3ds Max.

Step 2

I have made a simple scene. I have put three objects with some distance between each other.

Make objects
Make objects

Step 3

Press Ctrl-C to create a camera in the perspective view.

Create a camera
Create a camera

2. Set Object ID

Step 1

With the teapot selected, do a right click and select Object Properties.

Object Properties
Object Properties

Step 2

It opens the Object Properties window. Set the Object ID value as 1.

Object ID
Object ID

Step 3

Following the same way, set the Object ID value of the cylinder as 2.

Object ID
Object ID

Step 4

Following the same way, set the Object ID value of the box as 3.

Object ID
Object ID

3. Rendering in RPF Format

Step 1

Press Shift-Q or F9 key to render the scene.

Shift-Q
Shift-Q

Step 2

Click on Save Image icon. It opens the Save Image window. Set the file name as Diffuse and select the file format as RPF. Click on Save button.

Save Image
Save Image

Step 3

It opens the RPF Image File Format window. Choose 16 Bits per channels option. Turn on all options. Click on OK button.

RPF Image File Format
RPF Image File Format

4. Compositing in After Effects

Step 1

Open After Effects. Import the Diffuse.RPF file in the timeline. You will notice the file has come with all properties like Z-depth, Object ID, Z-coverage etc.

Open After Effets
Open After Effets

Step 2

With the Diffuse.RPF layer selected, go to Effects > 3D Channel > ID Matte.

Effects  3D Channel  ID Matte
Effects > 3D Channel > ID Matte

Step 3

In ID Matte effect, the default value of ID Selection is set to 0

ID Matte
ID Matte

Step 4

Set the ID Selection value as 1. You will see that only the teapot is visible. This happens because in 3ds Max, I had set the object id value of the teapot as 1.

ID Selection
ID Selection

Step 5

Make the duplicate layer of Diffuse.RPF layer by pressing Ctrl-D key. 

This time, set the ID Selection value to 2. The cylinder gets highlighted, because in 3ds Max, I had set the object id of the cylinder as 2.

DiffuseRPF
Diffuse.RPF 

Step 6

Once again, make the duplicate layer of Diffuse.RPF layer by pressing Ctrl-D key. This time, set the ID Selection value to 3. The box gets highlighted also, because in 3ds Max, I had set the object id of the box as 3.

DiffuseRPF
Diffuse.RPF 

Step 7

You can give proper name to the layers as Teapot, Cylinder and Box. Bring the diffuse layer once more in the background to get the floor.

Rename the layers
Rename the layers

Step 8

Now you can control the individual layer. For example, if you want to change the color of the teapot, just select the teapot layer, go to Effect > Color Correction > Hue/Saturation.

Effect  Color Correction  Hue Saturation
Effect > Color Correction > Hue/ Saturation

Step 9

Change the Master Hue value and you will see the color of the teapot changes accordingly.

Master Hue
Master Hue

Step 10

Following the same way, you can apply Glow to the cylinder layer. This way, you can control any layer individually and apply any effect.

Glow
Glow

5. Z Depth Compositing in After Effects

Step 1

With the diffuse layer selected, go to Effect > 3D Channel > 3D Channel Extract.

Effect  3D Channel  3D Channel Extract
Effect > 3D Channel > 3D Channel Extract

Step 2

With Z Depth channel selected, it looks like as shown in the following image.

Z Depth
Z Depth

Step 3

You can play with the Black and White values to get the perfect Z depth. Just remember that the nearest object to the camera remains in white and as it travels far, it becomes grey.

Black and White
Black and White

Step 4

With the layer selected, press Ctrl-Shift-C to pre compose. Rename the pre composed layer as Diffuse.rpf Comp 1.

Ctrl-Shift-C
Ctrl-Shift-C 

Step 5

Bring the Diffuse layer in the timeline. Turn off the pre composed layer.

Diffuse layer
Diffuse layer

Step 6

Apply S_Z Blur effect on the Diffuse layer. Alternatively you can use Camera Lens Blur. It makes the entire layer blurred.

Step 7

Pick the pre composed layer as the Z Buffer channel. Now you get the real depth of field in the image. The front teapot looks in the focus while the cylinder and box look out of focus.

Z Buffer
Z Buffer

Conclusion

In this tutorial, I showed you how to control the individual object in the layer by using just one pass. This is the beauty of RPF file format. It contains almost every channel like Z Depth, Object ID, Material ID, Z Coverage etc and every channel could be controlled by using just one layer. 

In the next part of the tutorial, I will show you the most useful and powerful file format used in the industry to control everything.

Advertisement
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.