Skip to main content
gamedev.net
🔒 Locked

Maya .mb model loading

Started by polyfrag Aug 14, 2006 at 9:40 PM 2 replies 2k views
Original Post
polyfrag
polyfrag
I have an animated .mb model of a colored (but not skinned) hamster wheel made in Maya and I need some way to load it in my hamster game. I searched on google for a tutorial on loading maya models but found nothing. Does anyone here know how to load maya models? I'm using OpenGL in Visual C++.
mnemonicj
mnemonicj
You can download Maya .mb files only by using Maya API, which is not
publically available (it comes only with purchased maya) and SDK required
Maya to be installed.

However there are other ways to retreive your data from Maya.
I would recommend using Collada XML file format.
Take a look at http://www.collada.org for specification.

There is a free plugin for Maya called ColladaMaya.
http://sourceforge.net/projects/colladamaya/
http://www.feelingsoftware.com/content/view/55/72/lang,en/

And there is a Collada DOM library, that simplifies importing and exporting
data from and to Collada file, which you can integrate into your project.
http://sourceforge.net/projects/collada-dom

Also, you can use Maya ascii file format (.ma) instead of using binary one.
You can also try FBX file format, it has free SDK and Maya plugin available.

Cheers
Mnemonic
MGB
MGB
nice info mnemonicj - I've been looking at ways to get models from Maya into Max :)
RobTheBloke
RobTheBloke
Quote:
Original post by Aph3x
nice info mnemonicj - I've been looking at ways to get models from Maya into Max :)


However the collada support for Max is less developed than that of Maya, so it can fail occasionally. Fbx normally works to some degree, however it can fail on complex character setups.

In theory you could write a .ma parser, but the reality is that it'd be a big waste of time, since you may just end up with a polyCreator node piped into a set of tweaks which connects to a mesh. ie, there's a good chance you wont actually find any mesh info in there at all - to get at that info you'd have to reverse engineer every single maya node. The same is true of the mb files, and further to the previous answers, the mb files are fairly easy to parse. It's just a standard iff file, the tags for which are listed in the node & attr reference. The problem is that the data will be meaningless to anyone but the maya internals.

My website has some pretty comprehensive info on writing Maya exporters in the API if you go that way, you'll need to make sure you are using Visual C++ 2002 or later though. I personally prefer doing this stuff in the API rather than Fbx, mainly because Fbx is pretty closed off, you can't actually add any extra data into it, just what it gives you. It's material/texture and lighting support is somewhat shonky imo.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.