EricMBloggie

This is the stuff I like.

Tuesday, January 29, 2008

Tutorial: Compositing RPC’s

Sometimes when using Archvision’s error-prone RPC plug-in for people, trees or cars, a scene will get clogged up, like the drain in Bigfoot’s apartment, and cease to render.

Rather than panic I choose to composite the RPC’s using either Photoshop for stills, or a variety of software for animation. At the architecture firm I work for right now, we use Premiere Pro to do our compositing.

Example Comp

Let’s Begin

1. Save As…
You’re going to have two separate files. There’s the main layer and the RPC layer. Save the file you’ve been working on as something like Whatever_RPC_Matte.max.

2. Delete RPC’s
Get rid of the RPC’s in your main file. Who needs ‘em anyways?

3. Open the RPC Matte File
We’re going to do some really wacky stuff with this.

4. Change your renderer from V-Ray, Mental Ray, or Ray-Ray to SCANLINE.
Render Choose

5. Global Super Sampling
***Only for Animation***
There is some extra leg work to be done with the sampling when rendering RPC’s this way. If you don’t Super Sample the shot, the animation will flicker, because the anti-aliaser will skip over the finer details. Try these settings out…they worked for me, but I don’t want to guarantee they’ll work for every scene and situation.
Super Sample

6. Make Matte/Shadow Material
Make a Matte/Shadow material. This material will accomplish some pretty great things for you. The object will not show up in the render, but it will occlude or block objects that are behind it. Here’s an example of what I mean.
a)
Matte/Shadow Ex A b) Matte/Shadow Ex B c) Matte/Shadow Ex C

a) A building in front of a truck.
b) Same thing, but the Matte/Shadow material is on the building.
c) The alpha channel for image b.

Notice how the building doesn’t show up in the render, but it covers up the RPC that’s behind it. We’ll use that alpha channel for compositing later.

Use these settings.
Matte/Shadow Settings

7. Assign Matte/Shadow Material
Select ‘Geometry’ from this drop-down box.
Select Geometry

Edit -> Select All.
Assign Matte/Shadow Material.

8. Deselect Cast Shadows for Geometry
With the Geometry still selected, right click on the Viewport and select ‘Object Properties.’
Deselect ‘Cast Shadows.’
Object Properties

9. Hide Glass
You’ll want to see the RPC’s through glass, so hide your glass layer, or it will block out that stuff. If you want to control how visible these indoor RPC’s are, separate from the outdoor guys, do two different passes. That way, you’ll have an indoor and outdoor layer when compositing. If it’s a still shot, it may be easier to do one pass, and do your opacities in Photoshop.

10. Delete Lights
Get rid of the lights from your original file. We’re going to light just the RPC’s.

11. Make a Direct Light…
Make one where the Sun is in your old file. Cars and trees cast shadows. People don’t. If I’m wrong about this, please let me know what I’m doing wrong.

The direct light should have a multiplier of 1.0 and be set to ‘Ray Traced Shadows.’

Now the cars and trees will cast shadows on your geometry.

***Note About Shadows***
Ray Tracing in Scanline can take a very long time. There is a fast alternate method to shadows for RPC’s which involves placing a plane under each one. The plane is Opacity mapped with the image of a shadow. I’ll probably write up an easy way to do this at some point. Here’s an example for a tree.
Tree Shadow
Every black goes away. The gray stuff sort of goes away, resulting in a shadow you can see through. Blur the image for blurry shadows. Yes, it’s very clever.

12. Render
You have your materials set up, the lights are in place, and your camera matches the one from your main file. Render your image or sequence. Save as a TGA or TIFF with the Alpha channel. If you don’t understand what an alpha channel is, look it up in the Max Help. It’s important, you should know how they work.

13. Compositing

· Stills

a. Open your Main pass and your RPC pass.

b. In the RPC pass, go to Channels and Ctrl+Click the Alpha 1 channel.
Channels in PS
You should notice that the RPCs have a selection around them.

c. Double-Click the ‘Background’ Layer. It’ll ask you what to name the new layer. Layer 0 is fine. This unlocks the Background layer.
Layer 0 Rename

d. Make a Mask
Layer Mask

e. Right Click on ‘Layer 0.’ Click Duplicate Layer. –> Duplicate the layer on to the Main pass.

· Premiere Pro

a. Import Main and RPC passes as numbered stills.

b. Put the RPC pass over the Main pass.

c. It should automatically read the Alpha channel and composite them together.

If it doesn’t work, you broke something. Good luck.

Done.

posted by Eric at 12:43 pm  

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WordPress