Bi-layer, anistropic, multi-scattering microfacets

A picture is worth a thousand words.
atlas
Posts: 26
Joined: Thu Apr 16, 2015 12:01 am

Bi-layer, anistropic, multi-scattering microfacets

Postby atlas » Sat Sep 10, 2016 7:00 pm

Just posting a few shots of my pathtracer. The material system is a bi-layer, multi-scattering microfacet model, with anistropic roughness for all material types. The renderer is HDR, with the usual DOF, super-sampling, etc.

You can keep up with my renderer here: http://www.twitter.com/rove3d

Image

Image

Image

patlefort
Posts: 9
Joined: Sun Jun 21, 2015 11:11 pm

Re: Bi-layer, anistropic, multi-scattering microfacets

Postby patlefort » Mon Sep 12, 2016 8:57 am

Nice renders :)

I'm curious by what do you mean by bi-layer, multi-scattering microfacet model?

Is it GPU or CPU?

atlas
Posts: 26
Joined: Thu Apr 16, 2015 12:01 am

Re: Bi-layer, anistropic, multi-scattering microfacets

Postby atlas » Mon Sep 12, 2016 3:58 pm

When sampling a surface, every material type (conductor, dielectric, diffuse) has 2 layers. The top layer is a dielectric BSDF, so we can do things like clearcoats, varnish, etc. Light is either reflected, or transmitted towards the bottom layer. The bottom layer is the main material type. Attenuation is accounted for both going into and going out of these 2 layers. Both layers are microfacet models capable of anistropic or isotropic roughness. The model simulates 2-bounce scattering within the microfacets of the surface, which is more energy-preserving than the typical microfacet model where if a bounce faces the surface normal it is terminated.

It's a GPU renderer using OpenCL,

patlefort
Posts: 9
Joined: Sun Jun 21, 2015 11:11 pm

Re: Bi-layer, anistropic, multi-scattering microfacets

Postby patlefort » Wed Sep 14, 2016 6:02 am

Coincidentally I was looking at the problem of layers in the last few days trying to improve clear coating. It's possible to account exactly the amount of light reflected by the bottom layer if you assume that the light will hit the same microfacet always, just like you can do with a thin glass material. It's a simple geometric series and I came up with the following formula:

r is the fresnel reflectance from the light exiting the top layer, bottomColor is the reflected color by the bottom layer. prtselect is a function that select the first argument is the 3th argument is true or the 2th if false for each individual components.

Code: Select all

inline Color dualLayerRefl(const Color &r, const Color &bottomColor)
{
   const auto t = White - r;
   const auto bt = bottomColor * t;
      
   return bt +
      pow2(bt) * (
         r + r * bottomColor * (prtselect(t.reciprocal(), White, t > 0) - White)
      );
}

// Then you use it like this: F is the fresnel reflectance from the light entering the top layer
colorReflected = dualLayerRefl(r, bottomColor) * (White - F);


*EDIT* I adjusted my function which didn't handle bottomColor value higher than 1.


Return to “Visuals”

Who is online

Users browsing this forum: No registered users and 4 guests