

| Mental Ray Part 2 - Ambient Occlusion, Volume Lighting, Caustics Software: 3dsmax Author: Neoscape Website: http://www.neoscape.com/ Tutorial by Neoscape Artist: Carlos Cristerna In this tutorial we will try to teach you how to use the Ambient Occlusion shader combined with caustics to create a fake global illumination effect. The tutorial is intended for people with a basic knowledge of 3DS Max. I encourage you to visit http://www.mentalimages.com so you can understand more about mental ray and its uses in the film industry. ![]() Begin by taking the simple scene from Mental Ray Part 1. Replace skylight for Omni-light and have it be only an ambient light (blue) so you don’t get pure black shadows. ![]() Test render to see if you like the intensities of both lights: #1 - Direct (as sun) = orange/yellow #2 - Omni-light (as sky) = light blue If you like the result, save your image. This image is going to be your main pass that has color, light and shadow (you could render the shadows separately on the “Render Elements” tab.) ![]() Now create a new “Mental Ray” material and add it to the basic surface shaders “Ambient Occlusion map” (1). Apply this material to the “Materiel Override” to see the result with default settings (2). ![]() Create a second material like the first one but this time we are going to use the environment map as the source. To do that, you need to change the settings of the occlusion shader in “Type” to 1 (1). Render to see the results. (We are using the same map that we used for reflections on Part 1 for Mental Ray.) ![]() Now that we have a main pass and understand the difference between a simple occlusion and an environment occlusion, we are going to create a couple of different occlusion materials for different objects (the grass in this case) since it has displacement. Create a new Arch & Design material and insert an “Ambient/Reflective Occlusion (Base)” shader to the diffuse slot (1). Apply the same displacement map we used for the grass (you can right-click, copy and paste instance) (2). It should render like this with default settings. ![]() Unhide everything and apply the simple occlusion material to everything that had no reflection or refraction (glass & chrome, etc.). Render a test and it should look like the image above. ![]() The bottom of the pool is too dark so we have to create a new material for it so that we can see through and get occluding corners (1). There are three settings you want to use on the Ambient Occlusion shader: #1 - Samples = the more samples, the less noise; the more time it takes to render #2 - Spread = like the name says, how much that occlusion spreads (here for the water, I made it small so that the water and the bottom of pool do not occlude each other). #3 - Max distance = the max distance relative to objects for them to occlude (trial and error depending on your scene). Tip Start with default settings and play with “max distance” to begin. If you like it, increase samples for final render. Render it and save it as your simple occlusion pass. ![]() Now we are going to create the “environment occlusion” using the same map we are using for reflections: (1) Samples = the more samples, the softer; the more time it takes to render (16 is default, 64 used) (2) Spread = basically how blurry the environment is going to be projected on surfaces (3) Max distance = distance between objects for them to occlude (4) Occlusion type = 1 (environment) Tip Play with each setting at a time from the default settings to understand what they do. Going to extremes with the settings is a good way of really understanding what it does. ![]() Now in theory, we should have three images: (1) – the main pass (render + color + shadows) (2) – occlusion simple pass (black + white occlusion) (3) – environment occlusion (color occlusion) Open them in Adobe Photoshop and put the three images in one file with the main pass on the bottom; occlusions on top. ![]() Change the blending mode of the “simple occlusion” layer to “multiply.” Adjust the opacity of it to what you like. Do the same to the “environment occlusion” layer. Notice that I added a “Brightness/Contrast” to both occlusions to have more control of the intensity of them. Also you will notice that we have caustics in here. Well, that is the next step (you will have to “screen” them). Tip As you add more occlusion layers and caustics, your image will get darker. Control that with the “Brightness/Contrast” and the opacity of the layer. Tip Also try different blending modes for different results. ![]() Create a black material (not pure black, but almost black). Apply that material to the whole scene except for every object you want to create caustics: - Enable “Caustics” with default settings (1) - Turn off the environment (2) - If you render it, you won’t see much unless you increase the intensity of the caustic effects on the multiplier to 20+. ![]() Decrease the “Maximum Sampling Radius” of the photons (1). Render a test. Notice that there are not enough photons to create the effect. ![]() Now you need to increase intensity of caustics to 60 via “Multiplier” (1). Then increase the “Average Caustic Photons per Light” to 1,000,000 (2). Make the photon size (“Maximum Sampling Radius”) 2.0 so that they overlap and create a soft result (3). Remember to decrease “Decay” if you want the photons to travel more distance (4). Always turn on “All Objects Generate & Receive GI and Caustics” (5). Also, remember that in order to get the caustics on the bottom of the pool, you need to specify on the Arch & Design material that you used for the water that “When Caustics are enabled,” “Refract light and generate Caustics effects” (6). Save the image and screen it on top of your rendering in Photoshop and you are done. Scene File Download: mental_ray_tutorial_scene_files.zip (46.35MB) Mental Ray Part 1 - Basic Settings |
| really very talent 3d guy... |
| Excellent Tutorial! Thanks a lot for sharing! God Bless you more! |
| YOU R GREAT PERSON.PLZ SEND ME OTHER SUGGITION IN MY E MAIL I ID VIKASC442@GMAIL.COM.PLZZZZZZZZZZZZZZZZZZZZZZZ. |
| you`re the god 3d |
| goog |
| Hi Ray, very very good tutorial, Thanks |
| very goodtutorial good explinaton |
| excellent this tutorials ,amusing |
| thank for free tutorial , its importan for mee , ihave learn by my self cad and max , good bless u all for cg arts |
| Hi Ray, Thanks for the good words. Your words made me want to work harder to bring you guys good tutorials. You can actually find some video tutorials on site. |
| i appreciate ur support to the improvement of skill of well over thousands of users. may God bless u. i need video tutorial for 3dsmax, revit, and adobe photoshop |
| great tutorial,great view,thanks. |
| good tutorial. thanks man! |