mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.88k stars 1.19k forks source link

[SPPM] How can photons ever correctly contribute to hitpoints on an animated primitive? #337

Open paulgrassler opened 1 week ago

paulgrassler commented 1 week ago

Hey, I am confused about how Motion Blur works for scenes rendered with SPPM. As far as I can see, the camera rays that are used to create the hitpoints have sampled time values associated with them, such that they are transformed appropriately when intersecting the animated primitive. However, the same is not true for the photon rays. Even though a time sample is generated in the photon pass and passed to the light->Sample_Le function, it is not used in the case of e.g. a diffuse sphere light. I do not understand how in this case, the aforementioned hitpoints on the surface of the transformed primitive ever get photon contributions. I know this is quite a technical question. I have spent quite some time trying to understand this process as I am trying to implement SPPM with Motion Blur myself. I would appreciate any help. If I misunderstood something, please let me know as well.

Thank you!

paulgrassler commented 7 hours ago

Hey, I also brought this issue up in the PBRT v4 repo, implemented a fix and created a pull request. Please take a look!