OpenGL Maya model exporter in os x

This topic is 3475 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi, Im new here so sorry if there is a mistake. Im currently try to build a model exporter from maya to be used on my OpenGL code. I googled around and got this link http://www.gamedev.net/reference/ar...article1906.asp looks promising but the problem is i use mac version of maya and i dont think i can find this files: Foundation.lib OpenMaya.lib Any idea? How can I get a maya model reader? I only need the polygons and vertices for now thanks in advance

Share on other sites
I wrote the other maya tutorial (which is better by the way ;)). You won't have any maya *.lib files since you're not compiling on windows. You'll want to be linking to -lFoundation -lOpenMaya etc. Not sure of the location of those on macos, but find the maya install directory, and they'll be in the /lib folder. (probably named as libFoundation.so or something of that ilk).

Quote:
 How can I get a maya model reader?

The only one available anywhere in the world, is Maya itself (or via MLibrary in the Maya API). There are no 3rd party loaders for maya ascii/maya binary since it's very rare that they actually contain data. Normally it's just a sequence of mel commands to create the nodes in the scene....

createNode "polyCube";createNode "mesh";connectAttr polyCube.output mesh.input;

The only option really available to you is to either write your own exporter, or use a 3rd party plug-in - i.e. fbx, softimage crosswalk etc.

Share on other sites
im really lost right now. sorry, im kinda new to graphic programming

so heres the deal now:
i found the include file under the devkit folder, i compiled it (a few error popped out, i fixed it by commenting the lie :D ) and then the error showed that i cant link the file. apparently all the file in the included file is a .h file. i cant find the Foundation or OpenMaya file. THere is no lib folder and stuff.

Any idea?

Share on other sites
Looking at the linux version, the libs are:

/usr/autodesk/maya2008/lib

Which has libFoundation.so and libOpenMaya.so

Find the corresponding maya path on macos, and add the line -L/usr/autodesk/maya2008/lib to the linker (replacing the path with the one you found). That should set the linker input lib path, which should allow you to link with -lFoundation -lOpenMaya

If you can't find the lib folder, make sure you installed the devkit. If that still doesn't help, then your best bet is to ask on the highend3d API forum about compiling for macos.

Share on other sites
i found the lib files ( its .dylib extension), i added it to my project, compile it but i got the same error:

MLibrary::clearnup(int) referenced from exportMaya(char*) in Mayaexporter.o

MLibrary::initialize(char*, boo) referenced from exportMaya(char*) in MayaExporeter.o

Im not quite sure what does the error mean.

Any idea?

Share on other sites
Just to make sure you are clear on this - the Maya format is a very lousy format to use in your own code. Consider using a simpler format, specifically one of the formats Maya can export to, such as Wavefront .obj (simple), or Autodesk .fbx (complicated, but full featured).

Share on other sites
If Maya is what your using have you considered using the RTG file format. Its very basic, you can select what you want exported and requires a small amount of file parsing and code to build the model hierarchy and tree. At least in Maya 4.5 it wasnt enaabled by default and has to be done so in the plugin manager. If they still support it Id say give that a try.

Share on other sites
Quote:
 Original post by swiftcoderJust to make sure you are clear on this - the Maya format is a very lousy format to use in your own code. Consider using a simpler format, specifically one of the formats Maya can export to, such as Wavefront .obj (simple), or Autodesk .fbx (complicated, but full featured).

thats the problem. im using an os x version of maya, and it seem there is no .obj option under the file->export selection menu. but somehow the import object does support .obj file. how can i export it to .obj file?

Share on other sites
Quote:
Original post by svnstrk
Quote:
 Original post by swiftcoderJust to make sure you are clear on this - the Maya format is a very lousy format to use in your own code. Consider using a simpler format, specifically one of the formats Maya can export to, such as Wavefront .obj (simple), or Autodesk .fbx (complicated, but full featured).
thats the problem. im using an os x version of maya, and it seem there is no .obj option under the file->export selection menu. but somehow the import object does support .obj file. how can i export it to .obj file?
Search for an exporter plugin.

Share on other sites
Quote:
 Original post by swiftcoderJust to make sure you are clear on this - the Maya format is a very lousy format to use in your own code.

It's not lousy, it's useless. The API however is pretty awesome, and is trivial to extract the data you need from it.

Quote:
 Original post by swiftcoderConsider using a simpler format, specifically one of the formats Maya can export to, such as Wavefront .obj (simple), or Autodesk .fbx (complicated, but full featured).

obj is a little bit too limited, but fbx is awful. It's closed source (and distributed as static libs!), inflexible (can't add custom markup), overly complicated (Fully understanding the way the transforms are built up requires a fairly intimate knowledge of motionbuilder - where you'll find the actual documentation), has very limited material/texture info, stores all of it's anim data as Euler curves (which every single person fails to interpolate correctly), and is backwards compatible (allegedly, but you will find older fbx files failing to work in the latest SDK's - and you will find drastic changes between the SDK versions).

dotXSI (aka crosswalk) is far more suited to games, has a far nicer SDK, and is open source.

Quote:
 thats the problem. im using an os x version of maya, and it seem there is no .obj option under the file->export selection menu.

Windows->Setting/Preferences->Plug-in Manager.

Quote:
 If Maya is what your using have you considered using the RTG file format.

It's easier to write your own exporter and file format than use rtg. Whilst RTG is *ok*, the data it stores is largely limited to hierarchical poly models, and parsing the files is a royal Pita due to the rather pointless export/file format options; i.e. do you want

<vert_index> <vx> <vy> <vz>

or :

<vx> <vy> <vz>

which is actually the single worst export option I've ever seen.

1. 1
2. 2
Rutin
25
3. 3
4. 4
JoeJ
18
5. 5
gaxio
11

• 14
• 22
• 11
• 11
• 9
• Forum Statistics

• Total Topics
631765
• Total Posts
3002213
×