Wednesday, April 6, 2011

NaNny


If you're unlucky enough, you may have sampled a pixel like the one shown above in After Effects. While 32-bit floating point mode has brought us linear color space and overbrights, it does have a hidden dark side. Negative pixel values can be perplexing, but seeing a NaN (Not a Number) or inf (infinity) floating point value can really make your head spin.

These things can cause all kinds of problems if they find their way into a comp. After Effects has safeguards to prevent them from being created, but they can slip in if your renderer burned them into a floating point format such as OpenEXR.

If you see one of these things, the first thing you should do is write an angry email to the developer of your rendering software, because they have a bug to fix. The second thing is apply our free plug-in, NaNny, which will replace the NaNs and infs with the floating point value of your choosing. Also included in the download is an EXR file chock full of these nasties if you'd like to experiment with them a bit.

4 comments:

Anonymous said...

Hey Brendan, The tone mapper in Photoshop CS5 will still crash if you try and run it on a NaNified image. Adobe just sent me in circles with their tech support monkeys refusing to understand the concept. Joy.

Thankfully my renderer doesn't produce them much these days...

Timor said...

Any plans to support OpenEXR 2.0 anytime soon?

Would love to use deep compositing in AE (we will use it in Nuke the day it becomes available)...

Brendan said...

As soon as OpenEXR 2.0 is released to the general public, I'll upgrade my libraries to use it.

Deep compositing in After Effects could be tricky though. The program is not set up for it. You'd probably have to create a plug-in that contained an entire deep compositing engine inside it, which might not be the most pleasant workflow.

Dino Muhic said...

Thank you very much. This is saving me a lot of trouble right now.