iDevGames Forums
Loading Maya Models - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Loading Maya Models (/thread-7687.html)



Loading Maya Models - Dracir - Jun 27, 2002 06:29 PM

Does anyone know where I can find some sample code or a tutorial for loading Maya models (.mb,.x,or .obj) or animations in OpenGL? I'm using MacOS 9 if it matters.

Thanks!


Loading Maya Models - Mars_999 - Jun 27, 2002 06:42 PM

I am going to be looking for the same info as soon as my Mac shows up!! If you goto the http://www.wotsit.org/ webpage and look around you can find all sorts of file formats. Also http://nehe.gamedev.net/ has a tutorial I think for loading models. Hope that helps.


Loading Maya Models - rangaroek - Jun 28, 2002 03:38 AM

Quote:Originally posted by Dracir
Does anyone know where I can find some sample code or a tutorial for loading Maya models (.mb,.x,or .obj) or animations in OpenGL? I'm using MacOS 9 if it matters.

Thanks!

I've written a very simple loader for .obj files,
it does not handle any material loading from .mtl files.
If you are interested drop me a line.
bye rangaroek


Loading Maya Models - Unregistered - Jun 28, 2002 03:48 AM

Quote:Originally posted by rangaroek


I've written a very simple loader for .obj files,
it does not handle any material loading from .mtl files.
If you are interested drop me a line.
bye rangaroek
my email is rangaroek@web.de ...


Loading Maya Models - ClarustheDogCow - Jun 28, 2002 05:37 AM

Obj files are very easy for simple models, but can also be very complex. The most common commands that any Obj veiwer should understand are:

v-vector. it has 3 coordinates, for x,y, and z, respectivly. you can have the weight at the end, but I usually just write a 1.0.

vn-x,y,z coordinates. that specifiy vector normals.

f-a face, contains a minimum of 3 indicies which specify the points of its polygon. these are indecies to the vectors, but the indexes always start with 1 (the first vector)! It is in this format: f v/vn v1/vn1 v2/vn2

There is a lot of source code out there on Obj files.


Loading Maya Models - Nimrod - Jun 28, 2002 03:39 PM

Not sure how relevant this is, but here is my reply to a recent thread about 3d models:

Quote:Originally posted by Nimrod


I don't think Maya PLE exports to anything, because of its restrictions. If you don't mind learning a little MEL, then you can export your own text format to Maya's console, then copy it to a text file. Have a look at this tutorial at macscene.org. If you're not familiar with Maya PLE it's free and restricted to non-commercial use, and pretty good, although it's even buggier on the mac than on PC, or so I hear... at least it's on OS X, so won't crash your whole system.

That tutorial is for exporting Maya files to your own format (or any format you think you can create from MEL code). Of course, if you have a non-free version of Maya, it'll probably be easier to use their SDK for plug-ins (although using MEL like this will also work). Parsing Maya's file format directly is probably not a lot of fun.