exporter .IGM material xml format
-
- Posts: 517
- Joined: Sun Mar 04, 2007 6:20 am
- Location: Stuttgart, Germany
Well.. i did it with maxscript. It's not 100% functional yet, but the logic works. I'm using "<>" as delimiters while reading xml file and comparing the values i get with indigo material keywords. I store the keywords into variables in one function and when i reach to "/material" tag in file then I pass those collected keywords to another function that creates material accordingly. Nothing hard really.
Re: exporter .IGM material xml format
I assume, that same goes to *.nk files too, right?radiance wrote: -> textures must be pathless, eg not 'c:\dir\image.jpg' but 'image.jpg' instead!
If the material has an nk, then that particular nk file gets exported and only the filename without path would be writen into xml code.
Yes, I do have blend material import/export.
I'm done with the whole *.igm thing actually. Maxigo has full *.igm support.
But what about blend materials? What do you exactly mean by "how" ?
I implemented "infinite" blend export/import. There can be any number of blend materials inside blend material.
[edit]
Ok. I just checked how i did it.
It's like this:
Mat 1
Mat 2
Blend:
<a_name>Mat 2</a_name>
<b_name>Mat 1</b_name
Eh.. i'm thinking here, that the actual order of materials that are used inside blend is not important at all as long as they are declared before blend material. The final order inside blend will be the same in all exporters since the <a_name> and <b_name> are the ones that are linking to actual materials. So I think you can't export it wrong in any way. Also my example is quite pointless
Do you want me to post an example igm?
Actually would be good to get some of your igm's too. To check any compatibility issues and etc.
About nk files. We need to decide how we are going to export those. Currently Maxigo exports nk's the same way as bitmaps. It exports the nk file into the material folder and writes its name (no path) into igm. Do you think it would be best to not include the actual nk file and leave it into Indigo folder?
I'm more towards including the nk file with material package. That way you can be 100% sure, that the material has all the files needed.
I'm done with the whole *.igm thing actually. Maxigo has full *.igm support.
But what about blend materials? What do you exactly mean by "how" ?
I implemented "infinite" blend export/import. There can be any number of blend materials inside blend material.
[edit]
Ok. I just checked how i did it.
It's like this:
Mat 1
Mat 2
Blend:
<a_name>Mat 2</a_name>
<b_name>Mat 1</b_name
Eh.. i'm thinking here, that the actual order of materials that are used inside blend is not important at all as long as they are declared before blend material. The final order inside blend will be the same in all exporters since the <a_name> and <b_name> are the ones that are linking to actual materials. So I think you can't export it wrong in any way. Also my example is quite pointless
Do you want me to post an example igm?
Actually would be good to get some of your igm's too. To check any compatibility issues and etc.
About nk files. We need to decide how we are going to export those. Currently Maxigo exports nk's the same way as bitmaps. It exports the nk file into the material folder and writes its name (no path) into igm. Do you think it would be best to not include the actual nk file and leave it into Indigo folder?
I'm more towards including the nk file with material package. That way you can be 100% sure, that the material has all the files needed.
I mean: Do you include all the materials and blends and blends of blends and blends of blends...in the one *.igm file? Or, does the Blend material *.igm file just contain the XML code for that particular Blend material (alpha map, blend factor, a_name, b_name) and the user has to then load the a_name and b_name materials from separate *.igm files?suvakas wrote:But what about blend materials? What do you exactly mean by "how" ?
It sounds like you are using the first method. That method will not be easy for me to implement but I may give it a try. For my next release, I am not supporting Blend material *.igm but I will likely do it soon. Maybe I'm worried that I'll finally get it working and then Ono will change the Blend material to a Layered material that can have a_name....z_name
Yeah, post some funky complex *.igm files (with and without Blend materials). I can do the same. Might as well use this forum to do it....Do you want me to post an example igm?
I still don't know what is the best way to handle nk files. I guess your way makes sense. I thought at first it would be hard to implement but now I think it would be fairly easy.
Here are two blend materials i randomly created using 3ds Max procedural textures. "Random blend material" has blend inside blend. "Glass+stripes" is medium material blended with phong+nk.
I don't know how funky they are though
I don't know how funky they are though
- Attachments
-
- glass_with_stripes.jpg (120.03 KiB) Viewed 8612 times
-
- glass_with_stripes.zip
- zip'ed igm
- (52.49 KiB) Downloaded 412 times
-
- random_blend_material.jpg (118.15 KiB) Viewed 8613 times
-
- random_blend_material.zip
- zip'ed igm
- (79.24 KiB) Downloaded 390 times
suvakas:
Could you post a 3DS file of your material preview scene complete with lights, background, etc.? I found the scene in Blender format but it didn't have any lights. I want to use the exact same scene setup as you.
Thinking about importing your materials is giving me a headache. I will change my code in the future to be able to import blends and nested blends but for now, I won't support it. I would have re-write and re-test all of my .igm import code and I don't have time. I want to release the next version of SkIndigo within a week.
Whaat
Could you post a 3DS file of your material preview scene complete with lights, background, etc.? I found the scene in Blender format but it didn't have any lights. I want to use the exact same scene setup as you.
Thinking about importing your materials is giving me a headache. I will change my code in the future to be able to import blends and nested blends but for now, I won't support it. I would have re-write and re-test all of my .igm import code and I don't have time. I want to release the next version of SkIndigo within a week.
Whaat
Thanks Kram
Here's the scene for you Whaat. Stronger light is 1350W and weaker is 100w.
I think you already have the grid texture so i didn't include it.
If you need any help implementing the blend materials, then feel free to ask. I remember, that i spent several hours thinking about how i should do the nested blends.
Here's the scene for you Whaat. Stronger light is 1350W and weaker is 100w.
I think you already have the grid texture so i didn't include it.
If you need any help implementing the blend materials, then feel free to ask. I remember, that i spent several hours thinking about how i should do the nested blends.
- Attachments
-
- material_preview_scene.zip
- (229.08 KiB) Downloaded 385 times
Who is online
Users browsing this forum: No registered users and 136 guests