Loading Maya Models

Dracir
Unregistered
 
Post: #1
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!
Quote this message in a reply
Mars_999
Unregistered
 
Post: #2
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.
Quote this message in a reply
rangaroek
Unregistered
 
Post: #3
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
Quote this message in a reply
Unregistered
Unregistered
 
Post: #4
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 ...
Quote this message in a reply
ClarustheDogCow
Unregistered
 
Post: #5
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.
Quote this message in a reply
Nimrod
Unregistered
 
Post: #6
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Nice models and free models, new site! 3d4ya 4 4,201 Sep 18, 2008 07:36 AM
Last Post: NYGhost
  Maya OpenGL export MrLee 10 6,152 Aug 5, 2008 11:26 AM
Last Post: MrLee
  New Member 3D Designer, maya, work? speakerwizard 6 4,401 Nov 13, 2006 02:29 PM
Last Post: sealfin
  Poor quality Maya PLE Render. Marjock 0 2,983 Jan 2, 2006 05:02 PM
Last Post: Marjock
  Convert Maya model into OpenGL creater16 13 9,440 Jul 28, 2005 03:58 AM
Last Post: creater16