I'm trying to build a toy path tracer using something similar to Disney's BSDF, where many materials can be represented as combinations of properties like color, metalness, roughness, transmission, ior.

I'd like to use the GGX microfacet BSDF, but without splitting the ray each time to get & sum the Fr and Ft terms for reflection and transmission. Is it normal/ok to use schlick's approximation to randomly choose between transmission and reflection (Ft vs Fr), and then to just use the BRDF and BTDF formulas separately depending on which path the system chooses?

For example, roughly:

On hit (into)
- Reflect or Transmit via Schlick(i, o, n)
    - Reflect:
        - Direct (N times):
            - Choose point on disc of random light
            - Calc transmission t via BRDF(i, o, n)
            - Calc pdf by area of cone / area of hemisphere
            - Add light * t / pdf
        - Indirect (1 time):
            - Choose direction o by BRDF.Sample(i, n)
            - Calc transmission t via BRDF(i, o, n)
            - Calc pdf by BRDF.PDF(i, o, n) ??
            - Add trace(o) * t / pdf
    - Transmit:
        - Choose direction o by snell(i, n) + some kind of roughness * offset
        - (how do you apply the BTDF here? Or is it important?)
On hit (out of)
    - Choose direction o by snell(i, n) + some kind of roughness * offset
    - Reduce transmission via beer(distance)

I also wonder how diffused reflections factor in. For instance, does GGX only provide specular reflection & refraction? In that case, how do you also handle diffusion?

  • It is okay to use Fresnel term as a pdf to choose between reflection and refraction. Because this estimator will contain a Fresnel term on both nominator and denominator, they are cancelled. So, you can directly use brdf or btdf. – Mustafa Işık May 30 at 4:40
up vote 1 down vote accepted

In current common material models, Diffuse and Specular material properties are handled separately.

Check out slide 43 on http://blog.selfshadow.com/publications/s2015-shading-course/hoffman/s2015_pbs_physics_math_slides.pdf

Basically use a diffuse BRDF (lambert, oren nayar) if the material's refraction is scattering is less than 1 pixel. Use refraction and subsurface models if the scattering is larger than a pixel. I.e. in a glass refraction case the light exit is much greater than 1 pixel away from the light entrance.

You may also be interested in a diffuse parameterization for GGX so that you can use share the same roughness term. https://www.gdcvault.com/play/1024478/PBR-Diffuse-Lighting-for-GGX

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.