Blender to Monogame Animation Distortion

I’m getting weird distortion in my animated model when exported from Blender. It looks like the rotation and maybe the scale of the bones is incorrect. It is animating the wrong direction, and it is animation too far in that direction. All it is, is a simple 2-frame nod animation that rotates the head bone along X. Picture to explain.

These are my export settings.

Has anyone experienced this before? I am using the SkinnedModelProcessor.

Something seems wrong with my bone transforms. I am drawing red spheres at each matrix from GetSkinTransforms(), but the values are very small and are just gathering at what appears to be origin. The bones are the red spheres at the model’s feet.

Edit: My problem was I was scaling on import. Setting it back to 1.00 fixes this.

Hello there!
I don’t really know what can cause that, 3D animations with Monogame is always tricky and I still haven’t fully figured it out myself … yet =P

So, in my case, I am not using the SkinnedModelProcessor (because I tried to make a custom processor) but I can show you the FBX export presets that works for me so you can try them (using Blender 2.79).

If it is a scale problem, I remember that I resolved a problem that annoyed me for days by unchecking the little button “Take into account Blender unit” just on the right of the “Scale” field. I think it kinda bakes the scale in the model or something… Anyway, I hope this will be a bit helpful for you! =)

I never noticed that there was even a button next to scale.

Anyways, turns out it was because I was trying to scale the model on import, which was causing the deformation.

Fine until you have to load a model without the blender file to re-export it properly.

The problem is were the mesh and armature and animation scaling are combined.
Unfortunately this must be detected and handled internally and there is no simple way to detect it as different models may or may not have scaled meshes armatures or none at all and non unit length scaling in the animation frames themselves.

The simple solution though in that case is if you can get at that code do not apply the mesh scaling transform for a bone animated blender fbx model. And do it apply it for a blender mesh animated fbx model without bones. And if a model has both i don’t have a real solution i have a hack that can easily break.

All these model formats are over-complicated garbage made by noobs with no standards.
That’s the real problem. I know this because i don’t consider my self a pro and i can see just how screwed up all these model formats are and how even fbx changed all over the place over time on the basic crap like how the matrices work together. They don’t even have the scaling matrice standardized but they have a flip flop armature and mesh sharing the same responsibiliys in different cases at different versions in different ways. Then it becomes even worse if you load other model formats who also are doing things in screwed up ways. The mesh or root node should hold the scaling period and all the animation nodes scalings should be unit length proportonally but they aren’t.

I have not had any success with the models I have. I tried every format from FBX, to OBJ and everything in between.

GLTF is supposed to be gaining traction… and the new Blender 2.8 exports the GLTF 2.0 format I believe. I gave that a try and still ran into issues. @willmotil I did try your model loader and it didn’t quite work with that either. Since it uses ASSIMP, I assumed all formats supported by ASSIMP would (hopefully) automagically work, but no luck converting to the different formats and trying those either.

I can only wonder how 3D games made with Monogame managed to solve the skinned model loading (and animating) problems. I am lucky to get 1 or 2 models to load and animate correctly.

Ya right now with mine i tested it with blender 2.79 for both mesh animated models and primarily bone weighted mesh animation is what i tested with the most. Exporting to Fbx. So like if you were building your own models in blender from scratch mine will work. (As a starting point as its no were near complete like i still need to rip stuff out and add tons of stuff that is on hold for now.)

For random models i tested dae and fbx work the best under open assest importer the rest no so much.
If you flip on the console and all the bools to true in the importer class at the top. You will get a shit ton of info for any model that will actually load in mine and can see how they all differ. Testing lots of different ones even in the same format you can see just how differently they are all structured its horrible.

Im actually considering writing my own format and model builder or editor directly in monogame.
The only really open and standard format i found was opengenx ogex but assimp wont even load that out of blender so.