I'm trying to render water using path tracing. However, since in path tracing, the light sampling is skipped while the intersection point is perfect specular and thus no direct light would be taken into account.

So does that mean all contributions(radiance) are indirect lighting on specular surfaces(i.e. dirac BSDFs), no direct light should be computed for specular sufaces?

Say, I have a scene with environment map(infinite sphere) and a water object, represented by a triangle mesh. If the max bounce parameter is set to 1, then the water surface would not be lit at all.

And if the max bounce parameter is set to 2, all contributions are from rays reflected and "hit the environment map". For those reflected rays still hit the water surface, there would be no radiance on that ray.

The consequence would be for some region on the water appears to be very dark.

I wonder if my understanding is right, and if not, how do I fix it?

Here's my demo for one bounce, two bounces and 20 bounces.

1 bounce

enter image description here

2 bounces

enter image description here

20 bounces I think the color in the red box is incorrect, it should be brighter.

enter image description here

  • Did you know that you can path trace without doing direct light sampling? You rely on emissive terms to add the lighting energy to the scene. You would use fresnel to calculate how much reflects (specular) vs is absorbed (diffuse / refraction / subsurface scattering) and roll a random number to choose which of those to do, based on that reflectance amount. – Alan Wolfe Dec 4 '17 at 0:15

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.

Browse other questions tagged or ask your own question.