Cannot load ANY .fbx models after upgrading to MonoGame 3.5 (Could not load asset as a non-content file)

Hi. I’ve been using MonoGame for about a year now.

Recently, I needed to get a SkinnedMesh into my game. Using 3.4, none of my imported .fbx models had a SkinnedEffect applied to them (I did set it to be the default effect in the Content Pipeline). Note that I use Blender for my exporting (followed with Autodesk to convert it).

Since it wasn’t working, I decided to upgrade to MonoGame 3.5, but upon doing so this error began showing up for every model I tried to load:

Could not load [model name] as a non-content file

With 3.4, I still got the error, but I eventually overcame it with Autodesk converter (making my FBX’s 2013). That no longer works though. I’ve made sure to import into the pipeline, into Visual Studio, tried every setting, but nothing works!

Here’s the model files (none of them load):
enter link description here

And if it matters, here’s their textures.
enter link description here

Also (don’t know if this is related), I downloaded some FBX viewers, and none of the 64 bit ones seem able to open any .fbx files (I have a 64 bit machine). They just freeze up before rendering anything. However, when I used a 32 bit one, it opened them just fine.

Using .dae models have this problem when one Model contains a face without textures or with default texture… Try to load a models that are you sure don’t contains blanks.

Just for the record, I’ve tried all with 3DSMax 2015 (from Autodesk, the author of FBX plug-in), all work fine.

BUT, with (the old) XNA Model viewer from Charles B. Owen (version 2.10.0.0), only the mod_debug object works, the two other failed to import, one with an exception (lizard), the other (stairs2) with the missing asset error.

IMHO, model importer SHOULD NOT failed if textures are missing, it’s better to ignore it and replace them, if applicable, by dummy plain color texture (like Unity editor or 3DSMax does), as this can be done instead of “moronly” fail.

I’ve downloaded that same viewer, but literally all my models give me this message:

Also, I’ve tried your advice AdrianGarciaM, but no results sorry. I tried giving materials with no textures (just colours), and it didn’t work either :frowning:

I use Visual Studio 2015 Community if that helps. Importing FBX’s has NEVER been easy for me, but now it just seems impossible.

@mgarstenauer - Any suggestions?

1 Like

I don’t mind which format I use by the way. As long as it supports skinned animation I’ll use it. I haven’t been able to import Collada (.dae) either though…

Welcome to game dev, not so funny as people may think in the first place !

One big issue is tool (usually coming from “big” companies) are supposed to be used as they told you to use them, not as you want to use them and even if it doesn’t suit your very own style.
I have encountered myself a great deal of frustrating issues like this one with other tools and games.

One point is you never told about what is your own workflow, which version of tool do you use and what have you done, you wrote:

Autodesk is the company, not the tool, be more specific (tool, version, action(s) done, option(s) chosen).

One step in such case is to get back to the basics (a mere object with the smallest set of options checked, like a cube with only triangulate enabled) then add feature one after another until it fail.
It is possible that your way of doing thing is wrong. There is a skinned effect sample for XNA 4.0 from MS I think, a good start would be to try it with MG 3.5 as-is for any error.

Sorry, what I meant when I said “Autodesk” was “Autodesk FBX Converter”. I’ve attempted to import just a normal cube .fbx with a coloured material applied to it using Blender 2.76b, and I’ve gotten the same error.

You should try to view your models with open3mod. MonoGame uses assimp for model import and open3mod is the official assimp model viewer. If the model is not working open3mod, you need to use another FBX version or other FBX export settings.

I tried to load your FBX files in my own MonoGame model viewer. The texture “tex_floor1.jpg” is missing - but other than that I can load all models.

I can even load the lizard. The mesh loads correctly. I can also visualize the skeleton and the animation. However, the mesh skinning is not working correctly. There is probably a transform on the mesh or skeleton. Or you are using bad export settings. This is something that usually be fixed in Blender. See FBX Export from Blender.

When you get the exception

“Could not load [model name] as a non-content file”

always check the inner exception. The inner exception has more info about the problem.

I tried open3mod. It opens the .fbx’s fine for me too (though I can see the problem with the lizard. I think I know why that happens). I’m not sure where th “inner exception” is with Visual Studio, but I tried basically stripping my Game1.cs so that all it does is attempt to load a single model on startup. This is my screen when that happens:

Here’s the pipeline after a rebuild (it’s giving no errors).

Could it be that it’s an OpenGL project that’s impacting it? Or maybe my content pipeline file thing isn’t being added to the project? Or do I just need to install some drivers?

I’m not sure where the “inner exception” is with Visual Studio

The method Content.Load<Model>(...) throws a ContentLoadException with the message “Could not load [model name] as a non-content file”. The ContentLoadException usually has a property InnerException. When Visual Studio catches the exception, inspect the exception and look for the property InnerException. Check the message of the inner exception. (The inner exception may have another inner exception. Inspect all inner exceptions to find the root cause of the problem.)

Note that I tested with DirectX on Windows. I haven’t tested with OpenGL - so I can’t comment on that.

Ooooooooooooooooh. Hey that’s handy. I’ll be sure to remember that one in future. So if I’m reading this right, it’s something to do with the way the pipeline converts my .FBX to .XNB?

I’d make the project with DirectX, but for some reason it just freezes on the first Draw call (doesn’t even throw exception) on my computer, but that’s another story.

https://github.com/craftworkgames/Samples.Extended/issues/5

I read here that it might be due to an older version mismatch of the Pipeline tool and Monogame because apparently the .xnb format’s changed between the two? I checked my version, and it says 3.5…

So, I tried different project types. Originally, my project was a MonoGame Windows OpenGL, which didn’t load any .FBX’s as you saw. I tried a MonoGame Windows Project, which even the basic template didn’t run (probably something wrong with my computer). Then I tried a MonoGame Cross Platform Desktop Project and…

Any ideas as to why this worked (at least partially) and the rest didn’t?

Now the only problem I have left is that I can’t cast a Model as a ModelExtra for skinned animation, but at least the game is running again!

Using Xamarin Studio Community 6.1.2 here on MacOS with MonoGame 3.5.1, the MonoGame Add-in 3.6.0 and Autodesk’s FBX Converter 2013.

I haven’t been able to get Pipeline.MacOS to build a Content project with any FBX file that has a texture reference in it (i.e.: uses a RelativeFilename attribute to address an external .jpg or .png file). It seems to come up with random folder paths that don’t have any relation to either the texture file, the original ASCII .fbx file nor the exported binary .fbx file. If you use a hex editor (e.g.: Hex Fiend) to examine the .fbx files exported from FBX Converter the RelativeFilename references get converted to a fully qualified fileystem path which suggests that you need to convert the FBX file inside your project’s Content folder, but it still doesn’t work when you try that.

I thought that ticking the “Embed media” option in FBX Converter might have been a workaround, but that seems to have no effect.

In the end I used FBX Converter to convert my .fbk files into .dae format, then I edited the “file://” references in those to use the correct relative path to the texture files (because when exported they contain only the path to the folder containing the texture file). Success, it builds!