knightcrawler25 / Optix-PathTracer

Simple physically based path tracer based on Nvidia's Optix Ray Tracing Engine
317 stars 36 forks source link

Question about subsurface scattering #8

Closed straaljager closed 4 years ago

straaljager commented 5 years ago

Hi,

I tried the SSS material provided by the Disney BRDF in this path tracer, but I couldn't achieve the nice translucency effect of subsurface scattering.

Below is a description of the SSS material

material sss { color 0.79 0.8 0.04 roughness 0.17 specular 0.5 subsurface 1.0 clearcoat 1.0 clearcoatGloss 0.93 }

sss_optix For comparison, the same scene in Blender: sss_blender

Any tips on how to achieve this effect?

knightcrawler25 commented 5 years ago

The BRDF model used here is from this paper:

https://blog.selfshadow.com/publications/s2012-shading-course/burley/s2012_pbs_disney_brdf_notes_v3.pdf

A paragraph from it reads: "Our subsurface parameter blends between the base diffuse shape and one inspired by the HanrahanKrueger subsurface BRDF. This is useful for giving a subsurface appearance on distant objects and on objects where the average scattering path length is small; it’s not, however, a substitute for doing full subsurface transport as it won’t bleed light into the shadows or through the surface"

The one Blender Cycles and PBRT v3 use is a newer model with path traced subsurface scattering, which is probably why you do not see the same results when you compare it with Cycles: https://blog.selfshadow.com/publications/s2015-shading-course/burley/s2015_pbs_disney_bsdf_notes.pdf

straaljager commented 5 years ago

Thanks for the clarification. In that case I will try to implement the Cycles SSS shader myself.

Cheers!

knightcrawler25 commented 5 years ago

You can have a look at Tinsel (https://github.com/mmacklin/tinsel) for some implementation details on the Principled shader.

straaljager commented 5 years ago

The SSS in the Tinsel screenshot looks more realistic indeed, Will have a look, thanks.