Feature Preview: Anim Graph

Hello and welcome to the new Flax Facts! Every day makes us closer to the early alpha release. We want to finish all required features and prepare the editor/launcher pipeline for the future distribution. Also just to clear things out: alpha will start soon (late April or first weeks of May) and in the beginning, it will be closed to the public. It means that only a few people will get the access as we want to resolve the early issues and prepare for the larger scale hopefully in future.

We plan to send the invitation links to some dev teams interested in Flax and others who want to try the engine in the current early stage. If you want to participate please send us a quick note (including your name and nickname from Github if used).

Now, let’s dive into the theme of this blog post which is: Anim Graph.

Knight Dance

Animated Models

One of the latest features added to Flax is animation system.
This includes importing and rendering skinned models, skeletal animations and a set of related tools.
We wanted to make it extensible so the way devs implement animations is very customizable.
Some prefer to use root motion while others want to have quick skeleton bones sockets binding to implement the key gameplay features.

That’s why we introduced the Anim Graph. It’s a binary asset that contains a graph made of nodes network (similar to our Materials pipeline). It’s meant to be easy to use and don’t limit the developers. Right now we support sampling animations, performing blending (linear, additive, with skeleton mask), performing various math operation, accessing the graph parameters and editing per bone transformation. Later we plan to add full state machines support, IK. multi-blend, cloth simulation and more. Below you can see some sample screenshots and gif images from the documentation that present the Anim Graph features.

Animation Walk

Anim Graph Parameter Editing

Animation Blending

Minions Army

Performance

In terms of performance, the whole animation system does the pretty good job. After many test cases including hundreds of animated models in real-time, the animation manager update was always under 2ms (thanks to our Profiler which comes handy when testing new features performance). For example when blend node gets the normalized value 0 or 1 then it does not perform any blending and simply passes one of the input though. Also, we upload skinned model bone transformations once per frame or even once every few frames if the animation updates rate is lower for the given object. So there is support LOD for animations which helps with getting better performance. For instance, if Auto mode is specified then Flax will reduce the animated model updates rate based on distance and the visibility.

Another aspect of performance related to animations is keyframes compression and reduction. At this moment we have implemented a quite good optimization which removes unnecessary keyframes from the animation channel curves. Also, the animation editor window shows some useful info about imported animation like duration, channels count and total keyframes count. In future, we want to add a dedicated panel in this editor window to preview the single animation. It would be very useful to debug and check root motion. However, now there are already some useful debugging tools like bones debugging.

Play Animated Model

Future

As you can see Anim Graph is a quite cool feature. It has a big potential to help with animation implementation in games made with Flax. Although there is still a significant amount of features to add so we are aware of it and I hope that before beta release it will be fully featured part of the engine.

Finally, I want to mark that you can check out the documentation and tutorials for the animations system in Flax right now. I think it’s very important to deliver a significant amount of documentation and samples related to the engine features. So here is a link to the page related to animations. Feel free to see it and share your thoughts about this feature.

Have a great time and see you soon! Bye 🙂


Wojciech Figat

Lead Developer

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *