Indigo material file format in the exporters

Feature requests, bug reports and related discussion
mrCarnivore
Posts: 517
Joined: Sun Mar 04, 2007 6:20 am
Location: Stuttgart, Germany

Post by mrCarnivore » Thu Mar 29, 2007 9:43 pm

radiance wrote:yeah,

but there is a difference between:

- new feature comes out and the experienced forum members start sharing experimental snippets.

- a material database which allows people to exchange materials with ease, geared towards the new users.

may i remind you that those funky SSS snipets were posted at the time that 0.7 exporters did'nt even exist ;-)
so the .igm format would'nt be usefull anyways ;-)

EDIT:
generally, i'd say that what belong in the matdb is:

- 0.6 materials
- 0.7 materials since the xml format freeze (eg they will work in 0.7t6, t7, ... and 0.7 final too)

radiance
That's exactly what I keep telling you. :-)

I think that we agree on all points except that you say that pre-release format useless since the exporters come out later anyway. So why not have it? Maybe exporters come out earlier next time and there is really no harm in having this extra tag. Otherwise if the exporeters DO come out before the xml-freeze people start sharing test materials via .igm WITHOUT the extra tag and nobody will ever know if they work or not in the next version. So I think this extra tag is VERY useful and useless at least. But there are absolutely no negative effects!

mrCarnivore
Posts: 517
Joined: Sun Mar 04, 2007 6:20 am
Location: Stuttgart, Germany

Post by mrCarnivore » Thu Mar 29, 2007 9:43 pm

OnoSendai wrote:Well, if the matdb ever gets finished (nudge nudge arneoog),
then I think only 'stable' materials should go in.
I think that's what we all agree on!

User avatar
OnoSendai
Developer
Posts: 6244
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Thu Mar 29, 2007 9:44 pm

mrCarnivore wrote:Which problem is that? Or is it too hard to explain?
Yes, it's rather hard to explain. Read the threads, (sorry, can't find the main one :) )

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

Post by zuegs » Fri Mar 30, 2007 5:30 am

@radiance: you burn my head :lol: - i thought about this when started with Blendigo but aborded it as Blender's-Python-Installation on Windows comes without XML-parser library and i was to lazy to find a free python-XML parser :cry: (please help).
But I can imagine that the Blendigo-GUI uses an inmemory-XML-tree to read or write material values and so can easily write material-files and complete XML scenes of course.

Please if someone knows about a very VERY lightweight XML-parser for python (with sources that can be redistributed) then give me a hint here or a PM, thank thanks thanks very VERY much! :)
And perhaps the same for ZLIB (zipper) :wink:

@Ono: do you mean zipped directories named "*.igm" in the same way as the Open-Document-Format used by OpenOffice? Which is a file with extension ".odt" but in fact it's a ".zip" file that contains all texts and images needed... ?

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Fri Mar 30, 2007 8:06 am

I will finish it on Monday or Tuesday maybe Wednesday
..or both.. It will be done by Friday!!! :lol: (I really do mean it)
I promise! :D Doesn't have much left :)


I really want to get it done :P
I will ofcourse make a 2.0 version too... ;)


Oh, and, I like the material file format :P
Will make everything much easier!

bkircher
Posts: 115
Joined: Thu Nov 23, 2006 6:24 am

Post by bkircher » Sun Apr 01, 2007 10:15 am

Ono mentioned on the first page of this thread that one
could use "the xml include feature"...

What's the syntax?

Apparently it's not:
<include>shaders\mti_ShaderBody_frostedGlass.xml</include>

?

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Sun Apr 01, 2007 10:20 am

This is the code :)

Code: Select all

<include>
	<pathname>mesh.xml</pathname>
</include>

bkircher
Posts: 115
Joined: Thu Nov 23, 2006 6:24 am

Post by bkircher » Sun Apr 01, 2007 10:23 pm

:shock:

System is too clever for me...

I try to break out a certain segment of a shader like the medium w. the following statement:
<include>
<pathname>
shaders/mti_ShaderMedium_frostedGlass.xml
</pathname>
</include>

and the system balks.
Do I have to make a complete Scene from it?
'Cause it would be really nice if the system could just dump in any xml codes...

User avatar
OnoSendai
Developer
Posts: 6244
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Post by OnoSendai » Sun Apr 01, 2007 10:41 pm

