RSSAmplifier

Blog

Nicholas Frechette's Blog

nfrechette.github.ioRSS feed ↗85 posts

Latest posts

Christmas came early: ACL 2.1 is out!

After over 30 months of work, the Animation Compression Library has finally reached v2.1 along with an updated v2.1 Unreal Engine plugin . Notable changes in this release include: Added support for bind pose stripping which reduces memory usage by 3-5% on average Added support for loop handling through a looping policy Added support for pre-processing Added automatic compression level selection…

The Animation Compression Library in Unreal Engine 5.3

The very first release of the Animation Compression Library (ACL) Unreal Engine plugin came out in July of 2018 and required custom engine changes. It was a bit rough around the edges. Still, in the releases that followed, despite the integration hurdles, it slowly grew in popularity in games large and small. Two years later, version 1.0 came out with official support of UE 4.25 through the Unreal…

Dominance based error estimation

As I’ve previously written about , the Animation Compression Library measures the error introduced through compression by approximating the skinning deformation typically done with a graphical mesh. To do so, we define a rigid shell around each joint: a sphere. It is a crude approximation, but the method is otherwise very flexible, and any other shape could be used: a box, convex, etc. This rigid…

Manipulating the sampling time for fun and profit

The Animation Compression Library works with uniformly sampled animation clips. For each animated data track, every sample falls at a predictable and regular rate (e.g. 30 samples/frames per second). This is done to keep the decompression code simple and fast: with samples being so regular, they can be packed efficiently, sorted by their timestamp. When we decompress, we simply find the…

Compressing looping animation clips

Animations that loop have a unique property in that the last character pose must exactly match the first, for playback to be seamless as they wrap around. As a result, this means that the repeating first/last pose is redundant. Looping animations are fairly common, and it thus makes sense to try and leverage this in order to reduce the memory footprint. However, there are important caveats with…

Bind pose stripping

