Double-sided thin material thread

General questions about Indigo, the scene format, rendering etc...
User avatar
OnoSendai
Developer
Posts: 6179
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Double-sided thin material thread

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

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.

User avatar
Zom-B
1st Place 100
Posts: 4640
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: Double-sided thin material thread

Post by Zom-B » Fri Nov 30, 2012 8:05 am

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!
polygonmanufaktur.de

User avatar
OnoSendai
Developer
Posts: 6179
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: Double-sided thin material thread

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

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.

User avatar
OnoSendai
Developer
Posts: 6179
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: Double-sided thin material thread

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

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>

User avatar
Zom-B
1st Place 100
Posts: 4640
Joined: Tue Jul 04, 2006 4:18 pm
Location: ´'`\_(ò_Ó)_/´'`
Contact:

Re: Double-sided thin material thread

Post by Zom-B » Fri Nov 30, 2012 7:56 pm

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
polygonmanufaktur.de

User avatar
ENSLAVER
Posts: 399
Joined: Tue Feb 20, 2007 1:49 am

Re: Double-sided thin material thread

Post by ENSLAVER » Fri Nov 30, 2012 11:30 pm

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
Last edited by ENSLAVER on Sat Dec 01, 2012 1:07 am, edited 1 time in total.

User avatar
pixie
Indigo 100
Posts: 2197
Joined: Sat Dec 29, 2007 4:54 am
Location: Away from paradise
Contact:

Re: Double-sided thin material thread

Post by pixie » Sat Dec 01, 2012 12:11 am

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.

User avatar
ENSLAVER
Posts: 399
Joined: Tue Feb 20, 2007 1:49 am

Re: Double-sided thin material thread

Post by ENSLAVER » Sat Dec 01, 2012 1:39 am

Those grass on grass shadows are something I've been trying to do for years!
Attachments
grassy.jpg

User avatar
OnoSendai
Developer
Posts: 6179
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: Double-sided thin material thread

Post by OnoSendai » Sat Dec 01, 2012 1:41 am

Nice one Enslaver!

User avatar
OnoSendai
Developer
Posts: 6179
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: Double-sided thin material thread

Post by OnoSendai » Sat Dec 01, 2012 1:44 am

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?

User avatar
OnoSendai
Developer
Posts: 6179
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: Double-sided thin material thread

Post by OnoSendai » Sat Dec 01, 2012 1:45 am

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.

User avatar
OnoSendai
Developer
Posts: 6179
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: Double-sided thin material thread

Post by OnoSendai » Wed Dec 05, 2012 6:58 am

Basic leaf material using double-sided thin:
Attachments
double sided thin leaf.jpg
double-sided-thin-leaf.pigm
(5.46 MiB) Downloaded 315 times

User avatar
OnoSendai
Developer
Posts: 6179
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: Double-sided thin material thread

Post by OnoSendai » Sat Feb 16, 2013 5:31 am

Added this material, tweaked a little bit, to the MatDB:

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

ritter
Indigo 100
Posts: 202
Joined: Wed Jul 29, 2009 8:15 pm

Re: Double-sided thin material thread

Post by ritter » Sat Feb 16, 2013 5:51 am

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 ?

User avatar
OnoSendai
Developer
Posts: 6179
Joined: Sat May 20, 2006 6:16 pm
Location: Newcastle upon Tyne, UK
Contact:

Re: Double-sided thin material thread

Post by OnoSendai » Sat Feb 16, 2013 6:01 am

No, you're not missing anything :)
Hope to release it in 1 hour or so :)

Post Reply
19 posts

Who is online

Users browsing this forum: No registered users and 2 guests