View Full Version : maya to openGL
01-23-2008, 05:24 AM
I am not sure if I am posting it at the right place.
I have certain doubts on reading a Maya Model in my openGL program used in the game development.
I want to make use of all the aspects of a Maya model such as animation,fur,texturing,lighting, mesh,nurbs and all of them.
Can I read the file directly through Maya API s or should I convert the Maya Model to other formats like .md2,.ms3dů
Which is more appropriate and advisable?
use the format COLLADA:
It can save animation, texturing, mesh, lightning, but I don't think it supports fur or nurbs(fur could be implemented just as another material).
I dont'k now so much acout the Maya SDK for C+++. Maybe there are some routines for load this data.
The COLLADA plugin for maya can be found here:
Ohhh, it looks that only phong and lambert shading can be saved by now :S, not your fur materials.
I think you should use Maya API
01-23-2008, 09:56 PM
Now if I follow the COLLADA method of conversion...
I can get a .dae file from Maya Collada Plugin.
It is said that reading a collada file directly and rendering it in OpenGl is not advisable.
Then how can I render the model in OpenGL
01-23-2008, 09:58 PM
USe FCollada to load the Collada file, and export it in your own file format.
PS: this is a data format question, it is hardly related to OpenGL, and even less to the advanced forum ;)
01-23-2008, 10:01 PM
When I dont have any well defined file format , What should I do to draw it in OpenGL
01-24-2008, 03:18 PM
Maya is 3d modeling/editing software and for those purpose it have its ows file format, memory layout, graphs & nodes, ... It have some generic shading system, where you can apply various materials on surfaces. But this data format is not suitable for fast rendering. For example, fur in Maya is not so fast as it can be in some game.
You have to define our own data format that perfectly fits your needs. Keep in mind that this data format have to fit hardware needs too. Hardware doesnt support nurbs native, so you have to convert them in triangle mesh. To get identical nurbs model in Maya and in your appplication you must use same math to convert nurbs in triangles. You just need to get data from Maya and store it in your fileformat.
This is common problem because it require to learn Maya API. If you plan to support some other 3d package then you have to learn new API & SDK...
Using COLLADA you can skip step above, because COLLADA export plugin retrieve usefull informations from Maya, Max or XSI and store in Collada files (.dae). Using Collada you can load those files and transform data as you need. Collada doesnt support all features from all 3d packages, but it support most common stuff.
01-24-2008, 09:41 PM
When I dont have any well defined file format , What should I do to draw it in OpenGL :eek: :eek: do you at least know how to program?
1_ Create your file format
2_ Convert Collada to your file format
3_ Load your file in your 3d engine
4_ Render the content of your file
01-25-2008, 12:35 AM
oh ok ok....
01-25-2008, 11:31 AM
In general, I would not plan on being able to use all the Maya features in a game. Some of the features are very CPU intensive, which is why rendering a movie out of a Maya scene takes a long time. A game engine will implement a real-time approximation of various subsets of the features in Maya (or Max, or whatever the tool). The crux is that you have to stick to the subset that is implemented, else the game won't understand the scene. That's the cost of doing the graphics in real time.
I would recommend you get hold of some Unreal 3 based game that contains a copy of UnrealEd (latest Unreal Tournament perhaps?), and experiment with putting your Maya scenes into that game engine. It's one of the most featureful engines on the market today, and I seem to recall they have a good Maya art path.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.