Robust method to import skinned fbx models?

I am looking for a better way to import skinned fbx models into MonoGame. I have followed the XNA SkinnedMesh example that has been talked about here, and I can load the “Dude” model through the content pipeline. It seems like this only works for very specific versions and/or styles of skinned models. It doesn’t seem to work with the latest Blender at all. Is there a better solution? Three things I am considering:
a. Trying to fiddle with all of my fbx models to get them into a format that works with my existing code.
b. Looking at some of the other skinned mesh packages for MonoGame. BetterSkinnedMesh?
c. Using the UkooLabs.FbxSharpie package to load the model and then writing my own code to put the animations in the proper format for MonoGame.
Has anyone tried any of these options before? I don’t want to duplicate effort.

Autodesk have a free FBX converter that handles batch conversion.

I just use that rather than spending ages messing with code.

If I ever get to the point where this fails, I will be joining you looking for an alternative.

Stainless - Thanks for the suggestion. I’ll try the Autodesk converter for now. I feel like MonoGame is being held back by this issue. If we could drag-n-drop animated 3D models into our games it would make MonoGame awesome.

@Matt_Dean I gave up trying to get FBX’s to work correctly. I would consider switching to GLTF. Blender supports exporting GLTF 2.0, and VPenades put together a decent loader which seems to work well with Monogame. He has a Monogame example / sample somewhere as well on github.

If you just want something that works with FBX files from Blender, try following my post on Aether.Extras. There is also a video example for modeling, texturing, rigging, and animating in Blender, specifically for use in MonoGame

Here is his monogame example.

Your better off converting fbx to gltf if you use it. Their is more then one.

The big problem with this is it doesn’t have a pbr shader and you cant really use a custom shader also you can’t of course use other types of models like fbx.

Though alot can be manually hacked in but its a lot of work and pbr iss doable with dx9 however not with basic effect which is what his app is sort of forcing.

On the flip side the fbx batch converter doesn’t work on every model.

The problem is that assimp is used to load fbx under the hood for the pipeline and assimp has a lot of settings to tweek models when importing that can’t be accessed thru the pipeline, which those settings are needed to tweek load certain models.
Nkasts ather model loader is one option here there are a couple others around as well.

Going the third route is what i did and made my own model class and model loader thru the assimp nuget.
Assimp’s .net nugets support for gltf is also not very good yet either.
I have been working on a separate model loader and pbr shader of my own on an off (stuck on that really) for some time but its no were in a ready state.

That’s awesome that you’re adding pbr shader stuff to it. Your FBX code seems to handle anything I throw at it which is amazing. In a way, I can’t wait to finish my current project and get back into the animation programming and shader stuff. ;p

I wanted to say thanks to everyone who replied to this thread. It was nice having some guidance.

I ended up using the vpenades/SharpGLTF library for my skinned models. I chose that over the “.fbx” solutions because I liked the idea of an open file format. I am also not sure how much AutoDesk intends to support the “.fbx” format in the future.

The overall process was quite simple. I loaded each of my skinned models into Blender and saved them as “.glb” files. I then included them in my project as “content”. The vpenades/SharpGLTF library took care of the rest. I hadn’t planned on any custom shaders for this project, so that wasn’t a deal breaker for me.

I should also mention that I didn’t stop using the MonoGame Pipeline Tool entirely. I still use it for everything except skinned models: sound effects, fonts, static models, etc.

1 Like

Ya i didn’t post the new version up on github because it’s just missing so much still in relation to gltf and a lot of it is hacked in to let it work with pbr (which my shader isn’t working right yet, pbr is pretty complicated to get working a lot of stuff needed to support it is missing as well in monogame and assimp .net).
GLTF is heavily linked to Pbr techniques as seen by their example model page of which i only have about half of them even working with hack arounds.