Create a new mental ray shader. Insert the Ambient/Reflective Occlusion map into the diffuse slot, and put a value in the max distance of the AO map.
In your render settings under the Processing tab turn on Material Override and just click and drag the AO material into the blank material slot under Material Override. Now all of your materials in your scene will use this AO material, even though they still have their own shaders applied to them. Before you render, turn off FG, GI and turn off your exposure. If you don't do this you will get a black rendering. All of these settings will not be lost.The nice thing about this process is you don't have to turn off or delete any lights in the scene, and you still keep all of your materials intact. When you are done rendering the AO pass just turn back on FG, GI, and your exposure...all of your settings will still remain. Also don't forget to disable the Override Material before you go back to rendering your beauty pass.



29 comments:
Hi!
Your blog is very helpful! I will come back to see news, nice work!
My blog:
http://maquetestacciarini.blogspot.com/
Why do we need AO? what is it for?
Sorry if the question sounds stupid. Im newbie to mental ray.
Lime, after you question, I added an explaination to AO : "For those of you who don't know what AO is, it's a method of creating soft shadows in corners where objects meet. It adds an extra sense of reality"
Thanks, that was pretty helpfull :)
But how do you combine AO and straight render pass? Am I missing something obvious?
MetAtroN,
this is done in Photoshop. Put the AO layer over the beauty layer and change the mode to multiply to get the result you need.
Thanks for the swift answer :) Minutes after I asked thet question I've found a neat tutorial about this. It really looks cool after both images are combined.
Does this work in the same with Vray aswell?
No. V-ray has its own shaders for achieving AO.
Is the example scene lit only by down lights in the ceiling? If so, what is lighting the ceiling in the ao pass if there is no GI?
Thanks
When the AO shader is used, there is no lighting calculated in the scene. In other words, you would get this same result without lights in your scene.
Thanx for the tutorial it was v helpful. I noticed u said turn off FG and GI, well I was messing about with setting and turned on FG for fun on the draft preset and noticed it worked just as good. thought I'd let u know
Garry,
you're right. Technically you can leave both FG and GI on for this method, and AO will still render correctly. You may get some photon mapping errors with the GI on, but it still works.
Ok this is a dumb question but i used a pro material for the material override. Is that ok? Is there one i should use instead? Besides the samples and distance are there other settings i should be looking at? My image was very grainy.
As long as you're getting the results you want, there is no wrong shader to use. I always use the mental ray material. You can use the promaterial, but it may give you strange results since the pro-materials are always preset at certain values. The one setting that I change on the Ambient/Reflective Occlusion map is the Max Distance. I set it to 3' usually. You can also change your samples from 16 to 32 to get a softer rendering.
If i choose mental ray as a material i dont get have a slot for diffuse?
Ahhh i just put it in the surface slot and it worked much better. Awesome!
great site! do you know of a way to make the grayscale gradation of the ao a colored gradient map? i would like to have a bright red where the geometry is very dense, then green and blue at the least dense area.
thanks in advance!
I'm attempting to use this method for an interior room with one window; when I do the procedure and render, my result is very dark with only a hint of any detail. Any suggestions?
be sure your exposure is off
iancamrillo: just add red to the Dark slot, and green / blue to the Bright slot in the Ambient/Reflective Occlusion Map.
hi, this is helpful ..
can you put the material sample in there .. ?
thanks ..
I added a snapshot of the shader
hello, like Alex, don't work for me in a scene under a single dome :( (if I hide the dome it work )
Ramy
can you explain the difference between this method and using the AO option that is built into many of the Mental Ray materials?
this method is a "pass" method, meaning it will render everything with just AO only (no colors, textures, reflections, refractions). Then it can be applied to your regular rendering in an editing software such as photoshop. Using AO in the A&D materials applies the AO ontop of the texture so when you render your regular image max will add the AO onto it already. The advantage of doing an AO pass is that you can tweak the amount of it in post production in real-time.
Thanks man, this was just what I needed
nice tutorial, one thing which you forgot to mention though was that mental ray needs to be your assigned renderer for you to be able to create a mental ray shader in the first place. You do this by going into render settings, the common tab, then the assign renderer swatch and click the dots beside the "production" label. Here you can change the renderer between the scanline renderer and any other one you have (mental ray). Nice tutorial, extremely helpful :)
hey, is there anyway to render a scene with AO inside 3ds max for all objects in the scene without rendering AO seperatly without going to another editing software to edit it haha if that makes sense
Post a Comment