7 Replies Latest reply on May 21, 2013 2:24 PM by bryab

    Best visually lossless codec for cartoon prerenders with alpha

    bryab Level 1

      Hey guys.  I've done a lot of research on this but still cannot find a satisfying solution.

       

      I have hundreds of comps that I would like to prerender and re-use on a regular basis.  These comps are simple solid colors, cartoons, for character animation.  They contain LOTS of blank space, with the image only comprising a small part of the frame.  This is necessary to line everything up in the end.  I need to be able to decode these prerenders on Mac and Windows, but it is OK if they can only be encoded on Mac.  I need it to be a fast codec for decoding, but I do not care how long it takes to encode them.  I don't care what the container is, but Quicktime seems like the best container that AE supports.

       

      After doing lots of tests, the only reasonable formats I could find were:

       

      ProRes 4444

      Animation

       

      I have tried DnxHD, PNG (Quicktime), PNG (Image sequence), and all the other ProRes variants (with a separate movie for alpha).  DnxHD doesn't work because it only works at fixed sizes and maxes out at 1920x1080.  All the other ProRes variants don't work because they don't have alpha, and when I use a separate ProRes render for Alpha, there's artifacts on the edges.  PNG in quicktime is far too slow to decode, and the files are bigger than Animation.  Using image sequences is a pain to maintain and seems to be slower as well.  I wish I could try out codecs like HuffYuv and Lagarith, but they are not supported on Mac.

       

      ProRes 4x4 would be perfect, but I have no need for 16-bit color.  Animation is the fastest codec, but produces files that are too big.  At 75% quality, it produces files smaller than ProRes, but introduces some artifacts.

       

      Wondering if there is an 8-bit codec with alpha that anyone would recommend for this. 

       

      Also, I am wondering if using a single, very long Quicktime file is faster for AE to use than lots of shorter Quicktime files.

       

      Thanks,

      Bryan

        • 1. Re: Best visually lossless codec for cartoon prerenders with alpha
          Dave LaRonde Level 6

          You need to take another look at PNG...  the QT video codec, that is: it does indeed support alpha channels!  In general, the file sizes are bit smaller than Animation, plus it's a 10-bit codec.  Like Animation, it is also lossless.

           

          I can't speak to the duration of the file.  It depends on what takes place in the animation, and how you plan to use it.

          • 2. Re: Best visually lossless codec for cartoon prerenders with alpha
            bryab Level 1

            I think I found that PNG was kindof slow to render.  I will give it another look. 

             

            The duration of the file question is really just about how AE manages its memory.  Whether having a single file is better or many files.  For game development, I am used to generating single spritesheets which contain all image data, rather than many small files.  I am wondering if something similar is true with AE.  I am basically trying to optimize our workflow as much as possible for maximum AE performance.

             

            In the case of using one quicktime, it would be duplicated many times in AE, and time-remapped to break it apart into layers.  Or it would simply already be broken apart as separate files.  All files would be used all the time, as they are all the elements of a character's head rig (eyes, eyebrows, mouth, etc).  In case you are wondering, the reason I want to prerender them is because they contain a lot of CPU-intensive effects (Mesh Warp, etc).  These head rigs really slow down our workflow and also cause frequent crashes.

            • 3. Re: Best visually lossless codec for cartoon prerenders with alpha
              Dave LaRonde Level 6

              For game development, I am used to generating single spritesheets which contain all image data, rather than many small files.  I am wondering if something similar is true with AE.... In the case of using one quicktime, it would be duplicated many times in AE, and time-remapped to break it apart into layers.  Or it would simply already be broken apart as separate files.

               

              I would go with separate files with small vertical & horizontal dimensions as opposed to one file with giant H&V dimensions.  Even if you have multiple instances of the same file, AE will treat each one individually as it composites.  Thus, a separate file for eft eye, right eye, left eyebrow, right eyebrow & mouth will tend to render faster.

              1 person found this helpful
              • 4. Re: Best visually lossless codec for cartoon prerenders with alpha
                Todd_Kopriva Level 8

                PNG only gives smaller files than Animation in cases of photorealistic images. Animation is better for cartoons (hence the name) because it's an RLE compressor; i.e., it encodes stretches of the same color very well.

                • 5. Re: Best visually lossless codec for cartoon prerenders with alpha
                  bryab Level 1

                  I just gave PNG a try and it was less than half the size of Animation.  However it is slower to encode and decode.  Not sure why Animation is not more efficient in this case, maybe because the edges are somewhat soft.  There are indeed large areas of one color, however.

                  • 6. Re: Best visually lossless codec for cartoon prerenders with alpha
                    Fuzzy Barsik Level 4

                    Try JPEG 2000 as well: in my testings it's about 1.5 times faster and provides of around 1.3 smaller file size compared to PNG.

                    1 person found this helpful
                    • 7. Re: Best visually lossless codec for cartoon prerenders with alpha
                      bryab Level 1

                      JPEG 2000 seems to provide very good compression, has alpha, and is fast to encode.  It is however the slowest of those I tested to decode.

                      In case you are curious, here's the results of my tests.  I did not test encoding speed because it does not concern me.

                       

                      Size

                       

                      Animation ---- 2.1 GB

                      ProRes 4x4 ---- 1.1 GB

                      PNG ---- 555 MB

                      JPEG2000 ---- 493 MB

                       

                      Render Time (Decoding)

                       

                      JPEG2000 ---- 21 min

                      PNG ---- 10 min

                      ProRes 4x4 ---- 9 min

                      Animation ---- 9 min

                       

                      I think PNG is the winner.  It is neither the most compressed nor the fastest but it is the best balance.  Thank you for your advice!