Use of PNGs in After Effects

To talk about anything else
User avatar
Jeremy Richard
Posts: 53
Joined: 16 Oct 2021, 01:44
Contact:

Use of PNGs in After Effects

Post by Jeremy Richard »

Hello everyone.

Here are some thoughts regarding After Effects and PNGs which might be of interest to anyone using both.

In one of a series of interesting articles regarding performance in After Effects, the author Chris Zwar argues that PNGS are not recommended when compositing in After Effects, especially as video resolutions get bigger.

Here are some quotes from his article After Effects & Performance. Part 14: Make it faster for free:
PNG files are so slow that I even checked in with Adobe to see if it’s a bug. It’s probably not. It’s just how they are, and it caused by the compression algorithm they use.
By the time we get to 8K resolution, a PNG file takes about 20x longer to save than a JPG or TIFF file. In the project I was using to test the rendering speeds of different file formats, rendering to a JPG sequence took AE about 2 mins 20 secs (140 seconds). Rendering exactly the same thing to a PNG sequence took over 40 minutes.
He recommends using either TIFFs or, more preferably, EXR files (Using EXRs and DWA in After Effects).
User avatar
Peter Wassink
Posts: 4437
Joined: 17 Feb 2006, 15:38
Location: Amsterdam
Contact:

Re: Use of PNGs in After Effects

Post by Peter Wassink »

Would be great if TVPaint could support EXR files...
not sure if that is possible, TVPaint being 8 bit.
BTW this is not really Off topic, it might be a feature request.
Peter Wassink - 2D animator
• PC: Win11/64 Pro - AMD Ryzen 9 5900X 12-Core - 64Gb RAM
• laptop: Win10/64 Pro - i7-4600@2.1 GHz - 16Gb RAM
User avatar
Dean
Site Admin
Posts: 1034
Joined: 28 May 2018, 09:07

Re: Use of PNGs in After Effects

Post by Dean »

This is some really useful information, I'll talk to the devs about this for sure.
Probably a vampire
User avatar
slowtiger
Posts: 2949
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: Use of PNGs in After Effects

Post by slowtiger »

Yes, PNGs always have been noticeably slower. This is also true for Quicktime video wit PNG codec.
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
User avatar
Jeremy Richard
Posts: 53
Joined: 16 Oct 2021, 01:44
Contact:

Re: Use of PNGs in After Effects

Post by Jeremy Richard »

Peter Wassink wrote: 24 Mar 2022, 13:36 not sure if that is possible, TVPaint being 8 bit.
Indeed, it might not. On the OpenEXR website, it doesn't expressively mention 8bit:
Support for 16-bit floating-point, 32-bit floating-point, and 32-bit integer pixels.
One of the possible practicalities of EXR has been mentioned here previously, https://tvpaint.com/forum/viewtopic.php?t=7118.

Regarding PNGs, the fact that PNGs are slow to be processed is also experienced in Fusion:
https://www.steakunderwater.com/wesuckl ... 127#p41127

Targa files (.tga) are suggested as a replacement to PNGs, and it looks like it is suitable for animation:
This type of compression performs poorly for typical photographic images, but works acceptably well for simpler images, such as icons, cartoons and line drawings. (Wikipedia)
Another option could be to export as a .mov using the ProRes codec, which After Effects seems to process faster (from personal experience). But this option implies to re-export the whole sequence even if only a few frames need to be modified.
User avatar
Hironori Takagi
Posts: 313
Joined: 14 May 2018, 10:15
Location: Tokyo, Japan
Contact:

Re: Use of PNGs in After Effects

Post by Hironori Takagi »

This is the reason why targa(.tga) has been the standard in Japanese animation production for nearly 20 years.
Experience has shown that png takes a long time to encode and decode, causing slowness in Adobe applications.
TVPaint 11.7.2(Nov 14 2023), Windows11 Pro, HP Spectre x360 Convertible 14-ea0xxx / TVPaint 11.7.1(Dec 22 2022) Mac OS 11.6, Apple MacBookPro M1 2020
Xavier
Posts: 1855
Joined: 01 Oct 2019, 11:08

Re: Use of PNGs in After Effects

Post by Xavier »

What about WebP ?
User avatar
slowtiger
Posts: 2949
Joined: 08 May 2008, 21:10
Location: berlin, germany
Contact:

Re: Use of PNGs in After Effects

Post by slowtiger »

