Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
Theme color:
  • 1/3
You are here: Homepage /  Blogs /  With Design in Mind / Technique 3: Using Ambient Occlusion and Contours in mental ray to create NPR’s.
Technique 3: Using Ambient Occlusion and Contours in mental ray to create NPR’s.
Posted: Aug 25, 2009
Category: Autodesk 3ds Max, Autodesk VIZ, Rendering, Tips and Tricks, Tutorials, Visually Informed Design
Social Media:
Bookmark and Share
 

Creating Artistic Renderings in Autodesk 3ds Max Design

Technique 3: Using Ambient Occlusion and Contours in mental ray to create NPR’s.
This Technique requires using the mental ray renderer.
1.       In the Render Setup Dialog box (F10), verify that “mental ray Renderer” is assigned as the Assigned Renderer in the Production slot.
Ambient Occlusion
Ambient Occlusion is considered a “Special Effect” to help simulate realistic global illumination. Here we are going to use it to help generate a Non-Photorealistic Rendering effect.
1.       Open the Material editor (M).
2.       Create a new material. Ambient Occlusion (AO) is limited to mental ray’s Arch&Desisn and ProMaterials. For this tutorial, we’ll select the Arch&Design material. I have applied this material to all non-glass objects and instanced it into all multi-sub object materials to replace non-glass materials.  I have also set the Diffuse Color to White.
*We’ll look at one other AO technique later.
3.       Burrow down into the Arch&Design and open the Special Effects rollout.
4.       Enable Ambient Occlusion
Samples will affect the quality - too low and the AO looks splotchy. Too high and rendering time is affected.
Max Distance determines how far away from the “corner” or “crevice” the AO is calculated. Too small and the affect will be lost. Too large and the object becomes black. Don’t forget the scale of the project. Small object will get small distances, Large objects, I think you get the idea...
For this tutorial, I’m going to make the Shadow Color Blue so we can really see the affect.
5.       In the Render Frame Window, I set the Max. Reflections, Max. Refractions and FG Bounces to 2. I also move the Final Gather Precision to Medium and The Image Precision to Very High so the Effect is not affected by low quality. You will need to find the settings that fit your expectations for render time and quality. I wanted to show you the Effect in the best possible light.
Notice how the AO mixes with the Daylight Systems Shadows. Unfortunately for this scene, objects in direct light are getting a bit washed out. Let‘s make them pop with some outlines.
Creating Contours
Contours are a post rendering effect in mental ray that allow us to assign, per material, an edge condition. Post rendering meaning that the effect is applied after all other rendering calculations.
1.       Burrow deeper into the Arch&Design material(s) to access the mental ray connection menu.
 
2.       Pick the button next to the Contours.
3.       Select the type of Outline condition you are looking for. Some Contour maps like Depth fade diminish the further from the camera the outline is applied.
Here is an Example of Curvature with the Color of the Outline set to Blue.
Notice how the Outlines are Strong (.3%) while the Interior lines are Lighter (.1%)
To see the affects of the Contour Shader, the Contour Camera Effect must also be enabled in the Rendering Setup Dialog box.
1.       Open the Rendering Setup Dialog box.    
 
2.       Navigate to the Renderer Tab.    
 
3.       Dig down to the Camera Effects area and Enable Contours.
I assumed the Defaults here. Time permitting, investigate the options availbe such as Contous Only for Camera Output, or controling contour angle in the Contour Contrast.
4.       Render as usual. Notice that the Contours are not applied until all other render functions are finished.
Note: Contours can be applied to any material with the mental ray Connection available. If you simply wanted outlines on your photo real materials that too, may give you the NPR you’re looking for.
You may have noticed that Contour Lines do NOT show though glass or in reflections. We’ll cure that in our next tutorial.
One More Approach to AO and Contours
The last technique we’ll look at here is taking many of the same elements we saw in the Arch&Design material and apply them in the simpler mental ray material.
1.       Create a new material using the mental ray shader.
2.       The mental ray Shader does not have any control to add Ambient Occlusion. We get around that by adding the Ambient/Reflective Occlusion map to the Surface slot.
This map gives us many of the same AO controls that are found in the Arch&Design shader, plus more.
Here I’ve applied a 32 for the samples for good but not great results(I feel this is a good compromise between speed and quality). Notice a straight Blue for the Bright and a pure White for the Dark samples. This is going to generate a Blueprint effect. Lastly, for the scale of this scene, 4’0” for the distance.
3.       Navigate back to the Parent level of the material.
4.       In the Advance Shaders area I’ve applied the Curvature (Contour)
Notice I’ve used pure White as my Contour Color. Again, this will strengthen the Blueprint Effect.
1.       Verify that Contours are enabled in the Renderer tab as described in steps 1-3 above.
2.       In order to give the “Full on” Blueprint Effect, I also disabled the Use Map feature in the Environment and Effects dialog box and set the background color to pure blue. Access the Environment and Effects box by typing the number 8 or from the pulldowns, Rendering -> Environment. I also changed the exposure control to logarithmic since we were no longer using ProMaterials.
3.       Render as usual.
I told you it would be different. The title is "artistic renderings".
Here's the PDF.
Tutorial 4 will cover Ink & Paint.

 

In order to post any comments, you must be logged in!
Newest users comments View All 5 Comments
Posted by Eddie Perlberg on Aug 30, 2009 at 01:16 AM
Maya has Ambient Occlusion shaders and Contour Rendering capabilities! So while the techniques may not be the same, the concepts are identical. Give a quick trip to the Maya help and search Ambient Occlusion and Contours in mental ray to find out how to access the necessary tools.
Posted by johnksportsmark on Aug 29, 2009 at 11:54 AM
Can you do any of these artistic renderings in Maya?
Posted by Eddie Perlberg on Aug 26, 2009 at 10:48 AM
The entire Webcast is now archived at www.adskmedia.com/architecturewebcasts/archive.php
Posted by Eddie Perlberg on Aug 25, 2009 at 06:26 PM
Part 1 and 2 are in the View All section. RSS feeds will send you an email when parts 4, 5, 6 & 7 are posted. I always tweet about it as well. Follow me on Twitter at eperlberg.
Posted by SuperCoon on Aug 25, 2009 at 06:01 PM
Is there a part 1 & 2 to this topic, & how can I tell when part 4 is available? Very cool by the way.