Conceptual question about loading animated 3D models

Hello all,

I have a conceptual question about animated models. While my project is in OpenGL 4.5, this question is not really specific to OpenGL but I believe this is a good place to ask.

I have already implemented animated models in my engine, and it works reasonably well (“works” being broadly defined as “they load, it interpolates between keyframes and the model doesn’t turn into spaghetti the instant you apply the bone matrices”). My implementation loads the models using Assimp.NET.

Unfortunately, I am not at all experienced when it comes to creating 3D models (I made an OK looking end table in Blender once, that’s about it), so I have to rely on free ones I can find on various websites like turbosquid. I have been working with a little minotaur model I found online that has animations; it’s been a while but I think it may have come from a tutorial site.

However, said model contains multiple FBX files - Each one appears to be a copy of the entire model (~50MB) with a single animation. If I point my model loader at one of them, it works - But it only has the one animation.


So my question is, am I fundamentally misunderstanding something here? Am I pointing my model loader at the wrong file? There is a mesh folder with a Mesh.FBX file, but if I point my loader at that file Assimp doesn’t see any animations at all. I was thinking that I might need to make my model loader loop through a list of files and pick out the animations from each while only keeping the meshes from one - But that seems quite unusual, especially the implications of loading a whole list of 50MB files for a single model, and the few other free animated models I’ve been able to find that Assimp will load don’t seem to be structured that way, but none of those so far had multiple animations. Is this a common thing with animated models that I’m not aware of, or did I just end up with a weird sample model?

Additionally, any recommendations on where I might have better luck finding animated models to work with are welcome - Theme doesn’t matter here; anything I can use to test out my code is good.

I’m no FBX expert (or a n00b either, really). But websearching around, it sounds like there isn’t one standard with FBX for storing skin meshes along with multiple animations rigged to the same joint skeleton. While you can have single or multiple animations in a single FBX file, apparently the former is most common. In fact, it sounds like sometimes an exporter will jam all of the animations end-to-end into a single monster animation clip and write that out to the FBX with that one monster clip.

Thanks for the explanation, that makes sense - There also seem to be a couple FBX versions in use, and Assimp doesn’t support the older versions that appear to be common on the sites I’ve tried.

To be clear, I’m not sticking with FBX for any particular reason; just trying to test out my engine with whatever assets I can find. I am not at all experienced with the world of 3D models and animation so if there is a format that is commonly used/works well for models with multiple animations that I should keep an eye out for, I’m open to suggestions.

But websearching around, it sounds like there isn’t one standard with FBX for storing skin meshes along with multiple animations rigged to the same joint skeleton

As I was reading this, one other question came to mind - My code is written with the assumption that if a model has multiple animations, they would all apply to the same skeleton. Your wording there made me think that assumption may be wrong, and after a bit of searching it seems that at least some formats allow multiple skeletons to be used with the same mesh: for instance, using one skeleton for run and walk animations and a more complex skeleton for finer animations. Is that common, or common enough to be worth supporting in an engine intended for pretty basic 3D games?

I went with “morph targets” when coding for the iphone

Well, that’s certainly an interesting alternative to skeletal animation (and one I hadn’t heard of). Can I ask if you were using premade models, or did you need to do your own modeling to work with morph target animation?

I spent a few years in the game industry as an artist, So I can rig, bone, animate, and even apply mo-cap to models(I’m not bragging, I was pretty bad it by todays standards). But I have it on good word morphing is practical. Just beware of how far apart you tween keydata over time and space, because without bones your stuck with linear interpolation.

If your just looking for data sets to work out the tech, I would suggest 3d phonemes.

In 3DSMax there is a snapshot feature, which creates a mesh every nth keyframe, I’ve used that for run animations and such.

Some arguments against a purely morph technique, would be if you want real-time Inverse Kinematics interacting with the enviroment, or have a very dense mesh of 5,000+ verts(you should experiment).

It should be noted that these days, 5,000 vertices would not be considered “very dense” for even middle-end graphical applications.

Also, what prevents you from doing your own format ? You can have a tool that can load several FBX, and outputs a single file, which contains a single mesh, plus all the bones animations.

Yes, what you said. That is if you have multiple animations for a single skin mesh, they are all rigged to the same joint skeleton.

In general, you could have N skin meshes and M animations all rigged to the same joint skeleton. With that, any of the N skin meshes could be animated with any of the M animations, because they are all rigged to the same skeleton.

That’s interesting. I guess there’s really nothing stopping you from rigging a single skin mesh to 2 or more joint skeletons. With that you could animate the skin mesh with any animation defined for any of those skeletons. Not sure how common that is. It seems like needless trouble to me, but I’m not a guru in the field of skeletal character animation.

I actually do have my own format, but it’s mostly a holdover from before I implemented loading with Assimp - It loads faces/indices from a JSON format making use of the .NET JSON serializer and a couple custom converters, then calculates tangents and throws everything in VAOs. But it seemed like reinventing the wheel to add animation to it when I have mature formats that my model loader supports… Plus at this point my understanding of 3D animation is cursory at best, hence this thread :slight_smile:

these days … vulkan, metal, or direct x.