A little over three years ago, I wrote about storing animation clips relative to the bind pose in order to improve the compression ratio. In a gist, this stores each clip as an additive onto the base bind pose . This does two things for us: It reduces the range of each sub-track (rotation, translation, scale) which allows more accuracy to be retained (e.g. instead of having the pelvis bone…

ACL 2.0 is hot off the press

After 18 months of work, the Animation Compression Library has finally reached v2.0 along with an updated v2.0 Unreal Engine 4 plugin . Notable changes in this release include: Unified and cleaned up APIs Cleaned up naming convention to match C++ stdlib, boost Introduced streaming database support Decompression profiling now uses Google Benchmark Decompression has been heavily optimized…

Controlling animation quality through streaming

For a few years now, I’ve had ideas on how to leverage streaming to further improve compression with the Animation Compression Library . Thanks to the support of NCSOFT , I’ve been able to try them out and integrate progressive quality streaming for the upcoming 2.0 release next month. Progressive quality streaming is perfectly suited for modern games on high end consoles all the way down to…

Windows Hyper-V woes

This weekend, I noticed that AMD Ryzen Master (a great tool to control your CPU when profiling code performance) and VirtualBox both stopped working for me under Windows 10. I wasn’t too sure how it happened and I spent a good deal of time chasing what went wrong so I am documenting my process and result here in hope that it might help others as well. Why aren’t they working? Over the last few…

Animation clip metadata packing

In my previous blog post , I analyzed over 15000 animations. This offered a number of key insights about what animation data looks like for compression purposes. If you haven’t read it yet, I suggest you do so first as it covers the terminology and basics for this post. I’ll also be using the same datasets as described in the previous post. As mentioned, most clips are fairly short and the…

Animation data in numbers

For a while now, I’ve been meaning to take some time to instrument the Animation Compression Library (aka ACL) and look more in depth at the animations I have. Over the years I’ve had a lot of ideas on what could be improved and good data is critical in deciding where my time is best spent optimizing. I’m not sure if this will be of interest to many people out there but since I went ahead and did…

Zero overhead backward compatibility

The Animation Compression Library finally supports backward compatibility (going forward once 2.0 comes out). I’m really happy with how it turned out so I thought I would write a bit about how the ACL decompression is designed. The API At runtime, decompressing animation data could not be easier: acl :: decompression_context < custom_decompression_settings > context ; context . initialize (…

Realtime Math 2.0 is out, cleaner, and faster!

A lot of work went into this latest release and here is the gist of what changed: Added support for GCC10, clang8, clang9, clang10, VS 2019 clang, and emscripten Added a lot of matrix math Added trigonometric functions (scalar and vector) Angle types have been removed Lots of optimizations and improvements Tons of cleanup to ensure a consistent API It should now contain everything needed by most…

Keep an eye out for buffer security checks

By default, when compiling C++, Visual Studio enables the /GS flag for buffer security checks . In functions that the compiler deems vulnerable to the stack getting overwritten, it adds buffer security checks. To detect if the stack has been tampered with during execution of the function, it first writes a sentinel value past the end of the reserved space the function needs. This sentinel value is…

ACL right in your browser

This week, the first beta release of the Animation Compression Library JavaScript module has been released. You can find it on NPM here and you can try it live in your browser right here by drag and dropping glTF files. The library should be usable but keep in mind until ACL reaches version 2.0 with backwards compatibility you might have to recompress when you upgrade to future versions. The…

Morph target animation compression

The Animation Compression Library v1.3 introduced support for compressing animated floating point tracks but it wasn’t until now that I managed to get around to trying it inside the Unreal Engine 4 Plugin . Scalar tracks are used in various ways from animating the Field Of View to animating Inverse Kinematic blend targets. While they have many practical uses in modern video games, they are most…

ACL 1.3 is out: smaller, better, faster than ever

After 7 months of work, the Animation Compression Library has finally reached v1.3 along with an updated v0.5 Unreal Engine 4 plugin . Notable changes in this release include: Added support for VS2019, GCC 9, clang7, and Xcode 11 Optimized compression and decompression significantly Added support for multiple root bones Added support for scalar track compression Compared to UE 4.23.1 , the ACL…

Realtime Math: faster than ever

Today Realtime Math has finally reached v1.1.0 ! This release brings a lot of good things: Added support for Windows ARM64 Added support for VS2019, GCC9, clang7, and Xcode 11 Added support for Intel FMA and ARM64 FMA Many optimizations, minor fixes, and cleanup I spent a great deal of time optimizing the quaternion arithmetic for NEON and SSE and as a result, many functions are now among the…

Faster floating point arithmetic with Exclusive OR

Today it’s time to talk about another floating point arithmetic trick that sometimes can come in very handy with SSE2. This trick isn’t novel, and I don’t often get to use it but a few days ago inspiration struck me late at night in the middle of a long 3 hour drive. The results inspired this post. I’ll cover three functions that use it for quaternion arithmetic which have already been merged into…

Pitfalls of linear sample reduction: Part 4

A quick recap: animation clips are formed from a set of time series called tracks. Tracks have a fixed number of samples per second and each track has the same length. The Animation Compression Library retains every sample while Unreal Engine uses the popular method of removing samples that can be linearly interpolated from their neighbors. The first post showed how removing samples negates some…

Pitfalls of linear sample reduction: Part 3

A quick recap: animation clips are formed from a set of time series called tracks. Tracks have a fixed number of samples per second and each track has the same length. The Animation Compression Library retains every sample while Unreal Engine uses the popular method of removing samples that can be linearly interpolated from their neighbors. The first post showed how removing samples negates some…

Pitfalls of linear sample reduction: Part 2

A quick recap: animation clips are formed from a set of time series called tracks. Tracks have a fixed number of samples per second and each track has the same length. The Animation Compression Library retains every sample while the most commonly used Unreal Engine codecs use the popular method of removing samples that can be linearly interpolated from their neighbors. The first post showed how…

Pitfalls of linear sample reduction: Part 1

Two years ago I worked with Epic to try to improve the Unreal Engine animation compression codecs. While I managed to significantly improve the compression performance , despite my best intentions, a lot of research, and hard work, some of the ideas I tried failed to improve the decompression speed and memory footprint. In the end their numbers just didn’t add up when working at the scale Fortnite…

Comparing past and present Unreal Engine 4 animation compression

Ever since the Animation Compression Library UE4 Plugin was released in July 2018 , I have been comparing and tracking its progress against Unreal Engine 4.19.2 . For the sake of consistency, even when newer UE versions came out, I did not integrate ACL and measure from scratch. This was convenient and practical since animation compression doesn’t change very often in UE and the numbers remain…

Faster arithmetic by flipping signs

Over the years, I picked up a number of tricks to optimize code. Today I’ll talk about one of them. I first picked it up a few years ago when I was tasked with optimizing the cloth simulation code in Shadow of the Tomb Raider . It had been fine tuned extensively with PowerPC intrinsics for the Xbox 360 but its performance was lacking on XboxOne ( x64 ). While I hoped to talk about it 2 years ago ,…

The Animation Compression Library just got even faster

Slowly but surely, the Animation Compression Library has now reached v1.2 along with an updated v0.3 Unreal Engine 4 plugin . The most notable changes in this release are as follow: More compilers and architectures added to continuous integration Accuracy bug fixes Floating point sample rate support Dramatically faster compression through the introduction of a compression level setting TL;DR:…

Compressing Fortnite Animations

New year, new stats! A few months ago, Epic agreed to let me use their Fortnite animations for my open source research with the Animation Compression Library (ACL) . Following months of work to refactor Unreal Engine 4 in order to natively support animation compression plugins, it has finally entered the review stage on Epic’s end. While I had hoped the changes could make it in time for Unreal…

Introducing Realtime Math v1.0

Almost two years ago now, I began writing the Animation Compression Library . I set out to build it to be production quality which meant I needed a whole lot of optimized math. At the time, I took a look at the landscape of math libraries and I opted to roll out my own. It has served me well, propelling ACL to success with some of the fastest compression and decompression performance in the…

Smaller, faster: ACL lets you cut your animation costs in half

I am excited to announce the open source Animation Compression Library has reached v1.1 along with an updated Unreal Engine 4 plugin v0.2 . ACL now beats Unreal Engine 4 on all the important metrics. The plugin is 1.7x smaller, 3x more accurate, 2.5x faster to compress, and up to 4.8x faster to decompress! What’s new The latest release focused on decompression performance. ACL v1.1 is about 30%…

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…

Animation Compression Library: Release 0.8.0

Today marks the v0.8 release of the Animation Compression Library . It contains lots of goodies but by far the most significant point is the fact that it has now reached feature parity with Unreal 4 . For the first time Unreal 4 games should be able to run exclusively with ACL . The focus for the next 2 months will be to validate this with my custom UE 4.15 integration and implement whatever might…

ACL decompression performance

At long last I finally got around to measuring the decompression performance of ACL. This blog post will detail the baseline performance from which we will measure future progress. As I have previously mentioned , no effort has been made so far to optimize the decompression and I hope to remedy that following the v1.0 release scheduled around June 2018. In order to establish a reliable data set to…

How much does additive bind pose help?

A common trick when compressing an animation clip is to store it relative to the bind pose. The conventional wisdom is that this allows to reduce the range of motion of many bones, increasing the accuracy and the likelihood that constant bones will turn into the identity, and thus allowing a lower memory footprint as a result. I have implemented this specific feature many times in the past and the…

Animation Compression Library: Release 0.7.0

Almost a year ago, I began working on ACL and it is now one step closer to being production ready with the new v0.7 release ! This new release is significant for several reasons but two stand out above all others: Exhaustive automated testing Full multi-platform support Unlike previous releases, the performance remained unchanged since v0.6 but I went ahead and updated the stats and graphs…

Animation Compression Library: Release 0.6.0

Hot off the press, ACL v0.6 has just been released and contains lots of great things ! This release focused primarily on extending the platform support as well as improving the accuracy. Proper Linux and OS X support was added as well as the x86 architecture. As always, the list of supported platforms is in the readme . This was made possible thanks to continuous build integration which has been…

Arithmetic Accuracy and Performance

As I mentioned in my previous post , ACL still suffers from some less then ideal accuracy in some exotic situations. Since the next release will have a strong focus on fixing this, I wanted to investigate using float64 and fixed point arithmetic . It is general knowledge that float32 arithmetic incurs rounding and can lead to severe accuracy loss in some cases. The question I hoped to answer was…

Animation Compression Library: Paragon Results

While working for Epic to improve Unreal 4’s own animation compression and decompression, I asked for permission to use the Paragon animations for research purposes and they generously agreed. Today I have the pleasure to report the findings from that new data set! This is significant for two reasons: It allows for extensive stress testing with new data Paragon is a real game with high animation…

Animation Compression Library: Release 0.5.0

Today marks the release of ACL v0.5 . Once again, lots of great things were included in this release but three things stand out: Full 3D scale support Android support (tested within Unreal Engine 4.15) A fix to the variable quantization optimization algorithm The third point in particular needs explaining. Initially, I did not intend to make significant changes in this release to the way…

Animation Compression Library: Unreal 4 Integration

As mentioned in my previous post , I started working on integrating ACL into Unreal 4.15 locally. Today I can finally confirm that not only does it work but it rocks! Matinee fight scene In order to stress test ACL in a real game engine with real content, I set out to test it on the Matinee fight scene that can be found on the Unreal 4 Marketplace. ACL in action This is a very complex sequence…

Animation Compression Library: Release 0.4.0

This marks the fourth release of ACL. It contains a lot of good stuff but most notable is the addition of segmenting support . I have not had the chance to play with the settings much yet but using segments of 16 key frames reduces the memory footprint by about 13% with variable quantization under uniform sampling. Adding range reduction on top of it (per segment), further reduces the memory…

Math accuracy: Normalizing quaternions

While investigating precision issues with ACL , I ran into two problems that I hadn’t seen documented elsewhere and that slightly surprised me. Dot product Calculating the dot product between two vectors is a very common operation used for all sorts of things. In an animation compression library, it’s primary use is normalizing quaternions . Due to the nature of the code, accuracy is very…

Animation Compression Library: Release 0.3.0

This release marks an important milestone. It now supports a fully variable bit rate and it performs admirably so far. The numbers don’t lie. Without using any form of key reduction, we match the compression ratio of Unreal 4 (which uses a mix of linear key reduction with a form of variable quantization ) and many more tricks will follow to push this even further. It is worth noting that this new…

Introducing ACL

Over the years, I’ve had my fare share of discussions about animation compression and two things became obvious over time: we were all (re-)doing similar things and none of us had access to a state of art implementation to compare against. This lead to rampant speculation about which algorithm was superior or inferior. Having implemented a few algorithms in the past, I have finally decided to redo…

Optimizing 4x4 matrix multiplication

In modern video games, the 4x4 matrix multiplication is an important cornerstone. It is used for a very long list of things: moving individual character joints, physics simulation, rendering, etc. To generate a single video game image (and we typically generate between 25 and 60 per second), several thousand matrix multiplications will take place. Today, we will take an in-depth look at such a…

Modern SIMD Programming in the SSE Era

For a very long time now with every new gaming console generation came a new set of hardware. New hardware meant new constraints which meant we had to revisit old optimization tricks, rules, and popular beliefs. With the latest generation, both leading consoles ( Xbox One and PlayStation 4 ) have opted for x64 and AMD CPUs . These are indeed significantly different from the old PowerPC CPUs used…

Animation Compression: Advanced Quantization

I first spoke about this technique at the Game Developers Conference (GDC) in 2017 and the slides for that presentation can be found here . The idea is to take everything that is good about simple quantization and super charge it. Since simple quantization is generally a foundation for the other algorithms , this new variant can be used just as well for the same purpose. It is worth noting that…

Animation Compression: GDC 2017 Presentation

In early 2016 I had the opportunity to write a novel animation compression algorithm for Eidos Montreal as part of the game engine previously used by Rise of the Tomb Raider (2015) . Later in February 2017, I had the pleasure to present it at the Game Developers Conference (GDC) . The slides for the presentation can be found here and a blog post detailing the technique can be found here . Back to…

Animation Compression: Unity 5

Unity 5 is a very popular video game engine on mobile devices and other platforms. Being a state of the art game engine, it supports everything you might need when it comes to character animation including compression. The relevant FBX Importer and Animation Clip documentation is very sparse. It’s worth mentioning that Unity 5 is a closed source software and as such, there is some amount of…

Animation Compression: Unreal 4

Unreal 4 offers a wide range of documented character animation compression settings. It offers the following compression algorithms: Least Destructive Remove Every Second Key Remove Trivial Keys Bitwise Compress Only Remove Linear Keys Compress each track independently Automatic Note: The following review was done with Unreal 4.15 Least Destructive Reverts any animation compression, restoring the…

Animation Compression: Case Studies

In order to keep the material concrete, we will take a deeper look at some popular video game engines. We will highlight the techniques that they use for character animation compression and where they shine or come short. Unreal 4 Unity 5 Up next: Unreal 4 Back to table of contents