MGCB Barfs on fbx file

I’m using the excellent tutorial by RB Whitaker on 3D models here: Using 3D Models - RB Whitaker's Wiki

He suggests using any of the models from here: Model Library - RB Whitaker's Wiki

But using the SimpleShip model causes MGCB to error out. In fact, it errors on any of his models that use the .fbx format. It gives me this error:

I looked at the .fbx in Notepad++, but it’s mostly hex. I did find a hardcoded path for the texture, but putting the texture there didn’t solve the issue. As you can see from the error, it doesn’t complain about that. It’s looking for an impossible-to-create folder, *0.

For the time being, all my assets are in the base Content folder. I’m using Version 3.8.0.1641 of MGCB. Does anyone know how to solve this?

The .fbx importer is broken. You can import it using the .obj importer instead. It’s weird I know but it works.

Do you mean just File | Import (menus)? That causes MGCB to crash for me. If you mean something else, I’d appreciate any elaboration. Thanks!

Use the FBX Converter from Autodesk to convert it to ascii format.
Then you can edit and see what’s going on and edit it.
Or you can try to open it and export it from a 3rd party modeler.

@Synammon I think it’s the other way around. The FBX importer is the one that works for all types of models.

I could easily have it backwards but I thought it was the OBJ works for FBX because I had a similar problem with those tutorials and the models. It was a while ago and I might have it mixed up because I don’t use it that often.

@nkast I’m fairly certain I’d have no idea what’s wrong with the model by looking at it in ASCII. And, like I said, all the FBX models on that page fail to build with the MGCB. So I’m more inclined to believe there’s something wrong with the MGCB and FBX.

Would the FBX Converter allow me to convert it to a format the MGCB works with? Looking at the tool’s download page, it looks like the latest version was for Windows 7. I assume it’d work with W10 as well, but sound kind of old.

Still unclear on the “Importer” stuff. I’ve just been adding content via the Content, right-click, Add → Existing item… method. I also used the File | Import from the menus, but like I said, adding it that way crashed MGCB.

Is there a newer version of MGCB? I’m using version 3.8.0.1641.

I’m just trying to get a grasp on this stuff. So far, MonoGame’s the best game engine I’ve encountered that fits my groove!

UPDATE:
I used the FBX Converter to export it as an .obj file. It imports fine and MGCB seems happy with it, and it builds without any errors. But the game crashes when I try to use it. I’m not doing anything different:
_model = Content.Load<Model>( "Ship" );

That same line works with ship2, which is an .x file.

UPDATE 2:
With the converter, I tried exporting it to another fbx format, and the tool was happy with that. It put the texture in a different folder, however, but I can live with that.

Questions:

  • Is MGCB required for assets for MonoGame?
  • Is work in progress to fix the MGCB, or is MonoGame an end-of-life project?

An 8 month old thread… but I will still respond, in case someone else came here with the same problem, and looking for a solution.

No. You do not need MGCB.
You can actually ‘Add Existing Files’ to the solution explore in generally the same way. They don’t require converting.
If you want to use MGCB though, you can convert your fbx to a DirectX (.x) file.
MGCB will use the ximporter, and it should work.
It works in game also… at least for me.

What was quite surprising to me though, is that I started with an fbx 7.84 MB file, and ended up with an xnb 494 KB.
I was just doing a test though, so I didn’t include the textures, but that’s still a significant reduction.
In that case, I will be converting all my models to .x.

Hope someone can still use this… 8 month later. :grinning_face_with_smiling_eyes:

1 Like