Coating material thread

General questions about Indigo, the scene format, rendering etc...
User avatar
OnoSendai
Developer
Posts: 6241
Joined: Sat May 20, 2006 6:16 pm
Location: Wellington, NZ
Contact:

Coating material thread

Post by OnoSendai » Fri Nov 30, 2012 4:15 am

This thread is for information, questions about, and renders of the new coating material.

User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

Re: Coating material thread

Post by Whaat » Fri Nov 30, 2012 9:46 am

OnoSendai wrote:This thread is for information, questions about, and renders of the new coating material.
How about XML for the coating material and the double-side material? :)

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

Re: Coating material thread

Post by OnoSendai » Fri Nov 30, 2012 9:48 am

Coating XML:

Code: Select all

<material>
    <name>default</name>

    <coating>
      <ior>1.5</ior>
      <substrate_material_uid>1000</substrate_material_uid>

      <exponent>
        <constant>
          10000
        </constant>
      </exponent>

      <thickness>
        <shader>
          <shader>
            <![CDATA[
            def thickness_um() real : 3.0 + 6.0 * fbm(
              getTexCoords(0) + 
                vec2(
                  fbm(getTexCoords(0) * 40.0, 3), 
                  fbm(getTexCoords(0) * 50.0, 3)
                 ) * 0.1
               ,
               1)
            
						def eval(vec3 pos) real :
							0.000001 * thickness_um()
							
						]]>
          </shader>
        </shader>
      </thickness>
    </coating>
  </material>

By the way you can always see the XML by saving out an IGM material and checking that out :)

User avatar
Whaat
Developer
Posts: 1827
Joined: Fri Dec 22, 2006 6:15 am
Location: Canada
Contact:

Re: Coating material thread

Post by Whaat » Fri Nov 30, 2012 9:50 am

OnoSendai wrote: By the way you can always see the XML by saving out an IGM material and checking that out :)
But I need to know NOW!! :) I'm at work and away from my Indigo... :(

Thx ono

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

Re: Coating material thread

Post by OnoSendai » Fri Nov 30, 2012 9:52 am

Whaat wrote:
OnoSendai wrote: By the way you can always see the XML by saving out an IGM material and checking that out :)
But I need to know NOW!! :) I'm at work and away from my Indigo... :(

Thx ono
Ha ok :)

FakeShamus
Posts: 512
Joined: Wed May 02, 2007 11:34 am

Re: Coating material thread

Post by FakeShamus » Mon Dec 03, 2012 5:12 am

Hi Ono,
is there an alternate way to define the substrate material, other than referencing the material_uid? could material name be used instead (sort of like you would do for a blend material - defining the substrate material first and then using it within the coated material definition)? as it is you can't save a material and then re-use it later.

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

Re: Coating material thread

Post by CTZn » Mon Dec 03, 2012 5:44 am

Hi FakeShamus,

Some of the new features coming with 3.6 beta are not finalized yet, please check out Ono's answer to suvakas on the matter:

http://www.indigorenderer.com/forum/vie ... 18#p119118
obsolete asset

FakeShamus
Posts: 512
Joined: Wed May 02, 2007 11:34 am

Re: Coating material thread

Post by FakeShamus » Mon Dec 03, 2012 5:46 am

ah, I see.
thanks

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

Re: Coating material thread

Post by OnoSendai » Tue Dec 04, 2012 1:58 am

FakeShamus wrote:Hi Ono,
is there an alternate way to define the substrate material, other than referencing the material_uid? could material name be used instead (sort of like you would do for a blend material - defining the substrate material first and then using it within the coated material definition)? as it is you can't save a material and then re-use it later.
Hi FakeShamus,
We're generally moving towards a UID based approach, instead of binding by name.

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

Re: Coating material thread

Post by suvakas » Wed Dec 05, 2012 2:44 am

Is there any info available about the UID ?
Like how to use it inside Indigo mesh?

Suv

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

Re: Coating material thread

Post by OnoSendai » Wed Dec 05, 2012 3:27 am

suvakas wrote:Is there any info available about the UID ?
Like how to use it inside Indigo mesh?

Suv
Hi Suv,
UIDs just have to be different (unique) for every node in the scene.

The material UIDs are not stored in the mesh - they are stored in the model2 element in the scene XML. Try serialising a scene with the Indigo GUI (saving a scene) and check out the model2 XML.

nick

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

Re: Coating material thread

Post by suvakas » Wed Dec 05, 2012 3:57 am

Hey Nick,

Ok, good idea. Will do so.
But wasn't there a list of used materials also inside igmesh file?

Suv

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

Re: Coating material thread

Post by OnoSendai » Wed Dec 05, 2012 4:36 am

suvakas wrote:Hey Nick,

Ok, good idea. Will do so.
But wasn't there a list of used materials also inside igmesh file?

Suv
Yeah, there used to be a list of material names inside the igmesh file. But it was a bad idea to store the material names in the mesh :)

StompinTom
Indigo 100
Posts: 1828
Joined: Mon Sep 04, 2006 3:33 pm

Re: Coating material thread

Post by StompinTom » Thu Dec 06, 2012 5:24 am

When using a texture to control coating thickness, the input field could use a couple more decimal places! It's not possible to enter 0.0000001, for example... Perhaps a multiplier?

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

Re: Coating material thread

Post by OnoSendai » Thu Dec 06, 2012 5:42 am

StompinTom wrote:When using a texture to control coating thickness, the input field could use a couple more decimal places! It's not possible to enter 0.0000001, for example... Perhaps a multiplier?
It's in micrometres, you don't need a value that small :)

EDIT: Ah, the texture scale (b) control is in metres.

Post Reply
19 posts

Who is online

Users browsing this forum: No registered users and 91 guests