Thanks to Master Zap, he informed us a while ago why just multiplying an ao over a beauty is a big no no. (http://mentalraytips.blogspot.com/2008/11/joy-of-little-ambience.html)
Fortunately in Mental Ray, the Mia material has a built in ao feature so we get an accurate ao without having to composite in post. But what if we wanted to composite in post, for the extra wiggle room, but we didn’t want the hassle of trying to get all of our render passes to come out correctly without ginormous render times (thanks for that one autodesk)? Well these two solutions are definitely the best and most accurate, there is another-less accurate-but moreso than just an A over B thing with a regular ao.
This is where light based AO comes into play. This method allows you to just multiply your ao over your beauty and not get ao where there obviously shouldn’t be any because of light direction.
DISCLAIMER: This still isn’t a correct workflow, it’s still a hack, but gives better results than the classic method.
HOW TO: You need to create a Surface Shader, an ambient occlusion, a clamp, and a surface luminance node.
1.) Connect the outValue of the surfaceLuminace to the input R, G, B of the clamp node.
2.)Connect the output of the clamp node to the dark value of the mib_amb_occ
3.)Connect the outValue of the mib_amb_occ to the outColor of the surface shader
4.)Go to the clamp node and set the Max value to 1, 1, 1
-This clamps the value of the luminance to a value of 1. This way if you have lights with an intensity above 1, you won’t get weird artifacting and banding.
Regular Ambient Occlusion:
Light based ambient occlusion with a spot light coming from camera right:
Archives by Category
Archives by Month
- May 2014 (2)
- February 2014 (2)
- November 2013 (1)
- October 2013 (1)
- September 2013 (2)
- August 2013 (4)
- July 2013 (2)
- June 2013 (1)
- May 2013 (1)
- January 2013 (2)
- September 2012 (2)
- August 2012 (5)
- July 2012 (1)
- October 2011 (2)
- September 2011 (3)
Thank you a lot for sharing this with all people.
thanks for share
getting Sme artifacts.. but i thnk surface and ,mib connected to ramp the bets way to get it ..