Page 1 of 2

Double-sided thin material thread

Posted: Fri Nov 30, 2012 4:15 am
by OnoSendai
This thread is for information, questions about, and renders of the new double sided thin material.

The double-sided thin material was designed for making leaf and similar materials.

It's for use on a single flat polygon, e.g. not at the interface of a medium.

The material describes a BSDF that captures the features you would expect from light scattering of a thin slab of material with rough surfaces, such as a leaf.

The parameters:

IOR: This is the index of refraction of the thin slab.

Front material: For light that is reflected diffusely back from the front surface, the front material controls the distribution of such light. Should be diffuse or Oren-Nayar. This material would be, for a leaf example, a diffuse material using the front-side albedo texture of your leaf.

Back material. For light that is reflected diffusely back from the back surface, the back material controls the distribution of such light. Should be diffuse or Oren-Nayar. This material would be, for a leaf example, a diffuse material using the back-side albedo texture of your leaf.

r_f: this is the fraction of light that enters the slab that is reflected back to the side it came from.
A good default value is 0.5

Transmittance: Some light scatters right through the slab and out the other side. The transmittance controls the absorption of such light. This is where you would use, for example, your transmittance map of a leaf.

Front Fresnel scale: A factor that controls the intensity of the specular scattering off the front interface of the slab. Default value is 1.

Front Fresnel scale: A factor that controls the intensity of the specular scattering off the back interface of the slab. Default value is 1.

Front Exponent: Controls the roughness of the front interface of the slab.

Back Exponent: Controls the roughness of the back interface of the slab.

Re: Double-sided thin material thread

Posted: Fri Nov 30, 2012 8:05 am
by Zom-B
Thanks a lot for explanation Ono, but I still have some questions regarding the front & top mats:

You suggest to use diffuse or ON material for front and back of the leafs and then set some fresnel scale & exponent.
Why don't use Phong here that already has both inside material definition? With the new fresnel scale, the transition from Diffuse to Phong (and back) should be seamlessly now.

In My first tests I mixed two Diffuse leaf materials together using a Double Sided material.
Problem was that both Alpha PNG lost the alpha in the DS material.

Why is there a bump & Displacement control for the double Sided material... shouldn't that be controled by the both materials used for front & back?!

Why is there a general IOR value used for back & front of the material? Shouldn't the back has some other value possible!

Re: Double-sided thin material thread

Posted: Fri Nov 30, 2012 9:44 am
by OnoSendai
Hi Zom-B,
Using a phong for the front or back material would give a different result due to the interaction between the coating and transparency.

It's not really possible for both the front and back to have displacement at the same time, considering that this is designed for a single flat surface. It's technically possible for bump but would be kind of weird.

I think that for e.g. a leaf or paper, the IOR is mostly the same all through the object.

Re: Double-sided thin material thread

Posted: Fri Nov 30, 2012 9:49 am
by OnoSendai
XML code:

Code: Select all

<material>
		<name>double sided</name>

		<double_sided_thin>
      <front_material_uid>100</front_material_uid>
      <back_material_uid>101</back_material_uid>

      <r_f>
        <constant>
         0.5
        </constant>
      </r_f>

      <transmittance>
        <constant>
          <rgb>
            <rgb>0 0 1</rgb>
            <gamma>1</gamma>
          </rgb>
        </constant>
      </transmittance>

      <front_exponent>
        <constant>1000</constant>
      </front_exponent>
      <back_exponent>
        <constant>1000</constant>
      </back_exponent>

      <front_fresnel_scale>
        <constant>1</constant>
      </front_fresnel_scale>

      <back_fresnel_scale>
        <constant>1</constant>
      </back_fresnel_scale>

      <ior>1.5</ior>

    </double_sided_thin>
	</material>

Re: Double-sided thin material thread

Posted: Fri Nov 30, 2012 7:56 pm
by Zom-B
OnoSendai wrote:Using a phong for the front or back material would give a different result due to the interaction between the coating and transparency.
Well, you know here best for sure :)
I just was a little shocked by that quite complex setup for this material, and thought this could be made "easier" somehow :)
OnoSendai wrote:It's not really possible for both the front and back to have displacement at the same time, considering that this is designed for a single flat surface. It's technically possible for bump but would be kind of weird.
But most leafs have this situation! A nice 3D scan of a leaf that shows the different "bump" on top & bottom can bee seen here.
So atm, do you ignore Bump/normal mapping on both materials used for DS material, and use only the DS setting?

I think that for e.g. a leaf or paper, the IOR is mostly the same all through the object.[/quote]I don't think so mate. Leafs have a "waxy reflective coating" on the upper side to protect the leaf of dehydration, that covering is different on the bottom of most leafs:
see here and here

Re: Double-sided thin material thread

Posted: Fri Nov 30, 2012 11:30 pm
by ENSLAVER
The material doesn't update in the rendering (even though it restarts) when you change the diffuse material of the front/back materials unless you change one of the parameters in the Double-Sided thin material.

edit: win7 x64 (x64 build) - also happens on coating material?

It's lots of fun to play with :D

Re: Double-sided thin material thread

Posted: Sat Dec 01, 2012 12:11 am
by pixie
ENSLAVER wrote:The material doesn't update in the rendering (even though it restarts) when you change the diffuse material of the front/back materials unless you change one of the parameters in the Double-Sided thin material.

edit: win7 x64 (x64 build)

It's lots of fun to play with :D
you have to re-apply them.

Re: Double-sided thin material thread

Posted: Sat Dec 01, 2012 1:39 am
by ENSLAVER
Those grass on grass shadows are something I've been trying to do for years!

Re: Double-sided thin material thread

Posted: Sat Dec 01, 2012 1:41 am
by OnoSendai
Nice one Enslaver!

Re: Double-sided thin material thread

Posted: Sat Dec 01, 2012 1:44 am
by OnoSendai
Zom-B wrote:]I don't think so mate. Leafs have a "waxy reflective coating" on the upper side to protect the leaf of dehydration, that covering is different on the bottom of most leafs:
Yes, but does the waxy coating have a different IOR than the bottom of the leaf?

Re: Double-sided thin material thread

Posted: Sat Dec 01, 2012 1:45 am
by OnoSendai
ENSLAVER wrote:The material doesn't update in the rendering (even though it restarts) when you change the diffuse material of the front/back materials unless you change one of the parameters in the Double-Sided thin material.

edit: win7 x64 (x64 build) - also happens on coating material?
Yup, will fix this issue ASAP.

Re: Double-sided thin material thread

Posted: Wed Dec 05, 2012 6:58 am
by OnoSendai
Basic leaf material using double-sided thin:

Re: Double-sided thin material thread

Posted: Sat Feb 16, 2013 5:31 am
by OnoSendai
Added this material, tweaked a little bit, to the MatDB:

http://www.indigorenderer.com/materials/materials/1158

Re: Double-sided thin material thread

Posted: Sat Feb 16, 2013 5:51 am
by ritter
OnoSendai wrote:Added this material, tweaked a little bit, to the MatDB:

http://www.indigorenderer.com/materials/materials/1158
Thank you .

"Requires Indigo 3.6.7 or newer."

Have i missed something ?

Re: Double-sided thin material thread

Posted: Sat Feb 16, 2013 6:01 am
by OnoSendai
No, you're not missing anything :)
Hope to release it in 1 hour or so :)