3D model format nightmare

Started by
4 comments, last by Conoktra 11 years, 10 months ago
... Someone please wake me :(.

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 :P). 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!

Thanks.
Advertisement
A common answer I've seen lately is - export as FBX or COLLADA(DAE), and then import with the assimp library. There's also a lot of threads on here asking "how do I use assimp to load fbx/dae?", so good luck happy.png

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

Have you tried the exporter script from here ?
I would recomend you write your own export scripts... Theres so many things that can go wrong when using other peoples dodgy conversion scripts. And when you add skeletal animation to the mix it all goes to hell.

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 :D. Dont think many people where will agree with me on that but it realy paid of for me personaly.
There are quite a few benefits to writing your own format.

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.
Thanks all, I appreciate the help. Sounds like I need to buckle down and just write a exporter or converter myself. Thanks again!

This topic is closed to new replies.

Advertisement