Share to

You can earn money or coins from your share:)

Tips: you can use Sparticle for uploading away3D effects.

Tips: you can download Sparticle for uploading effects.

Tips: The ActionScript editor is supporting Away3D, Starling, Dragonbones and Flex frameworks.

Tips: paste the web page URL then click button:) Your Best Source for Gaming
Login    or

Three Ways to Generate Ambient Occlusion in 3ds Max

Final product image
What You'll Be Creating

Ihave made a very simple scene for this demonstration. This scene contains ateapot, a box and a sphere. I have also applied some materials and set therendering engine to Mental Ray.

I have also added and positioned several Omni lights in the scene.

Ihave chosen Mental Ray Shadow Map as the shadow type. And in the Mental Ray Shadow Maprollout, I have set the MapSize to 2048 and the Samples to 24.

Press the F10 key to open the Render Setup window.In the Renderer tab, set the Minimum value to 4 and the Maximum value to 16. And select Mitchell for the Filter Type.

Now render the scene. It looks nice, but the depth is still missing. However the shadows are soft. We can enhance the overall look byadding an Ambient Occlusion pass while compositing.

In general words, AmbientOcclusion (AO) is a method of creating soft shadows around the cornerswhere objects meet. It gives an extra sense of depth and realism. Look at theimage below for a before and after comparison.

Let’s see how we can generate an Ambient Occlusion pass using MentalRay. Press M to open the Material Editor. Pick an emptyslot and click on Standard, then choose Mental Ray from the list.

Click on the Surface map slot and select Ambient/ Reflective Occlusionfrom the list.

Set the Samples to 128, Spread to 1 and the Max Distance to 20. You can play with thesevalues in your case.

Press F10 to openthe Render Setup. Go to the Processing tab and enable the Material Override option. Thenselect the Ambient Occlusion material slotand drag and drop it onto the Material Overridechannel.

Now press F9 to render the frame. This is the rendered frame with the Ambient Occlusion pass. You can see the soft shadows around the corners where the objects meet.

Ifyou want Ambient Occlusion using the Scanline renderer, then you need to use a trick. First, disableall the lights in the scene. To do this, go to Tools> Light Lister.

This opens the LightLister window. Here turn off all the lights by unchecking the boxes under On.

Goto Lights >Standard Lights andgenerate a Skylight in the scene by clicking and dragging in the viewport. Turnon its Cast Shadow option.

PressM to open the Material Editor. Pick an emptyslot and select a pure white for the Diffuse color. And then apply thiswhite material to all the objects in the scene.

PressF9 to render the frame, and you'll get the Ambient Occlusion map.

MicheleMarcelli has written a very useful script for creating Ambient Occlusion. Youcan go to to get thescript. The best thing about it is that the script is FREE to use.

Download and install the script. Normally you have to putthe script into the Scripts folder of the 3ds Max root directory. Now back in 3ds Max, go to MAXScript > Run Script. This opens the browser, here select the script and click onOpen.

The script window opens with a warning message. It says thatyou need to change the renderer from Scanlineto Mental Ray. Click on OK. It will automatically change therendering engine to Mental Ray.

With the default values selected, click on the Preview AO button.It will immediately show the preview in the small window.

Ifyou are satisfied with the preview, click on the Render VFB button. This will showyou the final result. The output resultlooks good, but is a bit grainy. So we need to tweak some values.

Increasethe Sample rate to 256. Now, firstclick on Preview and then click on the Render VFB button. The rendered frameis much clearer and smoother than it was before.

Previously this script was only capable of rendering a single frame, but with the updated version, you can now render all of the active timelineframes.

I hopeyou have enjoyed these three ways to create Ambient Occlusion in 3ds Max. Thescript written by Michele Marcelli is the fastest way to get the AmbientOcclusion. The script is totally FREE to use, however if you find it useful,you can donate an amount to the creator of the script as a return gesture.This is only a matter of choice.



You must Sign up as a member of Effecthub to view the content.

1527 views    0 comments

You must Sign up as a member of Effecthub to join the conversation.


Or Login with Your Email Address:

Or Sign Up with Your Email Address:
This field must contain a valid email
Password should be at least 1 character