Monogame for 3D

Hi all,
I just recently discovered that 3.8 was released. Currently I am dabbling with C++ and OpenGL to create a 3d engine for a small game. However doing it with C# and then even being able to publish to consoles theoretically makes Monogame very interesting. I wanted to ask how good the 3d support in Monogame currently is? Are there still problems to load fbx files?
Generally I am interested in learning to create an engine and graphics programming, that’s why I am not using UE4 or Unity. The game I am thinking of is something like Syndicate Wars, or Populous the beginning, or Homeworld. But of course smaller in scope than these examples. Or maybe something along the line of Equilinox (www.equilinox.com/). Also, as I for sure will need a lot of time to do this, do you think monogame is futureproof, or would you advise to go the C++ route and using OpenGL, DirectX or Vulkan? What is everybody experiences using Monogame for 3D games? Are there any published 3d games?

2 Likes

I am currently writing an engine using MonoGame on my Patreon channel.

What aspects of 3D do you think MonoGame woukd be lacking??

I suppose the question is, how long will MG sit on D3D11 and how long will D3D11 be around for?

[I honestly don’t care about OGL right now]

EDIT

I likey PopTheBeg, keep us posted!

3 Likes

Actually, one of the reasons I moved from raw C++ DirectX/OpenGL to Monogame, was that if something changes with DX or Ogl, I can easily use the same source code with monogame as it is upgraded. This way if something drastic changes with DirectX, for example, I don’t have to rewrite a ton of code (which happened to me a couple times before with DX).

For 3D support, basically anything you could do with Ogl or Dx, you can do using monogame. One difference (so far) is that normally there are a few shader types(like goemetry shaders) which aren’t supported via fx files[not yet - I believe it’s because they want to maximize Ogl cross platform situation so using shader lev 3] – however you can still compile DX HLSL geometry shader (or any shader type) files to CSO files (compiled shader object) and use those directly for windows compatible projects (uses sharpdx refs - and I made a video tutorial about how to do it if you need that).

I’ve not had problems with FBX files so far other than some animated skinned ones which required a few tricks to make them work after exporting (ie: bone limit is normally 72, some exporters don’t export animated-FBX the same way and so file needs to be tweaked a bit after, parenting objects to other objects can have unexpected results so adding skin influence to all objects is needed, skin consolidation should be used for multi-skins) - I made a couple video tutorials on how to do this and how to boost bone count to whatever you need.
Here, I made a 180 bone version based on monogame’s 72 bone version. Some parts of the video, I’m just tweaking the character - you can proly skip ahead if you do decide to check it out.

When I get time I may post another way to do animated FBX which will be a lot more robust and convenient (based on wilmotil’s code). This other FBX loader/animator worked on everything I tried directly from export (even multiple attached skinned meshes) and currently does animation blending and normal mapping - could add more - I think wilmotil might be doing some PBR stuff for it too.
I believe a couple other guys here (cosmo & charles) are also or have also done some PBR - so yah, monogame’s pretty much limited only to what it’s attached to (ie: DX/Ogl). And it looks like it’s being upgraded for new API’s right now.

1 Like

“Generally I am interested in learning to create an engine and graphics programming, that’s why I am not using UE4 or Unity.”

Then MonoGame is right for you dude! it’s a framework that can easily extend, the only limitation is our imaginations, skills and time : )

I’m pretty sure games like equilinox can handle MonoGame given a full time development ^_^y

1 Like

Thanks a lot for all the replies! So it seems Monogame is working well for 3d. However I have a few more questions:
Should I be using the Mongame DX or OGL template when developing on windows desktop? Is one more feature complete than the other?
I can use for both HLSL shaders, correct? So any DX11 book, like Frank Luna’s, would be applicable?

Just to clarify, do you mean Windows Desktop or Windows 10 UWP? If only either of them, then go with DX for both, the latter is DX Only.

I have his book too, but there is very little considering the size, on shaders in it… Or maybe I am reading it wrong…

The NVIDIA GPU GEMS are free now by the way…

1 Like

Ya, Fx files use HLSL style for everything [altho there may be some minor details to keep in mind]. I usually use OGL template so I can target linux & windows (etc). If you’re looking to use advanced HLSL shader types using CSO’s, you’ll need one of the windows type projects. Hopefully someone here will fill in more detail if I’m missing something.
Now I wanna go look at some gpu gems. ;p

You can also just use both at the same time if you add both to a solution and a project for the shared code.

You can use the MonoGame Kickstarter script I have on Github if you like. You can find it here

And here is a showcase thread where you find demo videos of how to use it