Add eval(), sample_direction() and pdf_direction() to distant sensor
Description
This PR implements the missing eval(), sample_direction() and pdf_direction() methods for the distant sensor plugin.
Notes:
- Not ready for merge, requires decision regarding
SurfaceInteraction3f. Depending on the outcome, I might close this PR. - ~The
checkerboardtest segfaults when rebasing ontomaster, I still have to investigate that. EDIT: This appeared with 1372c608e134ab997a2af5ad711f4efb35c463d1.~ - Now requires #19
Testing
I added a few unit tests to check if the implementation was correct.
Checklist:
- [x] My code follows the style guidelines of this project
- [x] My changes generate no new warnings
- [ ] My code also compiles for
cuda_*andllvm_*variants. If you can't test this, please leave below - [x] I have commented my code
- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my feature works
- [ ] I cleaned the commit history and removed any "Merge" commits
- [x] I give permission that the Mitsuba 2 project may redistribute my contributions under the terms of its license
Tested with the LLVM backend only (no CUDA).
Hi @Speierers, any news regarding that? I had a look at @merlinND's ptracer branch and it doesn't look like SurfaceInteraction3f is updated over there. I'm actually in the process of implementing these methods for the non-camera sensors (which I could add to this PR btw).
Hi @leroyvn ,
Not sure to remember what was the issue with SurfaceInteraction3f?
Hi @Speierers, see this other comment for details.
I'm revisiting this PR. The issue we had back in July is still here. I started work on DirectionSample in #19 to generalise DirectionSample.emitter and turn it into a DirectionSample.endpoint. The update I did works but breaks many features (no problem to update all that of course): the change seems quite intrusive and breaks a symmetry which existed between DirectionSample and SurfaceInteraction.
Wrapping it up:
- Should I finish this work on #19 or drop it?
- Regardless the outcome on #19, what shall we do with this PR?
Hi @leroyvn,
I was just looking at the PRs you mention. It was actually not 100% clear what the issue with DirectionSample.endpoint was, can you clarify? There are some unrelated-seeming test failures regarding the Scene class. Is that the main problem, i.e. do you need help debugging those?
Hi @wjakob,
There are some unrelated-seeming test failures regarding the
Sceneclass. Is that the main problem, i.e. do you need help debugging those?
I think I do (see https://github.com/mitsuba-renderer/mitsuba2-next/pull/19#issuecomment-909236433).