Ported plug-ins to OpenFX

Finally found a lit­tle time to port most of my After Effects plug-​​ins to the OpenFX for­mat. So far I have Gen­er­a­tor, Celu­light, Occlu­sion­ist, Edgar, Flood­gate and a cou­ple more fil­ters run­ning in both 32-​​bit and 64-​​bit in Win­dows and Linux.

The port was fairly straight­for­ward: Back when I was rewrit­ing Nor­mal­ity for ver­sion 3.0 I’d designed a portable wrap­per around the After Effects–spe­cific parts of the code, so it would be easy to sep­a­rate the graph­ics algo­rithms from the GUI side. My plug-​​ins also share many libraries with my 3D shaders, which were already designed to be cross-​​platform and 64-​​bit capa­ble.
So this strict sep­a­ra­tion paid off for me as it made port­ing the soft­ware to the OpenFX for­mat quite painless.

What's this OpenFX business?

The OpenFX (OFX) for­mat is, as the name sug­gests, an open stan­dard for visual effects plug-​​ins.
For me as a devel­oper there are a num­ber of tech­ni­cal ben­e­fits as the API is open, rea­son­ably mod­ern and far more acces­si­ble than the pro­pri­etary, aging and con­vo­luted After Effects API my plug-​​ins were orig­i­nally writ­ten for.

The really great thing for devel­op­ers and users alike is that OFX is sup­ported by a grow­ing num­ber of com­posit­ing appli­ca­tions includ­ing Nuke, Fusion, Shake and Toxic/​Maya Com­pos­i­tor. (Notice a promi­nent com­pos­i­tor miss­ing from that list…?)
Any­way, that means the next time a soft­ware devel­oper decides to arbi­trar­ily end sup­port for your plat­form of choice, you can at least take your col­lec­tion of plug-​​ins with you.

Normality for OpenFX?

Cur­rently not, unfor­tu­nately… as much as I like the OFX API, it does have some lim­i­ta­tions which make a faith­ful port of Nor­mal­ity impossible.

I do have a solu­tion in mind but it’ll take some time to design and imple­ment. With­out reveal­ing too much at this point, I’ve been con­sid­er­ing free­ing Nor­mal­ity from the shack­les of a host appli­ca­tion alto­gether for quite some time now…

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.