Screen-space color bouncing

While work­ing on my Occlu­sion­ist plug-​​in I stum­bled across an inter­est­ing side-​​effect of gen­er­at­ing ambi­ent occlu­sion in screen-​​space: It’s pos­si­ble to achieve com­pu­ta­tion­ally expen­sive global illu­mi­na­tion effects such as color bounc­ing in the same way!

And what’s best… it comes pretty much for free!

ssgi_1

Screen-​​space color bounc­ing (right)

As it turns out, when pro­cess­ing ambi­ent occlu­sion the Occlu­sion­ist is already doing every­thing required to achieve color-​​bouncing, so it’s sim­ple enough to call the source image’s color and bounce that around to sim­u­late a nice final gather or global illu­mi­na­tion effect right in After Effects.

The over­head is some­where around 10 – 20%, which is totally accept­able when you con­sider that true 3D global illu­mi­na­tion effects gen­er­ally take much, much longer to render.

Hav­ing access to screen-​​space ambi­ent occlu­sion plus color bounc­ing right within After Effects will cer­tainly make for some very inter­est­ing effects and opens a whole new world of possibilities!

Occlusionist

The Occlu­sion­ist is a spin-​​off of my Adobe After Effects plug-​​in Nor­mal­ity and is used to gen­er­ate screen space ambi­ent occlu­sion (SSAO) and global illu­mi­na­tion effects.
So what’s ambi­ent occlu­sion you ask? Basi­cally, AO is an approx­i­ma­tive global illu­mi­na­tion method that checks to see whether any given point on a sur­face is occluded by other sur­faces.

OcclusionstOcclusionistOcclusionist Comparison

Right… now what does that mean?! Well, objects that are close to each other block some of the ambi­ent light which is cast by the sky or the sur­round­ing room, for exam­ple. So the more ambi­ent light is blocked in this way, the darker the sur­face becomes. This cre­ates a nice shad­ow­ing effect which can be sim­i­lar to true global illu­mi­na­tion methods.

The effect is com­monly used in 3D pro­duc­tions where true GI tech­niques such as Final Gather or radios­ity would be too com­pu­ta­tion­ally expen­sive, whereas AO is com­par­a­tively quick to ren­der and does not require a com­pli­cated setup.
It’s an incred­i­bly use­ful tool to give your ren­ders more depth and a more real­is­tic appearance.

Usage

The Occlu­sion­ist requires a depth and a nor­mal pass to do its thing. Once you’ve got­ten those ren­dered out of your 3D pro­gram of choice it’s pretty straight­for­ward to cre­ate ambi­ent occlu­sion effects: Apply the Occlu­sion­ist plug-​​in, cal­i­brate your nor­mal– and depth pass and there you go — clean (or noisy, as you wish) occlu­sion effects right in After Effects.

This makes for a won­der­ful addi­tion to your Nor­mal­ity workflow.

Although AO is fairly quick to ren­der in any mod­ern 3D ray-​​tracing engine, some of us pre­fer even faster meth­ods — the rea­son I devel­oped Nor­mal­ity in the first place!
I hope to get the Occlu­sion­ist plug-​​in close to real-​​time speed, which will prob­a­bly require either mak­ing it multi-​​threaded or hav­ing it run directly on the GPU.

WIP

At this point the Occlu­sion­ist is a work in progress: It’s not at all opti­mized and requires too many sam­ples to achieve pleas­ing, noise-​​free results, which in turn makes the ren­der time a bit too long for my taste. 3 – 5 sec­onds per frame may be a dream come true from a 3D renderer’s point of view, but in comp that just doesn’t quite cut it.
In the com­ing weeks I’ll try to get the render-​​times to a level more on par with what After Effects users are com­fort­able with.