PDA

View Full Version : Rendering Displacement with Ambient Occlusion


CJ3D
02-07-2010, 12:09 AM
Greetings CGTalk friends,

Hopefully somebody can help me with an annoying little issue I'm having trouble figuring out. I set up a scene just like Jonathan Nelson described in his tutorial here: http://www.jonathanrnelson.com/tutorials/occlusion/occlusion2009.htm

Basically I have my masterlayer with displacement on my character and all that good stuff and I put my character and clothing and what not into a new layer, went to the attributes and used the occlusion preset, and what not, and it works fine I get my occlusion rendered, but it doesn't render the displacement maps WITH the occlusion. Smooth occlusion against detailed model doesn't work very well. Anyone have any tips or workarounds for this? I tried plugging the mib_amb_occlusion node into the ambient swatch of my materials, into the color swatch, no diffuse, high diffuse. All kinds of different configurations but it's not working. Thanks for any help with this subject.

CJ

crispy4004
02-07-2010, 02:00 AM
That's because the Layer AO preset just replaces all shaders with a AO MR Texture. Either use Pass Preset in Maya 2009 or greater, or use the AO MR texture, or AO in a Mia Material.

Also that tutorial makes one of most common mistakes you see with compositing 3D passes, multipling AO over the beauty pass. It's called Ambient Occlusion for a reason. That's ambient as in indirect light, and occlusion as in closure or blockage. Together that means the blockage of any light not from a direct light source.

cgbeige
02-07-2010, 02:56 AM
so you multiply it over your GI channel?

fezz
02-09-2010, 02:46 PM
The proper way to do it is to render a flat pass and multiply it over that.

ndeboar
02-09-2010, 04:16 PM
mia shader has built in ambient occlusion, you might want to use that.

Gein
02-09-2010, 04:57 PM
If you want a separate render, what's stopping you from applying the mib_amb_occlusion to a surface shader out color, and the displacement map on the surface shaders SG?

CJ3D
02-09-2010, 07:08 PM
If you want a separate render, what's stopping you from applying the mib_amb_occlusion to a surface shader out color, and the displacement map on the surface shaders SG?

The fact that I didn't know you were supposed to plug the ambient occlusion node into the out color of a surface shader lol. Some of the older threads I googled on the subject said something about plugging the mia_amb node into the ambient of a lambert or something and making the color white or plugging into the color node of a lambert and making the ambient color white. either way it wasn't working. I noticed that when I used the preset it created a surface shader and put it on the character and objects so I studied that and then figured out that I could plug a displacement map into the surface shader (I didn't know I could do that either), so I made several surface shaders for each object with a displacement and set it up right and then finally got it to work after I figured out that you had to enable raytracing under the features tab in the render settings otherwise is just shows a white color on all the objects.

Thanks for the tips folks. Crispy4004 how would you set that up correctly? You have to multiply it even if you're compositing an image in photoshop and not in Maya right? And Fezz that's what you mean right? Rendering out just the regular pass and then compositing a separate ambient occlusion pass over it using multiply? What's the difference between that and letting Maya do it? Thanks for the replies all.

CJ

CGTalk Moderation
02-09-2010, 07:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.