Replies: 1 comment
-
Hello! My experience with ray tracing is very modest, but I will try to answer your question: I am not sure BVHs are needed for lights, unless you have lots of sparse lights and you are using a BVH to efficiently get a "subset" of ALL the lights in the direction of the scattered ray sample (not just the first/closest light hit by that ray). And you would still need the weights of all the lights. Do you have lots of lights? If not, I doubt a BVH for them would add much value. I think it's expected for the lights PDF to be zero in most directions (since typically lights don't lie in every direction). However, the final scattering PDF (which appears in the denominator of the rendering equation) should be a weighted sum of the lights PDFs AND the material's PDF (the BRDF), and the sum is not zero. Did you upload your code somewhere (on GitHub or elsewhere)? I think people might be more able to help if the code is available. Also screenshots of rendered images might help too. Cheers! |
Beta Was this translation helpful? Give feedback.
-
I was experimenting for a little while with base code adding PBR materials and transparency etc...
When I noticed third book doesn't use BVH at all, so I've added it both to "lights" and "world" lists.
Increased my performance almost two-fold.
But after some time, I noticed that brightness is kind of weird/ glitchy, so I checked PDF values, and they were zero in allmost all directions.
Is it possible to make BVH work with PDF lights ?
Beta Was this translation helpful? Give feedback.
All reactions