How do I import Maya model to OpenGL with C#? If you have any 开发者_运维技巧sample, it would be very useful.
the short answer is, you don't.
Maya models (.ma and .mb files) are really more or less a Maya script to generate the content using Maya commands. Unless you reimplement all Maya functionality, you can't really use them to "import" anything.
People who want to use Maya to author runtime content usually write a Maya exporter (that uses the Maya APIs to extract meaningful data for them), or use an available one, to a format that they can then import.
Which format you export to largely depends on what data exactly you want to get out of Maya. But in general, you'll want at least some representation of the scene DAG, which is already beyond what OpenGL is for. You'll want to use some rendering engine for that.
In all likelihood, whatever rendering engine you pick will have some preferred model format, and very likely some preferred tools to generate it too.
This forum post has a huge number of links regarding C# and 3D graphics. I would suggest you read up a bit through those resources (and any others you can find).
精彩评论