View Full Version : Implementing Maya
ferum
2005.03.21, 08:28 PM
how do you use Maya for the graphics for a game?
do you use openGL to implement it through the graphics engine?
i was just wondering, i have nowhere near enough programing knowledge to do it :)
kodex
2005.03.21, 09:32 PM
In the simpest Terms:
1) create model in maya
2) use an exporter to export the models as data file
3) load the data file into data list inside your program
4) execute data list
* Yes Maya models would be rendered through OpenGL Commands
Maya has an exporter to a file with extension .obj which is the easiest file for 3d to parse into code (that I know of). The hard part is creating a class that represents the faces and vertices and such. I'll show you my code for loading objects. It's not the best, but email me and I'll send it to you.
sealfin
2005.03.22, 01:01 PM
@Nick: could you email a copy of that source my way? sealfin@sealfin.com if you're agreeable...
I'm just wondering how everybody else has coded their loaders (and the response is probably: "a lot better than yours" :p)
(Nah, I couldn't be bothered to obfuscate my email address, and I doubt doing so would make any difference to the volume of spam I'm receiving at the moment...)
kodex
2005.03.22, 01:09 PM
one word. BG3D. Hey it works, its free, its there, why not?
Taxxodium
2005.03.22, 02:02 PM
What on earth is BG3D? Excuse my ignorance, I have been quite "out" of the 3D (programming) scene.
kodex
2005.03.22, 03:08 PM
Lol, dont feel bad its not very common but it does everything i need it to do. It is a custom class written by Brain Greenstone (Hence BG3D). He is lead programmer for http://www.pangeasoft.net/ Im sure if you email him he can give you the importers and such.
ferum
2005.03.22, 05:38 PM
thanks for quenching my curiosity!
AnotherJake
2005.03.22, 10:10 PM
It is a custom class written by Brain Greenstone (Hence BG3D).
It is not a `class'. He doesn't write anything using OOP, except parts of the Maya export plugin since Maya API requires C++. BG3D is a meta file format that he came up with to replace 3DMF for his own needs. As it is described in his book and implemented in his example code, it only handles the materials as faces, vertices, UV's, vertex colors, and normals. ***No skeletal information is included.*** It is virtually nothing more than .obj. The export code and the import code for this is given on the CD that comes with the book. It's a little quirky on the Maya side but it works (the quirkiness is Maya's fault as far as I can figure). You're better off using it to learn the Maya API for your own needs and go from there.
For learning about how Maya is used for game graphics and how to start learning to do it yourself, there is a book called The Game Artist's Guide to Maya (http://www.amazon.com/exec/obidos/tg/detail/-/0782143768/qid=1111547598/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/103-3773969-6485409?v=glance&s=books&n=507846) which is a great book on the subject IMHO. It is written for artists, not programmers, so it won't show you how to get those graphics out of Maya and into your own program. Brian Greenstone's book is all there is to fill the gap on that end on the Mac. Even for experienced programmers it can be a real challenge to use Maya for game graphics above anything but a .obj file.
5thPeriodProductions
2005.04.21, 12:36 PM
I can't remember the URL, but I found a OBJ to OpenGL converter (I believe it was a command-line utility). It takes the OBJ code and, well, turns it into OpenGL files (.h only?).
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.