Multi Pass Rendering and Compositing in 3D and After Effects

Multi Pass Rendering and Compositing in 3ds Max and After Effects


Final product image
What You'll Be Creating
Open 3ds Max.
Open 3ds Max
Open 3ds Max.
I have made a simple scene. I have put three objects with some distance between each other.
Make objects
Make objects
Press Ctrl-C to create a camera in the perspective view.
Create a camera
Create a camera
With the teapot selected, do a right click and select Object Properties.
Object Properties
Object Properties
It opens the Object Properties window. Set the Object ID value as 1.
Object ID
Object ID
Following the same way, set the Object ID value of the cylinder as 2.
Object ID
Object ID
Following the same way, set the Object ID value of the box as 3.
Object ID
Object ID
Press Shift-Q or F9 key to render the scene.
Shift-Q
Shift-Q
Click on Save Image icon. It opens the Save Image window. Set the file name asDiffuse and select the file format as RPF. Click on Save button.
Save Image
Save Image
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
Open After Effects. Import the Diffuse.RPF file in the timeline. You will notice the file has come with all properties like Z-depthObject IDZ-coverage etc.
Open After Effets
Open After Effets
With the Diffuse.RPF layer selected, go to Effects > 3D Channel > ID Matte.
Effects  3D Channel  ID Matte
Effects > 3D Channel > ID Matte
In ID Matte effect, the default value of ID Selection is set to 0
ID Matte
ID Matte
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
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 
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 
You can give proper name to the layers as TeapotCylinder and Box. Bring the diffuse layer once more in the background to get the floor.
Rename the layers
Rename the layers
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
Change the Master Hue value and you will see the color of the teapot changes accordingly.
Master Hue
Master Hue
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
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
With Z Depth channel selected, it looks like as shown in the following image.
Z Depth
Z Depth
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
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 
Bring the Diffuse layer in the timeline. Turn off the pre composed layer.
Diffuse layer
Diffuse layer
Apply S_Z Blur effect on the Diffuse layer. Alternatively you can use Camera Lens Blur. It makes the entire layer blurred.
Advertisement
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
Previous
Next Post »