PDA

View Full Version : Any tutorials on loading Maya characters (with animation) into OpenGl?



BigShooter
08-01-2003, 12:16 PM
I've just finished reading Programming Guide to OpenGl. I've been doing computer graphics for the past 10 years. To OpenGl, I'm a beginner, but I do have about 4 years experience in programming C++. For me, the ultimate use of OpenGL would be to load a character from Maya (Maya ASCII format) possibly with all the skinning data and the texturing data and animations, and have that textured character walk on screen :-)
I have absolutely no clue how to do it, but I would really appreciate it if someone could point me to a tutorial for doing that, if such one exists.
Thank you,
Luke

Tom78
08-01-2003, 05:50 PM
It#s really hard to open an Maya ASCII File. I don't know any good resources for this format.
There are 2 ways of doing what you want to do.
1st : Use the OBJ-Format. It's very simple, but you will be stuck to the mesh without animation.
2nd : Write your own exporter for Maya. It requires knowledge of Maya itself and how it manages the scene. But here you can export everything out of Maya you want.
There should be some examples for exporters right in the SDK.

cu
Tom

BigShooter
08-01-2003, 05:53 PM
OK, thanks for the info.
Luke

JustHanging
08-02-2003, 01:59 AM
Hi,

You can also export to VRML or GE2 formats, both support animation and the plugins ship with maya as far as I know.

-Ilkka

BigShooter
08-02-2003, 09:58 AM
In that case, I'm looking for a tutorial on how to load .obj files (hierarchical geometry of a character stored in them) with animations into a format that OpenGl will understand :-)

yaro_dup1
08-02-2003, 02:51 PM
Look at www.gametutorials.com (http://www.gametutorials.com)
and try to search google.

BigShooter
08-02-2003, 03:18 PM
Great link, thanks alYaro.
Luke

gvm
08-04-2003, 04:40 AM
it's better make your own obj loader!
p.s. gametutorial's loader works bad! (that which i've downloaded 1year ago) it doesn't work with faces, which has more than 4 vertices(polygones). check their example - there's a foot.obj, and look it from their loader in wireframe mode! you'll see some strange polygons connecting between fingers http://www.opengl.org/discussion_boards/ubb/wink.gif

BigShooter
08-04-2003, 09:03 AM
Yeah, but how do I make my own .obj loader :-)
If I knew, I wouldn't be asking how on here :-)

Elixer
08-04-2003, 03:44 PM
Pssst... use google and type 'obj loader source code'

gvm
08-04-2003, 11:30 PM
2BigShooter:
It's easy!
The OBJ File consists of vertices, normals, texture coordinates, faces. You just read it per-line.
vertex: v x y z (where x,y,z are float numbers)
normal: vn x y z
texcoord: vt x y
faces: (this wasn't done right in gametutorial's tutorial i think)
f v (indice of vertex for this face)
f v v ... (could be looong, so if there is 3"v", then it's triangle, 4 - quad, >4 -polygon)
f v/t (vertex,texcoord)
f v/t ...
f v/t/n
f v/t/n ... (vert,tex,normal indices)
that's all!
the hardest thing is to make the parsing of face lines, because it could be long, and you will need carefully read it!
f

knackered
08-05-2003, 03:48 AM
http://www.wotsit.org/

BigShooter
08-05-2003, 09:34 AM
Thank you guys for the info.
The main problem I have, where I totally get lost, is whn you are to read an animated character that has a hierarchy... :-(

nukem
08-05-2003, 10:09 AM
Ive heard that there are some plugins already written for maya to export models out in md3(Quake III model) md2(Quake II model) and mdl(Half-Life model). I would suggest getting one that exports in md3 since it has the most features out of all those models. There are plenty of docs on md3's. Look at www.gametutorials.com. (http://www.gametutorials.com.)

BigShooter
08-05-2003, 10:15 AM
Ok, sounds good. Thanks for all the help everyone.