IGM specification
* An IGM file must be a (well formed) XML document with extension .igm
The root element of the XML document should be called scenedata.
* There may be multiple materials, media, etc.. defined in the XML document. (This is required for blend materials and specular materials respectively)
* There should be exactly one 'root material' defined in the XML document.
It may have any name, but a good default name is the name of the IGM file without an .igm extension.
A 'root material' is a material that is not referenced by any blend materials in the IGM file.
* Custom NK data files are not allowed, just use the ones in the Indigo distribution.
* All materials using maps of any kind should use the uv set with name 'default', e.g.
Code: Select all
<albedo_texture>
<uv_set>default</uv_set>
<path>textures\tex.jpg</path>
<exponent>2.2</exponent>
</albedo_texture>
Packed Indigo Material (PIGM) specification
* A PIGM file must be a valid Zip (e.g. Pk-zip / winzip compatible) file.
* A PIGM file must have the extension .pigm
* A PIGM file may contain any number of textures.
* All textures required by the material must be included in the PIGM archive.
* A PIGM file should contain exactly one IGM file.
The contained IGM file may have any name
* All .igs or IGM files contained in the PIGM file should only use relative paths to any referenced resources (textures). This guarantees the 'relocatibility' of the PIGM file.
------------End Current Specification-----------
Hi all,
for various reasons, I think it's time to update the Indigo material file format (which has extension .igm)
One of the reasons is that I have added scene packing functionality into Indigo, and noticed that it should be easy to pack material files as well.
Some info on scene packing:
Packing a scene involves parsing the scene file, finding all referenced resources, such as textures, IES files, included .igs files etc.., and copying these resources into a zip file. The scene file is then updated to make sure all paths are relative, so that when the zip is unzipped, all paths will be valid.
So packed Indigo scenes are just zip files, with the extension '.pigs'.
And of course, .igm files could be packed the same way
![Smile :)](./images/smilies/icon_smile.gif)
However, some conventions will be needed to be codified.
So on that note, I'd like to propose an new .igm format, and get feedback on it from people, especially exporter writers.
IGM / PIGM requirements
* pigm's shoud be the type of file that is downloaded from the Indigo material website, when/if it is ever created
![Smile :)](./images/smilies/icon_smile.gif)
* pigm's. or igms, could be included in a 'materials' directory with the main Indigo distribution. Still thinking about this one.
* igm's should be able to be loaded by plugins, and the xml should be parsed if possible, so that the user can tweak colours, parameters etc..
pigm loading by plugins is desirable, but it may not be possible/easy to unzip files with the scripting languages. (Actually now that I think about it, Indigo could easily unpack the files for the plugin)
* igm's should be able to be saved by plugins ( and pigms if possible), in order to facilitate sharing of materials, and uploading to the material database etc...
So exporter writers, material database writers etc..., let me know what you think, in particular if this format can meet the requirements I listed.
------------Old Specification-----------
* REMOVED: The PIGM file should contain exactly one PNG file containing a render of the standard material test scene (ok this doesn't exist yet
![Smile :)](./images/smilies/icon_smile.gif)
the PNG file should be called preview_0.png, and should be in the root of the PIGM archive. (i.e. not in a subdirectory)
The PNG file should have dimensions of 500 by 500, and be in 24 bit RGB colour.
OLD IGM specification
An IGM file must be a (well formed) XML document with extension .igm
The root element should be called scenedata.
There may be multiple materials, media, etc.. defined in the file. (This is required for blend materials and specular materials respectively)
There should be exactly one material defined, that has the same name as the IGM file, but without the 'igm' extension.
For example, glossy_wood.igs should contain a material called 'glossy_wood'.
This convention allows exporter writers to find the correct 'root' material in the IGM file.
OLDPacked Indigo Material (PIGM) specification
a PIGM file must be a valid Zip (e.g. Pk-zip / winzip compatible) file.
A PIGM file may contain any number of textures.
A PIGM file should contain exactly one IGM file with the name of the PIGM file, except with an .igm extension instead of a .pigm extension.
For example, the file glossy_wood.pigm should contain a file called glossy_wood.igm.
All igi or IGM files contained in the PIGM file should only use relative paths to any referenced resources (textures). This guarantees the 'relocatibility' of the PIGM file.
So exporter writers, material database writers etc..., let me know what you think, in particular if this format can meet the requirements I listed.