Multi layer material with thickness

General discussion about Indigo Materials - material requests, material developement, feedback, etc..
User avatar
Jambert
Indigo 100
Posts: 545
Joined: Wed Jul 30, 2008 10:08 pm
Location: France, Lyon

Multi layer material with thickness

Post by Jambert » Wed Feb 17, 2010 2:41 am

Hi all,

these days, I tried to make realistic "varnish wood" material. The best way appear to be simple phong with map. Blended method is a limited, it just mix to material on a same plane. The result of blending a diffuse mat and glossy mat is that material looks darkish and doesn't change of color, without real control of glossyness.

Would be nice if each blended material get is own geometry, generate as an instance using displacement to get thickness. In real life, paint get is own thickness.Today it's possible to create a wood material with a single map for color, easy. But it's impossible (or I don't know how) to use paints materials to apply on it with full control of glossyness, color,..., would be realy a professional tool.

Thx

Sorry for my poor english
Attachments
Blended.pigm
Diffuse + Glossy
(834.18 KiB) Downloaded 282 times
Hetre aboute.png
diffuse (used for blended mat)
Hetre aboute.png (368.53 KiB) Viewed 7050 times
Hetre aboute vn.png
Phong with yellowish map
Hetre aboute vn.png (370.94 KiB) Viewed 7046 times
Vernis naturel.png
Yellow/brown Varnish
Vernis naturel.png (355.26 KiB) Viewed 7052 times
Yellow varnish.png
Blended 0.7 diffuse and 0.3 glossy yellow varnish
Yellow varnish.png (422.85 KiB) Viewed 7046 times
Vernis bleu.png
Blue varnish
Vernis bleu.png (445.88 KiB) Viewed 7046 times
Blue varnish.png
Blended 0.7 diffuse and 0.3 glossy blue varnish
Blue varnish.png (426.32 KiB) Viewed 7046 times
Last edited by Jambert on Wed Feb 17, 2010 7:30 pm, edited 1 time in total.

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

Re: Multi layer material with thickness

Post by StompinTom » Wed Feb 17, 2010 4:07 am

Doubling the geometry for every blended material is hard to justify. Also, what happens when you have different materials assigned to different parts of the mesh?

I'd rather have that handled by the shader system itself, instead of being related to the geometry of the scene.

User avatar
Jambert
Indigo 100
Posts: 545
Joined: Wed Jul 30, 2008 10:08 pm
Location: France, Lyon

Re: Multi layer material with thickness

Post by Jambert » Wed Feb 17, 2010 4:56 am

StompinTom wrote:Also, what happens when you have different materials assigned to different parts of the mesh?.
I just made suggestions, I just don't know how it can be done. All I know is that today, something is missing here.

Thickness of multilayer is a real problem to me. A first step can be improvements of blended material. Would be great to have gradient for each values:

color: 0.2 matA / 0.8 matB
Glossy: 0.6 matA / 0.4 matB
...
and maybe different mode as photoshop

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Multi layer material with thickness

Post by galinette » Wed Feb 17, 2010 5:28 am

Yes, that's definitely a shader work, with layered material simulation. The problem today is the lack of possibility to design a full-custom BRDF, which would make that possible. I currently have that issue for coding "real" coated glass ( which cannot be correctly described or even faked in Indigo)

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

User avatar
Jambert
Indigo 100
Posts: 545
Joined: Wed Jul 30, 2008 10:08 pm
Location: France, Lyon

Re: Multi layer material with thickness

Post by Jambert » Wed Feb 17, 2010 5:45 am

I see what you meen. Shaders are still a bit "abstract" to me. You're suggestions are based on volumetric shaders? no?

User avatar
galinette
1st Place Winner
Posts: 923
Joined: Sat Jan 09, 2010 1:39 am
Location: Nantes, France
Contact:

Re: Multi layer material with thickness

Post by galinette » Wed Feb 17, 2010 11:04 am

No, just simple BRDF surfacic shaders.

Basically, if your shader function has access to the inbound and outbound ray vectors (ie the directions of light arriving at and leaving the considered surface point), and the wavelength, you can basically describe any surface material effect (that means, excluding all volumetric and SSS effects)

In your case, I'm sure there is no need for real volumetric effect. Your varnish has some kind of medium absorption, that's true. But as it is applied as a thin layer on the surface, you can make some simplifications and avoid the bi layered model, while keeping a very good looking material. For this, you consider that light is first reflected on the varnish surface, then partially transmitted through it, absorbed by the varnish die, diffused/phonged on the wood, then absorbed again through the varnish, and exiting the surface. From this, you build a global reflection coefficient as a function of inbound and outbound ray vectors. That's nothing else than a BRDF. My explanation is simplified and still not very clear I'm sure... But if I have access to these vectors, I could do what you want quite easily.

This is currently not implemented in Indigo, I guess because letting the user define its own BRDF is shitty to implement in PT/MLT renderers ( requires a kind of spherical probability distribution inversion which is hard to implement in a reliable way for user defined functions - Onosendai, am I right?) but I dream of it.

Etienne
Eclat-Digital Research
http://www.eclat-digital.com

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

Re: Multi layer material with thickness

Post by OnoSendai » Wed Feb 17, 2010 11:15 am

Fully User defined BRDFs aren't available for a couple of reasons:
* The API changes quite often
* It's rather tricky to code a BRDF, including importance sampling and probability density evalation correctly. I prefer to do it myself :)

User avatar
PureSpider
Posts: 1459
Joined: Tue Apr 08, 2008 9:37 am
Location: Karlsruhe, BW, Germany
Contact:

Re: Multi layer material with thickness

Post by PureSpider » Wed Feb 17, 2010 11:49 am

OnoSendai wrote:* It's rather tricky to code a BRDF, including importance sampling and probability density evalation correctly. I prefer to do it myself :)
DO IT! :lol:

User avatar
Jambert
Indigo 100
Posts: 545
Joined: Wed Jul 30, 2008 10:08 pm
Location: France, Lyon

Re: Multi layer material with thickness

Post by Jambert » Wed Feb 17, 2010 7:28 pm

OnoSendai wrote:Fully User defined BRDFs aren't available for a couple of reasons:
* The API changes quite often
* It's rather tricky to code a BRDF, including importance sampling and probability density evalation correctly. I prefer to do it myself :)
Nice to hear :)
galinette wrote:No, just simple BRDF surfacic shaders.

