View Full Version : The codes to read information in .mi file format

07 July 2005, 09:19 AM
I am using maya 6 to create spot light and 3d object include properties of light(color,direction,translation,..) and material of object.
Can anyone show me the codes for reading informations in .mi file format to receive the values of properties of light and use in my codes (use C++ )???
Thanks for any help from you.

07 July 2005, 01:22 PM
I reccomend you first find a description of how the mi file format is structured. With some logical thinking and some standard functions for file IO in C++ you should be able to read the data stored in the MI file format.

But i think a description cannot be easily found, because the format may be protected by copyright law or something like that.

Edit: Woops seems I was wrong reading the post below ;)

07 July 2005, 11:28 PM
The lex parser for the mi format is part of the mental ray manual (Appendix A, I believe). You just need to modify it to have it read only the info you are interested in.
For a working example of two parsers, you can download mrLiquid, as it includes an mi parser for finding object's sizes and another one for parsing .mi shader descriptions.

CGTalk Moderation
07 July 2005, 11:28 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.