PDA

View Full Version : Ambient Occlusion


chris_b
06-13-2003, 11:44 PM
I pulled this from a post further down
the line where it wasn't getting much attention. It is a very useful technique that deserves a thread and discussion of its own.

"At SIGGRAPH 2002, technical directors from Industrial Light and Magic presented a technique they call ambient occlusion. Simple, but highly effective, ambient occlusion's been used for years at studios like BlueSky and ILM to achieve grounded realism, without the cost of full global illumination. Fancy name aside, ambient occlusion is simply a ratio of how much ambient light a surface point would be likely to receive. It simulates a huge dome light surrounding the entire scene. If a a surface point is under a foot or table, it will end up much darker than the top of someone's head or the tabletop. This can then be multiplied by various other surface attributes to achieve a subtle, but very powerful, lighting effect"
_

Ambient Occlusion is a great means of regaining most of the depth of a full GI render at a fraction of the cost. Best of all, once you have the Ambient Occlusion pass you can re-use it even if you change the textures and lighting.

http://www-viz.tamu.edu/students/bmoyer/617/ambocc/

http://zj.deathfall.com/occsurfii.htm

http://zj.deathfall.com/img/ambocc_dia.jpg


In Cinema there are currently two methods that I know of :

i) The One Bouce GI pass:

- Render a pass of your scene with
all materials and direct lighting (no radiosity).

- (optional) Render and Ambient Illumination pass using a blurred environment map of the scene (this
is a workaround for getting back your diffuse bounce light).

- Apply a 100% white material with no specularity to every object in the scene

- Apply a 100% luminous material to a Sky Object

- In your render settings enable Radiosity (either mode) and set the Diffuse Depth to 1 and render (ensure that the view angle and dimensions are exactly the same as the straight render)

- In Photoshop or your compositing application, place the Ambient Illumination pass on the first layer,
the Ambient Occlusion pass on the next layer above (multiply), and the Direct Illumination pass on top (screen).


ii) The Shader-Based approach

- Render the Direct Illumination and Ambient Illumination passes as above.

- Apply a 100% luminous material with no specularity to every object in the scene and place dirtyNUTS in the diffusion channel (more rays for smoother results)

- Add an Environment object and set the Strength to 100%.

- Render and combine passes as above.


The one bounce GI method is more suitable for outdoor environments and the dirtyNUTS method is better indoors.
Also, dirtyNUTS tends to be faster.

If anybody is using this technique, please chime in and add your thoughts!! Surely it would be possible to write an optimised shader for generating AO passes? :)

chris_b
06-13-2003, 11:50 PM
combining Ambient Occlusion and Normal Mapping techniques:

http://www.drone.org/tutorials/lighting_flat_objects.html

LucentDreams
06-14-2003, 12:19 AM
this is something I wanted to try with peranders nomral mapper, so if anyone has a tree file, I would start this almsot immediately as a (hopefully) quicktest to see if it would work. you can email it to kaiskai@vfs.com

never mind Chris pointed me in the way of a nice tree will get on it as soon as this render is finished

JIII
06-14-2003, 03:48 AM
Now this is interesting. I wish I had something to add to this thread that was constructive, but I know nothing about this really. Anyway is it possible to build this kinda thing diffrectuly into a program or would it be more effiecnt to do it all in post.

Brent Turbo
06-14-2003, 09:47 AM
Looks to me like it would be much better just to composite the end results together instead of making the renderer do all the work. That way you can control the level of the effect in post.

I would imagine the occlusion pass could also be done with a spotlight dome and soft shadows with a really low resolution shadow map? That 50grey plugin is really nice for that stuff. No use in using radiosity and cranking up render times. You'll never find a studio doing straight-up radiosity renders in film production. Most studios still don't even use raytracing. Ever.

LucentDreams
06-14-2003, 11:15 AM
exactly his example is from renderman where they use an occlusion map. closest thing we have is dirtynuts. I think in on of the old BN packages (penny or praline which ever) there was an occlusion shader. THis is how its done in renderman rather then rendering a a whole bunch of lights and shadow maps.

michaeli
06-15-2003, 03:14 PM
Could this technology apply to an animation, how do it deal with the flickering by the one bounce GI pass?

JIII
06-15-2003, 04:03 PM
I assume it can be used for animation if the major studios are using it.

Not too many major studios that only do stills.

chris_b
06-15-2003, 05:32 PM
The technique is definitely production proven for animated CG.

One common solution for the aliasing and grainyness of the once-bounce GI
or low shader samples is to blur the Ambient Occlusion pass slightly in post.
With the addition of motion blur and additional grain from the film transfer,
any such concerns vanish completely.

Another common technique, where environment maps are used in lieu of ray-traced reflections, is the Reflection Occlusion pass, which ensures that
the environment map does not appear in areas that would not reflect the environment. I remember (from a very brief flirtation years ago) that Electric Image had this option built into the Environment Map channel.

.... for the record, the original Praline did NOT include an Ambient Occlusion shader... perhaps Praline v2 will? Does anybody know? Kai? (maybe I should e-mail David and ask)

LucentDreams
06-15-2003, 06:19 PM
Unfortunately I can't get the tree tow work, Iguess we need a true ambient occlusion shader to do it :/


I'm not tooo sure, I really thought Darf had developed a real ambient occlusion shader, but I could be wrong, its been ages since I've even talked with David.

Yes Ambient Occlusion is tried and true, Because theres little render hit for a sort of GI look, it adds a lot to an environment.

JIII
06-15-2003, 09:43 PM
How should I set up the distant lights? I am trying to do this ambient occlusion thing. I can not seem to find a good way to set them up. Will someone please explain to me how to set up the ambient and distant light for ambient occlusion.

CGTalk Moderation
01-15-2006, 09:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.