Animation Compression Library: Release 1.0.0

The long awaited ACL v1.0 release is finally here! And it comes with the brand new Unreal Engine 4 plugin v0.1! It took over 15 months of late nights, days off, and weekends to reach this point and I couldn’t be more pleased with the results.

Recap

The core idea behind ACL was to explore a different way to perform animation compression, one that departed from classic methods. Unlike the vast majority of algorithms in the wild, it uses bit aligned values as opposed to naturally aligned integers. This is slower to unpack but I hoped to compensate by not performing any sort of key reduction. By retaining every sample, the data is uniform in memory and offsets are trivially calculated, keeping things fast, the memory touched contiguous, and the hardware happy. While the technique itself isn’t novel and is often used with compression algorithms in other fields, to my knowledge it had never been tried to the extent ACL pushes it with animation compression, at least not publicly.

Very early, the technique proved competitive and over time it emerged as a superior alternative over traditional techniques involving key reduction. I then spent about 8 months writing the necessary infrastructure to make ACL not only production ready but production quality: unit tests were written, extensive regression tests were introduced, documentation was added as well as comments, scripts to replicate the results, cross platform support (ACL now runs on every platform!), etc. All that good stuff that one would expect from a professional product.

But don’t take my word for it! Check out the 100% C++ code (MIT license), the statistics below, and take the plugin out for a spin!

Performance

While ACL provides various synthetic test hardnesses to benchmark and extract statistics, nothing beats running it within a real game engine. This is where the UE4 plugin comes in and really shines. Just as with ACL, three data sets are measured: CMU, Paragon, and the Matinee fight scene.

Note that there are small differences between measuring with the UE4 plugin and with the ACL test harnesses due to implementation choices in the plugin.

Carnegie-Mellon University (CMU)

ACL Plugin v0.1.0 UE v4.19.2 Compressed size 70.60 MB 99.94 MB Compression ratio 20.25 : 1 14.30 : 1 Max error 0.0722 cm 0.0996 cm Compression time 34m 30.51s 1h 27m 40.15s

ACL was smaller for 2532 clips (99.92 %)

ACL was more accurate for 2486 clips (98.11 %)

ACL has faster compression for 2534 clips (100.00 %)

ACL was smaller, better, and faster for 2484 clips (98.03 %)

Would the ACL Plugin have been included in the Automatic Compression permutations tried, it would have won for 2534 clips (100.00 %)

Data tracked here by the plugin, and here by ACL.

Paragon

ACL Plugin v0.1.0 UE v4.19.2 Compressed size 226.02 MB 392.97 MB Compression ratio 18.92 : 1 10.88 : 1 Max error 0.8566 cm 0.6424 cm Compression time 6h 35m 03.24s 15h 10m 23.56s

ACL was smaller for 6413 clips (97.79 %)

ACL was more accurate for 4972 clips (75.82 %)

ACL has faster compression for 5948 clips (90.70 %)

ACL was smaller, better, and faster for 4499 clips (68.60 %)

Would the ACL Plugin have been included in the Automatic Compression permutations tried, it would have won for 6098 clips (92.99 %)

Data tracked here by the plugin, and here by ACL.

Matinee fight scene

ACL Plugin v0.1.0 UE v4.19.2 Compressed size 8.67 MB 23.67 MB Compression ratio 7.20 : 1 2.63 : 1 Max error 0.0674 cm 0.0672 cm Compression time 52.44s 54m 03.18s

ACL was smaller for 1 clip (20 %)

ACL was more accurate for 4 clips (80 %)

ACL has faster compression for 5 clips (100 %)

ACL was smaller, better, and faster for 0 clip (0 %)

Would the ACL Plugin have been included in the Automatic Compression permutations tried, it would have won for 3 clips (60 %)

Data tracked here by the plugin, and here by ACL.

Decompression performance

Data tracked here by the plugin, and here by ACL (they also include other platforms and more data).

Performance summary

As the numbers clearly show, ACL beats UE4 across every compression metric, sometimes by a significant margin: it is MUCH faster to compress, the quality is just as good, and the memory footprint is significantly reduced. ACL achieves all of this with default settings that animators rarely if ever need to tweak. What’s not to love?

However, the ACL decompression performance is sometimes ahead, sometimes behind, or the same. There are a few reasons for this, most of which I am hoping to fix in the next version to take the lead: NEON (SIMD) is not yet used on ARM, the ACL plugin needlessly performs MUCH more work than UE4 when decompressing, and many low hanging fruits were left to be fixed post-1.0 release.

ACL is just getting started!

How to use the ACL Plugin

As the documentation states here, a few minor engine changes are required in order to support the ACL plugin. These changes mostly consist of bug fixes and changes to expose the necessary hooks to plugins.

For the time being, the plugin is not yet on the marketplace as it is not fully plug-and-play. However, this summer I am working with Epic to introduce the necessary changes in order to publish the ACL plugin on the marketplace. Stay tuned!

Note that the ACL Plugin will reach v1.0 once it can be published on the marketplace but it is production ready regardless.

What’s new in ACL v1.0

Few things actually changed in between v0.8 and v1.0. Most of the changes revolved around minor additions, documentation updates, etc. There are two notable changes:

The first is visible in the decompression graphs: we now yield the thread before measuring every sample. This helps ensure more stable results by reducing the likelihood that the kernel will swap out the thread and interrupt it while executing the decompression code.

The second is visible in the compression stats for Paragon: a bug was causing the visible error to sometimes be partially hidden when 3D scale is present. While the new version is not less accurate than the previous, the measured error can be higher in very rare cases (only 1 clip is higher).

Regardless, the measuring should now be much more stable.

What’s next

The next release of ACL will focus on improving the compression and decompression performance. While ACL was built from the ground up to be fast to decompress; so far the focus has been on making sure things function properly and safely to establish a solid baseline to work with. Now that this work is done, the fun part can begin: making it the best it can be! I have many improvements planned and while some of them will make it in v1.1, others will have to wait for future versions.

Special care will be taken to make sure ACL performs at its best in UE4 but there is no reason why it couldn’t be used in your own favorite game engine or animation middleware. Developing with UE4 is easier for me in large part because of my past experience with it, my relationship with Epic, and the fact that it is open source. Other game engines like Unity explicitly forbid their use for benchmarking purposes in their EULA which prevents me from publishing any results without prior written agreement form their legal departement. Furthermore, without access to the source code, creating a plugin for it requires a lot more work. In due time, I hope to support Unity, Godot, and anyone else willing to try it out.

Please enable JavaScript to view the comments powered by Disqus.