[Feature] Hemispherical distant sensor plugin#11
[Feature] Hemispherical distant sensor plugin#11leroyvn wants to merge 12 commits intomitsuba-renderer:masterfrom leroyvn:hdistant
Conversation
|
Thanks for this PR @leroyvn , Would it make sense for On the other hand, this is not a lot of code, I don't think it would be worth it to share some of this in a header file. |
I hadn't thought of that: actually I think these two methods will be different from the |
|
Okay then, let's keep those seperate 👍 It would be great to have them yes. Otherwise we will need to revisite those plugins once again when the light tracer has landed. |
|
I looked into it and it seems that the |
|
Makes sense. @merlinND is this something you encountered in your work on the light tracer? |
|
Hi @Speierers, I just pushed an update with tests and docs. It now requires a commit on the |
|
Hi @leroyvn, Great illustration for the doc! I am just a little confused with the |
I'll make a new proposal, hopefully clearer.
Yes, and the direction pointed by |
|
Hi there! I'll sneak in to this discussion 😋 I like the illustrations, but I am a bit confused! Is the hemisphere located above the blue plane in the |
|
Hi @tomasiser, it's indeed clearer with the full docs. The sample scene has three
In practice,
Parametrising |
|
@leroyvn I like very much the new illustration :) |
src/sensors/hdistant.cpp
Outdated
There was a problem hiding this comment.
Is that really true? The example shows rendered 2D images with spatial variation. The sample_ray_differential function should track how adjacent rays change either (or both) in their 'o' and 'd' parameters.
There was a problem hiding this comment.
No it's not, sorry for this mistake! I started from the distant code and forgot to update that part, I'll check that.
There was a problem hiding this comment.
I added ray differentials using the same code as for the main ray direction and origin (basically skipping spectrum-related parts), I hope it's fine.
d43e297 to
8bc5ae2
Compare
|
Hi Vincent, I just took another look at this PR and thought a bit more about the 'shape' target feature common to this sensor and 'distant.cpp'. A few thoughts:
Thanks, |
Update data submodule
|
Hi @wjakob, sorry it took me a while to get back to this. I tried to address your comments:
If this is fine, I'll also propagate the documentation update to |



Description
This PR adds a hemispherical distant sensor, which is similar to an adjoint to the
envmapemitter. It records radiance leaving the scene in a hemisphere. It can be useful to get a qualitative idea of the effective BRDF of a surface with complex geometry.Code is mostly taken from the
distantsensor plugin, and I don't know to what extent it would be desirable and/or doable to move common parts to a library header (in the end, only the constructor and direction sampling code are different).An example of RGB output (a simple rectangular surface with a
roughconductorBSDF; coloured dots each correspond to a directional emitter in the scene; note that pixel index origin is taken at the bottom left of the image):To do
Testing
A set of tests similar to those written for
distantis included. We test for object construction, ray sampling and overall result correctness in a few scenarios.Checklist
cuda_*andllvm_*variants. If you can't test this, please leave below