Sign in to follow this  
Conoktra

3D model format nightmare

Recommended Posts

Conoktra    144
... 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. [u]I am looking for some way to get a model from Maya into my game with minimal effort.[/u] 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.

Share this post


Link to post
Share on other sites
Hodgman    51324
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 "[i]how do I use assimp to load fbx/dae?[/i]", so good luck [img]http://public.gamedev.net//public/style_emoticons/default/happy.png[/img] Edited by Hodgman

Share this post


Link to post
Share on other sites
Ashaman73    13715
[quote name='Conoktra' timestamp='1339735252' post='4949429']
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
[/quote]
Have you tried the exporter script from [url="http://scripts.zbufferstudios.com/"]here [/url]?

Share this post


Link to post
Share on other sites
EternityZA    1226
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. Edited by Wilhelm van Huyssteen

Share this post


Link to post
Share on other sites
bobbias    120
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).

[url="http://www.gamedev.net/page/resources/_/technical/apis-and-tools/how-to-write-a-simple-maya-model-exporter-r1906"]http://www.gamedev.net/page/resources/_/technical/apis-and-tools/how-to-write-a-simple-maya-model-exporter-r1906[/url] might be useful.

Share this post


Link to post
Share on other sites
Conoktra    144
Thanks all, I appreciate the help. Sounds like I need to buckle down and just write a exporter or converter myself. Thanks again!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this