Polygons into Maya.

I have a list of polygons that I want to import into Maya.
How shall I output them from my program such that Maya can read them?

OK

I am a total newbie to OGL but…

What formats does MAYA support?

Eg STL , VTK etc

It must be able to import some form of ASCII poly file.

So its just a case of writing you vertex/polygon array in a different format.

Julian

Ok let me rephrase the quesiton…
Does anybody know of an ascii text format for a list of polygons that maya supports. If so can you point me to a link that documents it.

Looks like a few options (STL is pretty easy)

http://www.alias.com/eng/products-services/maya/technical_features/api_sdk_mel.shtml

Import/Export Options

Enhanced or new data support formats in Maya facilitate the accurate transfer of data between Maya and other applications. Whether bringing models into Maya for design visualization or exporting Maya data to other software packages, you will get the most value from your digital assets. Supported file formats include Macromedia® Flash, DWG, Adobe® Illustrator®, Encapsulated PostScript®, Scalable Vector Graphics, DXF, IGES, OpenFlight®, StudioTools® and OBJ, DDS, PNG, and STL.

As you know IGES, STL and DXF are “open” ish formats

Hopefully a bit of a search should turn these up.

Or I can write you some sample files of a simple model and you could figure the formats out.

Julian

Ok so after a bit of poking around it would appear that I want to produce a .ma file Maya Ascii…

Here is what I can gather from sketchy data I’ve found on the net.
This is the header…
//Maya ASCII 1.0 scene
//Name: myfile.ma
//Last modified: Thurs, Mar 24, 2005 02:02:00 PM

Data within the maya ascii file is arrainged in nodes…
This sounds great because I have a few objects and each object
has a list of polygons each polygon has a set of integer points that describe the polygon. Each object has a color.

Not much of and advance… but its a step in the right direction…

Can you ask someone to create a simple model (cube or similar) and write out one of these files from Maya?

Someone on this forum must use Maya??

Good luck

*.ma is definately NOT what you are looking for. the ma files are simply mel scripts that re-create the dependency graph. You are probably better off writing your own importer using the Maya API, or simply writing out an obj file and then using the obj import plugin.

Alternatively, you can load the Maya API up into your application using MLibrary. That would allow you to write the data directly out to a Maya binary or ascii file using MFileIO::saveAs().

you might find my website useful, www.robthebloke.org

Did I mention that I am on MAC OS X?
After much reading and posting it would appear that what I need to produce is a .OBJ file.
So if there are any experts here on .OBJ files please let me know…

www.robthebloke.org/source/obj.html - file format

www.robthebloke.org/opengl_programming.html#5 - example obj loading code.