the included xml has to be inside <scenedata> tags, instead of <scene> tags.

User avatar
arneoog
Indigo 100
Posts: 504
Joined: Sun Jun 25, 2006 2:19 am
Contact:

Post by arneoog » Sun Apr 01, 2007 10:41 pm

The .xml that you're including have to have <scenedata> tags instead of <scene> tags :)

EDIT: HAHA! :lol: :P :D :)
EDIT2: They're posted at the excact same time too :shock: hehe :P
Last edited by arneoog on Sun Apr 01, 2007 10:45 pm, edited 2 times in total.

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Post by fused » Sun Apr 01, 2007 10:44 pm

tooo slow...

bkircher
Posts: 115
Joined: Thu Nov 23, 2006 6:24 am

Post by bkircher » Mon Apr 02, 2007 1:03 am

Thanks for the quick reply : :D

Alas, even though it's getting warmer :oops: it's still not working as I thought it would:

<include>
<pathname>shaders/mti_ShaderMedium_frostedGlass.xml</pathname>
</include>

<material>
<name>phong4SG</name>
<include>
<pathname>shaders/mti_ShaderBody_frostedGlass.xml</pathname>
</include>
</material>


mti_ShaderMedium_frostedGlass.xml reads like this:

<scenedata>
<medium>
<name>frostedGlassMedium</name>
<precedence>10</precedence>
<basic>
<ior>1.462</ior>
<cauchy_b_coeff>0.0</cauchy_b_coeff>
<absorption_coefficient_spectrum>
<uniform>
<value>0</value>
</uniform>
</absorption_coefficient_spectrum>
</basic>
</medium>
</scenedata>


mti_ShaderBody_frostedGlass.xml reads like this:
<scenedata>
<glossy_transparent>
<internal_medium_name>frostedGlassMedium</internal_medium_name>
<exponent>3000</exponent>
</glossy_transparent>
</scenedata>

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Post by fused » Mon Apr 02, 2007 2:13 am

should be like that:

<include>
<pathname>shaders/mti_ShaderMedium_frostedGlass.xml</pathname>
</include>


<include>
<pathname>shaders/mti_ShaderBody_frostedGlass.xml</pathname>
</include>


mti_ShaderMedium_frostedGlass.xml reads like this:

<scenedata>
<medium>
<name>frostedGlassMedium</name>
<precedence>10</precedence>
<basic>
<ior>1.462</ior>
<cauchy_b_coeff>0.0</cauchy_b_coeff>
<absorption_coefficient_spectrum>
<uniform>
<value>0</value>
</uniform>
</absorption_coefficient_spectrum>
</basic>
</medium>
</scenedata>


mti_ShaderBody_frostedGlass.xml reads like this:
<scenedata>
<material>
<name>phong4SG</name>
<glossy_transparent>
<internal_medium_name>frostedGlassMedium</internal_medium_name>
<exponent>3000</exponent>
</glossy_transparent>
</material>
</scenedata>

bkircher
Posts: 115
Joined: Thu Nov 23, 2006 6:24 am

Post by bkircher » Mon Apr 02, 2007 3:15 am

Thanks for the reply!

It works! :) | :( And doesn't, for what I wanted to do:

The Object-Export I rely on to export geometry from my 3d-package uses a certain naming that I can't influence except by jumping through a number of <damn what's the english term>.
Is there any way to pass an arbitrary subset of a xml-file into another xml-file? I guess the difference is that in the corrected form, the <material> statement encapsulated the other attributes. Is there something like a dummy that can do the same thing, or does xml know something like simple variables I could define the name in? :shock:

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

Post by suvakas » Mon Apr 02, 2007 3:58 am

I started to use .im7 format.
Next version of Maxigo will be able to import parameters for Diffuse, Phong and Medium/SSS materials using .im7 file. No texture bitmaps import now, but I will add them in later versions (hopefully).
.im7 looks exactly like Radiance proposed. The material is between <materialdata> tags. Everything else is the same as in xml file.

So it's like that:

Code: Select all

<materialdata>
	<material>
               blah blah..
	</material>
</materialdata>
If the <materialdata> tag is missing, then the file will not be imported.

Suvakas

Post Reply
48 posts

Who is online

Users browsing this forum: No registered users and 17 guests