Animation Hierarchy (Single files per animation vs. animations grouped into files)

So I am curious what will be best for a project that will have a LARGE number of animations across many character types.

Would Unity prefer/be more optimized, to have each animation as a single file, or to have animations grouped into files by category.

For example lets say we have attacks, should each attack animation (swing, thrust, strike, etc) be broken into individual files, or would it be more efficient to group them all into a single file with time markers and break them up that way?

^ to the top she goes.

I’m not sure I follow 100% but I’ll try to answer. Unity brakes up the animations into time files no matter how you do it. The Split Animation vs @Animation should make very little difference on performance. When you take a single file in and use the Split Animation technique you are still carving that single file in to multiple smaller files that reference back to the larger.

In short:
Split animation: May offer you slightly smaller file sizes when packaging and shipping but the animations are required to return to the file and then extract animation data from a defined set of frames, which will require some computing power.

@animation: Will be slighter larger in size due to each file containing the animated bones, however because the files only contain one animation each this should in turn offer a quicker processing time when retrieving the animation information.

It would probably be wisest to load in either one or two master files containing all the animations, so it can be loaded into memory and processed whenever needed. Or just split them into individual animations so they can be loaded individually when needed.

Making Animation files for, Attack, Platforming, Basics, Magics separate files seems almost counter productive, and I would assume will ultimately make little difference.

I’m no expert on how Unity processes animations from files to rig/mesh at run time, so this is just a best guess.

Mixamo,

That was a much better response then you might think.

Cheers,

Ben

From a workflow point of view @animation files are easier to work with because you only have to reimport that animation if it changes. Splitting them is a hassle because you have to go through and specify all the frames.

Also, from a reusability point of view, if you want to apply a separate @animation to a different mesh (that has the same rig), all you have to do is duplicate the animation file and rename it to point to the new model. Magically it will now be usable on the other model.

In our experience, splitting is more useful if you want a subset of a particular animation, such as just having your character wave with one hand, if a longer animation has them waving first with one hand and then another. @animation is more useful when the animations are really different and aren’t really part of the same sequence (walking vs running)