New glossy translucent material

Discussion related to the LuxRender Material system, programming API and Scene file format.

Moderators: jromang, tomb, zcott, coordinators

New glossy translucent material

Postby paco » Thu Oct 14, 2010 5:22 am

I've been hacking away at the source code and have created a new glossy translucent material, based on the original glossy material. Basically it has a specular layer on top (fresnel). Any light getting through the specular layer gets diffusely reflected or transmitted - based on a transmission value. I designed it originally to use as a leaf material - so that it could work as a single layer. A demo of the material is below - please excuse the scene in general - i'm pretty lousy at this sort of thing.

leaves_test.jpg
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: New glossy translucent material

Postby drBouvierLeduc » Thu Oct 14, 2010 5:29 am

Very nice addition. Is it in the source code yet ? Or maybe you can provide a patch so we can test this ? Looking forward to try this material.
User avatar
drBouvierLeduc
 
Posts: 32
Joined: Sun Oct 14, 2007 8:42 pm

Re: New glossy translucent material

Postby jeanphi » Thu Oct 14, 2010 6:26 am

Hi,

I was considering such a material for a long time, that's why I'd like to find some time to work out a proper layering system. Adding such a material right now is pretty straightforward though, it could probably be easily added in mainline.

Jeanphi
jeanphi
Developer
 
Posts: 6570
Joined: Mon Jan 14, 2008 7:21 am

Re: New glossy translucent material

Postby tomb » Thu Oct 14, 2010 8:02 am

Nice! :) As Jeanphi says, should be straight forward to add to the main trunk. If a generic multi-layer system is added at some later time it will potentially replace several materials, so lets cross that bridge when we come to it :)

Just do a hg bundle (or a diff) and post it here (or mail us) and we'll review/add it
User avatar
tomb
Developer
 
Posts: 1918
Joined: Thu Oct 11, 2007 4:23 pm
Location: Oslo, Norway

Re: New glossy translucent material

Postby paco » Fri Oct 15, 2010 3:09 am

Am happy to provide the source - it's only two files. I just need to tidy it up first. Currently the backface of the material only implements diffuse transmission/reflection - ie, there is no specular component when looking from behind. Am wondering if it might be better to have a different specular for each face to add some generality to it (could always set it to black by default). Heres another example:
test_mat.jpg

Same mat just altered the transmission value (left to right) = 0.0, 0.5, 1.0
The pattern on the right one is due to light reflecting off the plane and hitting the backface.
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: New glossy translucent material

Postby jeanphi » Fri Oct 15, 2010 3:43 am

Hi,

I think there are 2 use cases:
- apply the material to a closed shape (a sphere for example): the backface should be diffuse only
- apply the material to an open shape (a leaf for example): the backface should have glossiness too

So a bool parameter ("onesided" for example) should be enough to select between both behaviours.

Jeanphi
jeanphi
Developer
 
Posts: 6570
Joined: Mon Jan 14, 2008 7:21 am

Re: New glossy translucent material

Postby paco » Fri Oct 15, 2010 4:05 am

So bool for onesided. If true then select spec distribution independently for each face? A leaf has less gloss on it's undersurface for example.
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: New glossy translucent material

Postby jeanphi » Fri Oct 15, 2010 4:14 am

Hi,

Actually the backface will be glossy if the onesided option is false. And if you think that the backface should have different value then so be it, the material has to be usefull for users. So you'll have 2 sets of Ks color, uroughness, vroughness and multibounce, right?

Jeanphi
jeanphi
Developer
 
Posts: 6570
Joined: Mon Jan 14, 2008 7:21 am

Re: New glossy translucent material

Postby paco » Fri Oct 15, 2010 5:33 am

Yes, i'll duplicate those parameters. How about I just add the prefix "backface_" to them and keep the standard ones as the frontface? Ie, "backface_Ks", "backface_uroughness" etc ?
paco
Developer
 
Posts: 456
Joined: Sun Feb 07, 2010 1:37 am

Re: New glossy translucent material

Postby jeanphi » Fri Oct 15, 2010 6:26 am

Hi,

We usually don't have "_" in parameter names, but fine with me.

Jeanphi
jeanphi
Developer
 
Posts: 6570
Joined: Mon Jan 14, 2008 7:21 am

Next

Return to Materials, API & Scene file format

Who is online

Users browsing this forum: No registered users and 0 guests