2
$\begingroup$

Looking around here on various sources (including related questions on this site), if my understanding is correct, when implementing a path tracer with a material which has both a diffuse term and a specular term, we can randomly choose whether to evaluate the diffuse or the specular ray then divide the result by the probability of choosing diffuse or specular.

For example if we have a material 50% specular, we would have:

If diffuse ray was chosen:

$\frac{DiffuseBRDF*incomingLight}{0.5}$

If specular ray was chosen:

$\frac{SpecularBRDF*incomingLight}{0.5}$

Once diffuse/specular is chosen, we have to find which ray exactly we want to use for $incomingLight$. In my case I have a rough dieletric surface (not a perfect mirror) and I would like to use importance sampling and use for example a cosine weighted pdf for diffuse and a NDF weighted pdf for the specular term. I couldn't find a source for this particular case, but If my understanding is correct, I would end up with either:

$\frac{DiffuseBRDF*incomingLight}{0.5*DiffusePdf}$

if diffuse was chosen, or:

$\frac{SpecularBRDF*incomingLight}{0.5*SpecularPdf}$

if specular was chosen. Is this result correct?

$\endgroup$
2
  • $\begingroup$ This BRDF is normally defined as a mix of diffuse and an specular component with a lob. The specular component normally is defined using microfacets reflection model. Have a look at FresnelBlend section from PBRT in this link: pbr-book.org/3ed-2018/Reflection_Models/Microfacet_Models.html $\endgroup$
    – ali
    May 17, 2020 at 11:20
  • 1
    $\begingroup$ @ali Thanks. Yes I've just found the pbrt to be very helpful in this regard, and by carefully reading chapter 14 I think I've got the answer to the above question: The above result is correct only in one particular case, when you have a matte + perfect mirror material. In case of a non-perfect mirror BOTH DiffuseBRDF and SpecularBRDF are included, and the two Pdfs are weighted, like so: (DiffuseBRDF + SpecularBRDF)*incomingLight / 0.5*DiffusePdf + 0.5*SpecularPdf $\endgroup$
    – yggdrasil
    May 17, 2020 at 13:46

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.