What about WebP ?
Uhg, please not.
I don't like to use anything outside the really old and trusted formats, not before I can afford completely new hardware. I'm stuck with old versions of everything (including myself), abandoning any old format will break my workflow completely. (Apple already did that with abandoning PICT, it's not even possible to open it and convert to something else - but I have one piece of music software which uses it and nothing else.)
TVP 10.0.18 and 11.0 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
TVP 11.0 and 11.7 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
TVP 11.7 Mac Mini M2pro 32GB OS 13.5
User avatar
Jeremy Richard
Posts: 53
Joined: 16 Oct 2021, 01:44
Contact:

Re: Use of PNGs in After Effects

Post by Jeremy Richard »

Xavier wrote: 07 Apr 2022, 11:16 What about WebP ?
It seems that, like PNGs, WebP was made more for single images for the web, as opposed to image sequences. That didn't stop PNGs to be, it seems, widely used for image sequences, so maybe it could be the same for the WebP format. I would imagine that it is not so much the fact that for the same quality WebP is smaller, but if it can handle aspect of frame size or colour depth that PNGs cannot, then maybe WebP could possibly be used as an alternative.

On WebP's Wikipedia page there is a mention of animated images:
Google has proposed using WebP for animated images as an alternative to the popular GIF format, citing the advantages of 24-bit color with transparency, combining frames with lossy and lossless compression in the same animation, and support for seeking to specific frames. Google reports a 64% reduction in file size for images converted from animated GIFs to lossy WebP, however with a very noticeable visual impact, both at default settings, and optimised settings. When converting using lossless WebP, a 19% reduction is achieved as reported by Google, although real world performance is nearer to 10%
Here is someone doing lots of test with WebP images: Is there any benefit to using WebP images on my website?

There is a plugin for Photoshop, to export WebP files. I couldn't find anything for After Effects or Fusion.

--------------------------------------------------------------------------------------------

Regarding recent video codecs, it seems that HEIF and AVIF were made partly with image sequences in mind. They seem to both support alpha channels: AVIF - alpha compression?, HEIF (High Efficiency Image File Format) Reader.

Here are talks of support for both formats in ffmpeg: Here are some encoders/decoders: Here are results of a comparison made between AVIF and WebP:
  • AVIF provides a smaller sized image compared to WebP.
  • WebP works on only 8-bit depth, whereas AVIF supports 8, 10, and 12-bit, which will accept a broader range of images to be compressed.
  • WebP supports only 4:2:0 channel, whereas AVIF supports 4:2:0, 4:2:2, and 4:4:4 channels.
  • The image quality produced by WebP is lower than AVIF and even JPEG.
  • AVIF supports HDR, which produces high luminosity images.
--------------------------------------------------------------------------------------------

The JPEG2000 format, which supports alpha channels, could also maybe be another alternative.

There is a plugin for Photoshop, Premiere and After Effects here to export as JPEG 2000.

Nevertheless, according to Adobe, there are few disadvantages to that format which might restrict its implementation for a wider use:
  • Many web browsers and photo-sharing websites don’t support the JPEG 2000 format. JPEG 2000 is rarely used outside of these niche areas.
  • There’s no backward compatibility with the original JPEG format, so users need to be able to code in a different standard than what most images use.
  • JPEG 2000 codecs use a significant amount of computer memory, which can lead to slow performance and compression times. The file type works best on computers with lots of RAM.
Xavier
Posts: 1855
Joined: 01 Oct 2019, 11:08

Re: Use of PNGs in After Effects

Post by Xavier »

Jeremy Richard wrote: 09 Apr 2022, 09:57
Xavier wrote: 07 Apr 2022, 11:16 What about WebP ?
It seems that, like PNGs, WebP was made more for single images for the web, as opposed to image sequences. That didn't stop PNGs to be, it seems, widely used for image sequences, so maybe it could be the same for the WebP format. I would imagine that it is not so much the fact that for the same quality WebP is smaller, but if it can handle aspect of frame size or colour depth that PNGs cannot, then maybe WebP could possibly be used as an alternative.

On WebP's Wikipedia page there is a mention of animated images:
Google has proposed using WebP for animated images as an alternative to the popular GIF format, citing the advantages of 24-bit color with transparency, combining frames with lossy and lossless compression in the same animation, and support for seeking to specific frames. Google reports a 64% reduction in file size for images converted from animated GIFs to lossy WebP, however with a very noticeable visual impact, both at default settings, and optimised settings. When converting using lossless WebP, a 19% reduction is achieved as reported by Google, although real world performance is nearer to 10%
Here is someone doing lots of test with WebP images: Is there any benefit to using WebP images on my website?

There is a plugin for Photoshop, to export WebP files. I couldn't find anything for After Effects or Fusion.

--------------------------------------------------------------------------------------------

Regarding recent video codecs, it seems that HEIF and AVIF were made partly with image sequences in mind. They seem to both support alpha channels: AVIF - alpha compression?, HEIF (High Efficiency Image File Format) Reader.

Here are talks of support for both formats in ffmpeg: Here are some encoders/decoders: Here are results of a comparison made between AVIF and WebP:
  • AVIF provides a smaller sized image compared to WebP.
  • WebP works on only 8-bit depth, whereas AVIF supports 8, 10, and 12-bit, which will accept a broader range of images to be compressed.
  • WebP supports only 4:2:0 channel, whereas AVIF supports 4:2:0, 4:2:2, and 4:4:4 channels.
  • The image quality produced by WebP is lower than AVIF and even JPEG.
  • AVIF supports HDR, which produces high luminosity images.
--------------------------------------------------------------------------------------------

The JPEG2000 format, which supports alpha channels, could also maybe be another alternative.

There is a plugin for Photoshop, Premiere and After Effects here to export as JPEG 2000.

Nevertheless, according to Adobe, there are few disadvantages to that format which might restrict its implementation for a wider use:
  • Many web browsers and photo-sharing websites don’t support the JPEG 2000 format. JPEG 2000 is rarely used outside of these niche areas.
  • There’s no backward compatibility with the original JPEG format, so users need to be able to code in a different standard than what most images use.
  • JPEG 2000 codecs use a significant amount of computer memory, which can lead to slow performance and compression times. The file type works best on computers with lots of RAM.
Wow, thanks for the explanation (and the time you spent writing it / comparing formats) !
I'm not very familiar with these new image formats. But I'm not a specialist of animation either.

In my opinion anything, which offers a better compatibility between your workflow tools, would be a plus for TVPaint.
Yet it's not that easy : we have to combine the new software components required to support AV1 and HEVC, with the old code of TVPaint.
Xavier
Posts: 1855
Joined: 01 Oct 2019, 11:08

Re: Use of PNGs in After Effects

Post by Xavier »

Note that After Effects supports HEIF but not AVIF : https://helpx.adobe.com/after-effects/k ... rmats.html
User avatar
Jeremy Richard
Posts: 53
Joined: 16 Oct 2021, 01:44
Contact:

Re: Use of PNGs in After Effects

Post by Jeremy Richard »

The AVIF format seems interesting for at least four reasons: Nevertheless I can't find examples of this format being used in production; used as a lossless format.
A bit regarding broadcasting and Netflix having a go at using AVIF.

As of March 2023: But, maybe, as for final exports from TVPaint (with no compositing or editing needed afterwards) it might still be interesting to consider AVIF for the future, as
--------------------------------------------------------------------------------------------

JPEG XL might be an interesting format for production:
  • It's lossless
  • supports layers and additional channels (like alpha channel)
  • supports 8-bit
  • it's royalty free.
According to the JPEG XL Use Cases and Requirements document, this file format has animated image applications and printing in mind (amongst other things like virtual reality)

Here is the JPEG XL reference implementation.

And here are comparisons with other formats.
User avatar
D.T. Nethery
Posts: 4225
Joined: 27 Sep 2006, 19:19

Re: Use of PNGs in After Effects

Post by D.T. Nethery »

This is very useful information about the various image formats (also including your original post from last year). Thank you.

Animator, TVPaint Beta-Tester, Animation Educator and Consultant.
MacOS 12.7.1 Monterey , Mac Mini (2018) , 3.2 GHz 6-Core Intel Core i7,
16 GB RAM , TVPaint PRO 11.7.1 - 64bit , Wacom Cintiq 21UX 2nd Gen.
,Wacom Intuos Pro 5 , Wacom driver version 6.3.39-1
User avatar
Jeremy Richard
Posts: 53
Joined: 16 Oct 2021, 01:44
Contact:

Re: Use of PNGs in After Effects

Post by Jeremy Richard »

Thank you.

Chris Zwar, who I quoted in the first post of this topic, came back on the subject in a video about the benchmark he did regarding png performances in After Effects.
User avatar
D.T. Nethery
Posts: 4225
Joined: 27 Sep 2006, 19:19

Re: Use of PNGs in After Effects

Post by D.T. Nethery »

Dean wrote: 24 Mar 2022, 13:54 This is some really useful information, I'll talk to the devs about this for sure.
Hi, Dean ,

What was the outcome of your discussion with the developers about adding support for exporting to EXR files from TVPaint to After Effects ?

Animator, TVPaint Beta-Tester, Animation Educator and Consultant.
MacOS 12.7.1 Monterey , Mac Mini (2018) , 3.2 GHz 6-Core Intel Core i7,
16 GB RAM , TVPaint PRO 11.7.1 - 64bit , Wacom Cintiq 21UX 2nd Gen.
,Wacom Intuos Pro 5 , Wacom driver version 6.3.39-1
Post Reply