3D model format nightmare
Members - Reputation: 144
Posted 14 June 2012 - 10:40 PM
I have an artist who is providing me 3D content that I then need to import into my custom video game engine (screenshot bellow). The engine is writting in C, uses OpenGL and has all the bells and whistles modern games have.
I went ahead and implemented support for the Doom 3 model format (*.md5mesh and *.md5anim) because I have had experience with it in the past. But, it seems to be a relatively dead format because no matter what I try there seems to be no way to get the models from Maya to the MD5 format my engine supports (short of writing my own converter, which takes time and money, both of which nobody has enough of ). I can't seem to find documentation, source code, or anything that would provide me with alternative formats, exporters, or model loading libraries that would solve this problem.
(very) long story short, this is where you guys come in. I am looking for some way to get a model from Maya into my game with minimal effort. Should I be using a different format? Is there a C library capable of loading common formats? If I could just plop in "X" library that loads/animates/etc a model format Maya can export too, I would be extatic. (keeping in mind it needs to support skeletal animation)
I'd also go for a good code reference if someone can point me in the right direction. Regardless, I appreciate any help in the area!
Moderators - Reputation: 46517
Posted 14 June 2012 - 10:52 PM
Edited by Hodgman, 14 June 2012 - 11:04 PM.
Crossbones+ - Reputation: 12537
Posted 14 June 2012 - 11:15 PM
Have you tried the exporter script from here ?
But, it seems to be a relatively dead format because no matter what I try there seems to be no way to get the models from Maya to the MD5 format my engine supports
Members - Reputation: 1119
Posted 15 June 2012 - 02:36 AM
I dont know about Maya but blender has an exelent python interface that export scripts can use to export the models. You can have a basic exporter running in no time. It only takes a little more time when it comes to exporting animations and vertex weights etc etc.
Another big advantage of writing your own exporter is that you can change the format as you want to as your engine grows. Nothing is forcing you to strictly stick to the doom format afterall. But then again for the long term benifit I would just recomend you define your own format alltogether . Dont think many people where will agree with me on that but it realy paid of for me personaly.
Edited by Wilhelm van Huyssteen, 15 June 2012 - 02:53 AM.
Members - Reputation: 120
Posted 15 June 2012 - 02:48 AM
You can reduce space y not including things you don't need or can generate on the fly.
You don't need to wrap your head around some other format.
You don't need to rely on code someone else wrote which may or may not work properly.
There are downsides, but I'd say those don't outweigh the benefits. Of course, the other benefit is that it's even harder for someone to mess with your assets (assuming you're releasing as a commercial game). It's certainly not impossible to map someone's custom object format, but it's certainly harder than when your assets are in a well known format (this does make modding harder though).
http://www.gamedev.net/page/resources/_/technical/apis-and-tools/how-to-write-a-simple-maya-model-exporter-r1906 might be useful.