Basically, if your shader function has access to the inbound and outbound ray vectors (ie the directions of light arriving at and leaving the considered surface point), and the wavelength, you can basically describe any surface material effect (that means, excluding all volumetric and SSS effects)

In your case, I'm sure there is no need for real volumetric effect. Your varnish has some kind of medium absorption, that's true. But as it is applied as a thin layer on the surface, you can make some simplifications and avoid the bi layered model, while keeping a very good looking material. For this, you consider that light is first reflected on the varnish surface, then partially transmitted through it, absorbed by the varnish die, diffused/phonged on the wood, then absorbed again through the varnish, and exiting the surface. From this, you build a global reflection coefficient as a function of inbound and outbound ray vectors. That's nothing else than a BRDF. My explanation is simplified and still not very clear I'm sure... But if I have access to these vectors, I could do what you want quite easily.

This is currently not implemented in Indigo, I guess because letting the user define its own BRDF is shitty to implement in PT/MLT renderers ( requires a kind of spherical probability distribution inversion which is hard to implement in a reliable way for user defined functions - Onosendai, am I right?) but I dream of it.

Etienne
Thanks for explanation, I definitly need to work with shaders. It's true, that material doesn't realy need volumetric effect. But would be realy nice if color could be change without changing map color, as it is in real life :) . will wait for Ono's improvement :twisted:

User avatar
Meelis
Posts: 383
Joined: Sat Mar 14, 2009 11:29 pm
Location: Estonia

Re: Multi layer material with thickness

Post by Meelis » Wed Feb 17, 2010 8:35 pm

U may blend with texture map :!:
Diffuse + phong, or oren-nayar + phong.
Looks more 3d because more contrast between mirror and rough surface.

U can create another object 0,1mm high on top of wood with specular material.

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

Re: Multi layer material with thickness

Post by CTZn » Wed Feb 17, 2010 9:14 pm

There is an inmediate solution wich would indeed require to double the meshes to coat. It also involves displacement but subdivisions are not mandatory.

- Duplicate the (wood) mesh.
- assign a new material to the duplicate, either a specular or a glossy.
- If allowed by blendigo, assign a constant value as displacement to that new material. 1mm or 2, just make sure to be above the minimum allowed. If you can't set a single value as displacement, use a plain white texture and set the gain to the value suggested above.

As a result, the displaced mesh will act physically as a coating to the original mesh. I recommend the use of a faint absorbing layer to simulate older coatings.
obsolete asset

User avatar
Jambert
Indigo 100
Posts: 545
Joined: Wed Jul 30, 2008 10:08 pm
Location: France, Lyon

Re: Multi layer material with thickness

Post by Jambert » Wed Feb 17, 2010 9:37 pm

Thanks both for your help. Make me think about "additionnal blending mode", material won't be blended but added. Each material generate is own geometry as instance, thickness is generated by displacement? does it make sence? Actualy it can be done manualy as you said, but it's a bit heavy and hard to preview, would be nice if it can be done in material editor.

User avatar
Godzilla
Indigo 100
Posts: 985
Joined: Sat Jun 06, 2009 11:33 am

Re: Multi layer material with thickness

Post by Godzilla » Thu Feb 18, 2010 12:18 am

Are material coatings still in developement, Ono?

User avatar
Meelis
Posts: 383
Joined: Sat Mar 14, 2009 11:29 pm
Location: Estonia

Re: Multi layer material with thickness

Post by Meelis » Thu Feb 18, 2010 4:47 am

Hi

I did some tests.

Wood
0,5h on c2d e7400
Image


And 0,15 mm specular glossy transparent on top of wood,
exp 10K, ior 1.5, gain 40
R 0.642 G 0.815 B 1.000
3,5h ~1400spp
Image

It really needs bump and or exponent map -- way too flat.
It looks somewhat glossy i guess :roll:
Attachments
Floor.pigm
(7.66 MiB) Downloaded 259 times

User avatar
Pibuz
1st Place 100
Posts: 2646
Joined: Tue Dec 11, 2007 7:58 am
Location: Padua, Italy
3D Software: SketchUp

Re: Multi layer material with thickness

Post by Pibuz » Thu Feb 18, 2010 6:19 am

Hi Meelis.
I see something strange is happening to your floor, more that bump value too low.. :?

Post Reply
26 posts

Who is online

Users browsing this forum: No registered users and 28 guests