+1 tag for Google+

Wednesday, 16 September 2015

Excluding Ambient Occlusion in Selected Objects

Here's a short but very useful article on how to exclude ambient occlusion from selected objects in your ambient occlusion renders in Maya's Mental Ray renders.

Neal B├╝rger is an amazing programmer and computer graphics artist. On Neal's amazing website, he gives instructions on how to go about setting up objects so the ambient occlusion shader excludes them from AO computations.

http://nealbuerger.com/2012/10/snippets-ambient-occlusion-exclude-objects/ 
http://nealbuerger.com/2012/10/snippets-ambient-occlusion-exclude-objects/

Ambient Occlusion calculates and creates shading of shadows based on a open un-occluded lighting situation of an object placed in the open, the environment is then like a hemisphere of light-casting dome, contributing to the illumination of the object. Each pixel, sample region is then shaded based on the percentage of blocked by neighbouring objects versus an entirely unblocked situation.

In a standard rendering scenario when I set up an AmbOcc or AO pass in Maya, I will either add a Mental Ray Pass or create a Render Layer, and then add a Ambient Occlusion preset to that Render Layer. This will then create an AO shader and assign it to all geometry objects in the scene and gives me my AO pass.

However, it does not take into account objects that do not need to cast a shadow in the AO pass. A good example of this would be like the image shown above. Glass objects do not generate strong shadows. Windows of cars and helmet visors for example. Of course a quick fix would be to hide these objects in our render layer. However sometimes we still need these objects to occlude other objects in the AO pass.

Thus Neal's method is a great solution to the problem. :)

Tiles Flipping Rigs




Tiles Flipping Rigs from Patrick Woo on Vimeo.

I finally got the time to  put up a test where I rigged up tiles  / cubes / boxes to flip over when a locator is within a certain distance.

The each tile has an expression that takes the distance between the locator to itself, and use that to drive its own rotateX.

I understand this is super simple to set-up in Houdini, but in Maya I had to write a script to set this up, simply because each tile had to have an expression that watches out for the locator. In this aspect, I find Maya's system to be a bit unwieldy. Even when it is procedural, it requires technical knowledge to set things up for a relatively simple task .