Announcement

Collapse
No announcement yet.

White artifacts when comping render elements in EXR 32 bits float in After effect.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • White artifacts when comping render elements in EXR 32 bits float in After effect.

    Hi,

    I have this problem once in a while since a long time. When I comp render elements from vray and I use effects like reel smart motion blur, glow and depth of field I get strange white artifacts and sometimes entire white frame just on a few frames.

    My project is in 32 bits linear sRGB. The rendered frames are 16 bit float EXR. Everything is separated in vray render elements with the raw and filter parts.

    I was always able to get rid of these in the end by tweaking the levels of the culprit layer. In the case below it was the reflection layer of the red bowl (vrayRawReflection and vrayReflectionFilter) causing artifacts with the subsequent depth of field (lenscare). But I would like to know if someone found a way to avoid them. Maybe in another compositing app like nuke or something...

    Click image for larger version

Name:	whiteArtifAE.JPG
Views:	1
Size:	115.9 KB
ID:	880491

    __________________________________________
    www.strob.net

    Explosion & smoke I did with PhoenixFD
    Little Antman
    See Iron Baby and other of my models on Turbosquid!
    Some RnD involving PhoenixFD

  • #2
    I'm not sure if we can be in a big help, because we can check only the comp result in Nuke here. I see that the issue is more related to the After effect plugins used or I'm wrong?

    However, you can send us all the files and we will do some tests on our side.
    Tashko Zashev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Double check if your alphas are correctly between 0 and 1, or if there is any, and try to clamp or fill them if they went insane.
      I get tons of headaches with after effects, 32bit lwf with a lot of filters (sapphire, lenscare, magic bullet, etc), but nothing like that example, most of the time it's nan pixels around.
      KCTOO - Directors

      Comment


      • #4
        Ok I will try to create a simple example that I could send you. and try to see what's the real problem once and for all.

        And thanks kagemaru for talking about nan (not a value) pixels. I didn't know this word! and if I hover on top of those white pixels I am getting a nan for the blue value. And where I have full white frame all rgb and a are giving nan value. Googling this word also brings me lots of clues. I will dig into those a bit.

        I found a nice free plugin calle NANny for after effects to help deal with NAN pixels. When I use it on this comp (on my final output precomp) most of my frame looks a lot better and I have no white frame anymore. BUT the plugin only replace all the nan pixels by a single color that we must choose manually. So if there are too many nan pixels, we still see artifacts in the final image. I will try to apply it instead to the culprit layer.

        And the readme file is very interesting:

        NaNny
        Plug-in for After Effects
        by Brendan Bolles

        version 0.5
        April 6, 2011


        Summary
        =======

        NaNny is an AE plug-in to help you deal with floating point pixel values "NaN" and "inf". These can cause all kinds of problems with image processing and should be eliminated. NaNny will replace them with the floating point values of your choice.


        Usage
        =====

        If you suspect you have a NaN or inf in your image, apply NaNny to it. (Your project must be in 32-bit mode.) The NaN, inf, and -inf values will be replaced by the values in the sliders. Everything else will remain unchanged.

        If you want help locating the offending pixels, you can switch NaNny to Diagnostic mode, which will make a mask with good pixels black and the bad ones white. It will also show a message in the Info palette telling you how many bad pixels it found.

        If you want to experiment with this problem, I've included the file NaN_inf.exr for you to play with. Try applying a blur to it without NaNny and see what happens. Remember, you have to be in 32-bit mode.


        Background
        ==========

        The world of floating place is a strange place, much stranger than the 8- and 16-bit pixel formats After Effects supported prior to version 7. With those, every pixel was in the range 0-255 (0-32768 for 16-bit). You had black and white and everything in between. Easy.

        In 32-bit floating point mode, those ranges translate into 0.0-1.0. But then you can also have values of 1.5 or 15.0 or 15000.0. Those are just brighter than white and behave as you'd expect, and are even very useful. No problem there.

        But float pixels can also have negative values like -0.5. They will appear black on screen, but will have strange properties, like darkening something when Added to it. Or if you want to brighten them up using Exposure, that will cause them to become even darker (more negative). Weird. Unless you have a good reason, you probably don't want negative pixels.

        Then there are the strangest possible float values, which don't even look like numbers at all. They are called "NaN" and "inf".

        NaN stands for "Not a Number" and is basically an undefined value. Sort of like the value of a pixel being "pepperoni," which throws the Hard Light transfer mode for quite a loop. NaN is similar to "undefined" in math. For example dividing zero by zero in math (0/0) is undefined and a computer will typically return NaN as a result. Wikipedia has a good article about this:

        http://en.wikipedia.org/wiki/NaN

        inf stands for infinity, which you typically get in math if you divide something by zero. So 1/0 would give you inf. Or -1/0 gives -inf. This is maybe not quite as weird as NaN, but still weird.

        When a NaN or inf pixel finds it's way into an operation, the result is usually another NaN or inf. NaN - 1 = NaN. So if you have one little NaN pixel in your image and then blur it, any pixel that sampled the NaN will get corrupted. Like a black hole from which no operation can escape.

        After Effects takes measures to prevent inf and NaN from being created, even in cases where mathematically they should. If you have one of them, it probably came from a file rendered in a 3D program. Probably the first thing you should do is write the makers of that renderer an angry e-mail and include a sample project. NaN and inf might make occur in floating point math, but they don't make any sense appearing in a rendering of the world. It's a bug and they should fix it.

        But until all software everywhere is 100% bug free, we'll need a way to deal with NaN and inf.


        Negative Pixels
        ===============

        NaNny doesn't do anything about negative pixels, but you'll probably want to get rid of them if you have any. The easiest way to clamp them in AE is to apply Levels and switch Clip to Output Black to On.

        When Levels' Input Black matches Output Black and Input White matches Output White, it generally doesn't change any pixels. But turn on clipping and it will clamp to whatever you set. So Levels is a good clamp tool.

        Color space transforms are often to blame for the appearance of negative values. If an image comes from a color space with a wide gamut and then you drop it into a more narrow one, you can have some pixels that are super-saturated and one of the channels turns negative. For example, if red is {1.0, 0.0, 0.0}, a super-saturated red might be {1.0, -0.2, -0.2}. If you clamp the negatives in that case, the appearance could actually change, especially if you're writing out to the wider color space. But if you don't clamp them, you might get the weird negative behaviors. Tricky.

        The best thing to do is avoid this situation. Set your project working space to one wide enough to hold any images you're working with. Ideally your images will all be in that same color space so no color space transforms are involved at all. (Except of course you want your Working Space to be linear.)


        NaN_inf.exr
        ===========

        This is a sample EXR file (16-bit float) containing NaN, inf, and -inf pixels. Some versions of After Effects don't sample these properly in the Info window unless the offending pixel is all by itself. Each word has a solo pixel floating below it for this purpose but trust me, the words are filled with the pixel values specified. You can play with NaNny's output values to verify this.
        Last edited by jstrob; 04-08-2014, 01:32 PM.

        __________________________________________
        www.strob.net

        Explosion & smoke I did with PhoenixFD
        Little Antman
        See Iron Baby and other of my models on Turbosquid!
        Some RnD involving PhoenixFD

        Comment


        • #5
          I found that the culprit layer was the vrayRawReflection layer outputed by vray. It contains a -1.#INF value in the blue value. So this is really a vray bug.

          When I apply the plugin NaNny to it the final result is just perfect.

          So I think there is a bug in vray creating nan pixels in the vrayrawreflection pass. I composited mine with the vrayreflectionfilter in multiply on top of it but the nan pixels is in the rawref itself.

          I will create a scene with the isolated problem and send it to chaosgroup.

          __________________________________________
          www.strob.net

          Explosion & smoke I did with PhoenixFD
          Little Antman
          See Iron Baby and other of my models on Turbosquid!
          Some RnD involving PhoenixFD

          Comment


          • #6
            Originally posted by jstrob View Post
            So I think there is a bug in vray creating nan pixels in the vrayrawreflection pass. I composited mine with the vrayreflectionfilter in multiply on top of it but the nan pixels is in the rawref itself.

            I will create a scene with the isolated problem and send it to chaosgroup.
            Yes please, we will try to fix it.
            Also include the culprit render layer as .exr file. Thank you.
            Tashko Zashev | chaos.com
            Chaos Support Representative | contact us

            Comment


            • #7
              I am sending the max 2015 project and rendered layer via wetransfer. I rendered the layer in max 2014 at the time.

              __________________________________________
              www.strob.net

              Explosion & smoke I did with PhoenixFD
              Little Antman
              See Iron Baby and other of my models on Turbosquid!
              Some RnD involving PhoenixFD

              Comment


              • #8
                By the way here is a link showing how to deal with nan pixels in Nuke: http://www.nukepedia.com/expressions...th-nan-pixels/

                __________________________________________
                www.strob.net

                Explosion & smoke I did with PhoenixFD
                Little Antman
                See Iron Baby and other of my models on Turbosquid!
                Some RnD involving PhoenixFD

                Comment


                • #9
                  I've had similar issues with AE and fringing, and a lot of it was fixed when I went to Interpret Footage->Main->Color Management->Preserve RGB. You probably already did that, but it's worth mentioning.

                  Comment


                  • #10
                    In my case that doesn't work. But the plugin NaNny works by apllying it to the rawreflection layer (the one with nan pixels). I work in linear 16 bit float EXR and sRGB profile for every layer.

                    __________________________________________
                    www.strob.net

                    Explosion & smoke I did with PhoenixFD
                    Little Antman
                    See Iron Baby and other of my models on Turbosquid!
                    Some RnD involving PhoenixFD

                    Comment


                    • #11
                      Originally posted by jstrob View Post
                      I am sending the max 2015 project and rendered layer via wetransfer. I rendered the layer in max 2014 at the time.
                      Hi,

                      Did you send the files to us? I'm not able to find the wetransfer mail in our database.
                      Thanks.
                      Tashko Zashev | chaos.com
                      Chaos Support Representative | contact us

                      Comment


                      • #12
                        Yes I sent it to chaosgroup support email via wetransfer...

                        I just sent it again for you in a regular email with a link.

                        __________________________________________
                        www.strob.net

                        Explosion & smoke I did with PhoenixFD
                        Little Antman
                        See Iron Baby and other of my models on Turbosquid!
                        Some RnD involving PhoenixFD

                        Comment


                        • #13
                          So finally the conclusion was to try to render in 32 bits, and try to use the vray raw output ans max intensity. and also try to turn off embree.

                          In fact I was already using max intensity. And for the rest: using raw output and 32 bits, would increase load on my pipeline. 32 bits creates huge and slow files to comp. And with raw output I would have to convert every file I render in order to be able to comp. Turning off embree would also slow thing down....

                          Byt the way the bad pixels also cause problem in Nuke not just after effets.

                          In my current project I still get bad pixels again in the RAWreflection pass. the solution I use that works very well so far is the NanNy plugin for after efffects. When I get black or white ugly spot in a comp I first find the culprit layer and apply that filter to the layer and the filter can tell if there is a infinite, a nan or a negative value pizel in the specific frame, and it replaces it with a good pixel.

                          I still hope you could one day find why vray or 3dsmax cause bad pixels (nan, inf,neg) in the RAWreflection pass when rendering in 16 bit float EXR. so I don't have to hunt those down everytime. But for now hunting them down is what keep my pipeline faster and simpler.

                          __________________________________________
                          www.strob.net

                          Explosion & smoke I did with PhoenixFD
                          Little Antman
                          See Iron Baby and other of my models on Turbosquid!
                          Some RnD involving PhoenixFD

                          Comment

                          Working...
                          X