exporter .IGM material xml format

General News and accouncements regarding the Indigo render engine
User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Fri May 04, 2007 8:12 am

Hello that's me the psycho bug seeker :D

Well, I've got the sensation that textures are not visibles backface, Suvakas, what's happening really ? Yes or no ?

Very interesting these blends ;)
obsolete asset

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Fri May 04, 2007 8:15 am

Sorry, i don't get the question. What are not visible where?

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Fri May 04, 2007 8:18 am

textures in the back of the render sphere... looks like there is no blend backface but just the medium.
obsolete asset

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Fri May 04, 2007 8:21 am

Gotcha.
Well. I think they are. Look at that blue sphere with stripes. Those stripes are clearly visible on the back side too.
Hard to tell about the first sphere though.

User avatar
CTZn
Posts: 7240
Joined: Thu Nov 16, 2006 4:34 pm
Location: Paris, France

Post by CTZn » Fri May 04, 2007 8:39 am

Yes you're right, everything is fine ! In fact I interpreted wrongly the materials, for some reason I thought the glass was uncolored and opaque stripes were the blue ones, my bad :oops: In short I took reflectivity for transparency :mrgreen:
obsolete asset

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Fri May 04, 2007 5:15 pm

Suvakas: Shortly after I replied to your message saying I had no plans for igm features in the "minimal" exporter for Blender I update....

It had me feeling like I couldn't do it so I started coding. It is coming along quite nicely I guess but I am not aware of all possible combinations of material settings Indigo can use. Even more important, this "minimal" exporter does not support them all. (At least I don't think so)

A blend of a blend sounds confusing, I am not sure I understand that. According to the radiance thread, it looks like one igm equals one material. So if nested blends is what I think it is, how can it be an igm file? Wouldn't it be one igm file per material?

blend: blend, mat a, mat b

nested sounds like: blend, mat a blend (leading to another blend, mat a, mat b), and mat b or mat b blend (leading to another blend, mat a, mat b)
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Fri May 04, 2007 7:32 pm

Nice to hear that!
Wedge wrote: According to the radiance thread, it looks like one igm equals one material. So if nested blends is what I think it is, how can it be an igm file? Wouldn't it be one igm file per material?
Blend inside blend is actually one material that has been constructed using multiple blends. How would you like to export blend then? Each blend element as a separate igm file? How can the end user put it together afterwards?
Wedge wrote: nested sounds like: blend, mat a blend (leading to another blend, mat a, mat b), and mat b or mat b blend (leading to another blend, mat a, mat b)
That's correct. Doesn't your exporter support this already? Is it limited only to one blend?

Check out my first material i posted. It has blend in blend.

Here's how i did it...
As you know, the blend links to other materials using names (name_A and name_B).
I'm reading the igm file and inserting every blend material i find into an array and every regular material into another array. Then i loop through blend array to get the names of different blend elements and at the same time i search that name from regular array. If there is a match, then i know what material has to be in what blend "slot" (a or b).
When i'm done, then i loop through the blend array one more time and i compare blend material names with blend element names. That way i get if there is any Blend material with the same name that some element has. If yes, then this blend is inside another blend and i link those two.

It is kind of hard to explain, but this is my method. I don't know how you can store arrays in python and if you can use material as an array element.

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Fri May 04, 2007 8:44 pm

Suvakas: It sounds like you have it set up good. :)

In Blender I translate one material to be the blend, mat a, and mat b.

It is messy but say "ball.blend.ab.cd" was the name of the material in Blender. Exporter searches material names, sees this is a blend, then sends out the "ab" part as material a's name and the "cd" part as material b's name. The data from this one material file is translated to cover the whole Indigo blend. (Only diffuse stuff mostly, I am doing phong soon) So out in the exporter it is a blend but in Blender it sees it as just one regular material.

I still do not know all combinations that materials can be. But I did not write anything for nested blends so I am sure it doesn't work.

You don't need Python or Blender to read the export script. It is just a text file with a .py extension if you want to have a look. :)
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Post by suvakas » Fri May 04, 2007 9:08 pm

Hmm..i see. Yes, this is a bit messy :) There is some thinking to do how would be best to import a construction like this. Names could get quite long and messy.
Isn't there a blend material type in Blender?
Can you script any new material types by yourself or extend the existing ones? Do you have to do it by using names only?

