C++ code for reading Indigo materials
C++ code for reading Indigo materials
Hi all,
I'd love to see some of the exporters for various modelling packages support importing Indigo materials, so that the MatDB can start becoming really useful.
But I realise that writing the code that can process a .igm file can be pretty difficult and time-consuming, especially when you have to cope with backwards compatibility in material XML specification.
So I'm releasing some C++ code that can parse Indigo materials, given the XML element. The XML parsing itself is done with TinyXML.
For the people that are working on an exporter that doesn't use C++, well, at least the code can provide a guideline of what needs to be done.
I've just been working on this over the last few days, so it's not fully tested yet.
However, this code should be pretty complete, and will be maintained in the future, as it's now also the code that Indigo uses to parse material XML.
Any feedback is welcome. Is this useful for exporter authors?
I'd love to see some of the exporters for various modelling packages support importing Indigo materials, so that the MatDB can start becoming really useful.
But I realise that writing the code that can process a .igm file can be pretty difficult and time-consuming, especially when you have to cope with backwards compatibility in material XML specification.
So I'm releasing some C++ code that can parse Indigo materials, given the XML element. The XML parsing itself is done with TinyXML.
For the people that are working on an exporter that doesn't use C++, well, at least the code can provide a guideline of what needs to be done.
I've just been working on this over the last few days, so it's not fully tested yet.
However, this code should be pretty complete, and will be maintained in the future, as it's now also the code that Indigo uses to parse material XML.
Any feedback is welcome. Is this useful for exporter authors?
- Attachments
-
- indigo_utils_2.zip
- (30.93 KiB) Downloaded 651 times
Last edited by OnoSendai on Sun Mar 08, 2009 3:23 pm, edited 1 time in total.
Re: C++ code for reading Indigo materials
Yes!OnoSendai wrote:Is this useful for exporter authors?
hey nik,
i dumped the old cindigo import code and completed the material import using your parser. still need to do the texture loading (yeah, i said itll be ready today, but i got heavily distracted by MGS4, Mirrors Edge and failblog.org ^^ ).
on the way i noticed that i really have to rewrite the material helper... im not sure if i can do that before 1.1 stable.
i also have a little problem here: it seems the gamma value in the RGB spectrum is missing!
i dumped the old cindigo import code and completed the material import using your parser. still need to do the texture loading (yeah, i said itll be ready today, but i got heavily distracted by MGS4, Mirrors Edge and failblog.org ^^ ).
on the way i noticed that i really have to rewrite the material helper... im not sure if i can do that before 1.1 stable.
i also have a little problem here: it seems the gamma value in the RGB spectrum is missing!
i mean that there is no gamma variable in the IndigoRGBSpectrum but the xml rgb spectrum can hold rgb and gamma.OnoSendai wrote:Hi Fused,
sorry, what exactly do you mean by that?
edit: i had a closer look at your source code and gamma is parsed and the color gets reverse gamma corrected... but im not sure if this is suitable
![Smile :)](./images/smilies/icon_smile.gif)
edit2: also i couldnt find a function for parsing mediums
Who is online
Users browsing this forum: No registered users and 63 guests