In Max i did a new blend material by script. It is possible to create new material classes in Max using scripting.
The container material is the "main blend" and 2 other slots are for mat A and B. Mask is a blend map. You can also get a visual feedback of the final mat.
Can't you do something like this in blender? (sry..i've only opened the Blender 1-2 times and i know nothing about it)
I think this approach would be a bit better than using only name to define blend material.

[edit]
See if i got this right.
You have a separate material named A somewhere in Blender. Then you have a separate material B. Then you have a separate material named ball.blend.A.B and it exports as an indigo blend material using A and B as blends.
If so, then your task is quite easy. Just import every material separately into Blender. That's it. The blend will be created during the export using the blend material name.
That's of course if i get it right.
Attachments
maxigo_blend.jpg
maxigo_blend.jpg (32.8 KiB) Viewed 5302 times

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sat May 05, 2007 11:12 pm

There is, but just with Nodes.

@Wedge: You didn't want to start using nodes, but I guess, now, you should...
At least, if you don't get an other reasonable way of doing it. ;)

An other way is using multible mats, which already is done in a normal - nonalphamapped way... But it's inflexible, as you just can have one material per poly...

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Sun May 06, 2007 9:12 pm

Hi Suvakas, thanks for your information. In the news just recently it looks like Blender 2.44 (new version) is coming out soon with a SSS material section. This should help me somewhat with those materials.

As for blends, I am not entirely sure of Blender's different ways of creating a material. I am making progress on the import IGM stuff right now and learning how to create a material from outside of Blender and placing it inside the scene file as a material choice. I suppose for complicated materials I could do this.

The method that the exporter uses now is, "ball.blend.ab.cd" is the name for one material only. I just use random sliders inside Blender that match up with the range of values that I will need, and when they don't match I sometimes use multipliers to allow for greater number ranges. Color sliders are used from within Blender to set colors for all materials, but still it is only considered one material. I could program it for three materials I think, reason I did not because unused materials get deleted from Blender if you don't click a save button for them. I have not looked to see if I can apply the save material button for a imported material yet, but I probably can..

Kram: Thanks also for the information. I have not used or read anything about nodes yet. I still only set up my material in a simple way -> add new mat, pick colors, drag sliders, and render away. I think that is my problem, I am spending too much time in the code and not enough with Blender to see how bad the exporter is. After I rendered the beach house I think that was when I reworked some of the materials. (after I spent time in Blender and noticed they were not what I wanted) :)
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Sun May 06, 2007 11:04 pm

SSS = a node ;)

and for blenderin materials, you don't need too much!
Complicated nodes are different, but blending mats doesn'
t matter at all ;)

I'll post a screen, mom

Edit: Pic added and, I just noticed, that SSS is a tab in the materials :D
Attachments
Screen.jpg
here you go, I hope, it helps
Screen.jpg (698.27 KiB) Viewed 5219 times

Wedge
Posts: 441
Joined: Sun Jan 14, 2007 11:33 am
Location: East Coast, USA

Post by Wedge » Tue May 08, 2007 12:59 pm

I had a quick look in the docs Kram, I do not see where I can get access to these materials from program code.

Not completely sure yet though, I'll look at it better, soon. :)
Content contained in my posts is for informational purposes only and is used at your own risk.

User avatar
Kram1032
Posts: 6649
Joined: Tue Jan 23, 2007 3:55 am
Location: Austria near Vienna

Post by Kram1032 » Wed May 09, 2007 5:39 am

maybe, you can't :S
but you should be able to...

Blender internal python seems to have major limitations, for savety, or so...

zuegs
Posts: 380
Joined: Tue Jun 27, 2006 5:46 pm
Location: switzerland

Post by zuegs » Wed May 09, 2007 8:12 am

@suvakas, wedge, nick:
concerning UV mapping in exported materials. Suvakas in your example files (btw thanks a lot for sharing) you used

Code: Select all

<uv_set>-none-</uv_set>
. What is the reason for that? How the user can rematch the uv to the mesh in maxigo?
[edit] I'am not sure if it wouldn't be better do agree on a common name for all exporters (ex "default" or "uv" or "uv1"). Btw can maxigo handle multiple UV sets?

Post Reply
42 posts

Who is online

Users browsing this forum: No registered users and 21 guests