Why assign a participating medium to a sensor? #1617
Replies: 1 comment 1 reply
-
Hi @Disgruntoad
The sensor's medium is used in the integrator to know if the ray starts inside a medium or not (relevant parts of code: 1, 2). It's important to know if the ray's origin is already in a medium, as it will tell us whether or not we need to handle medium interactions from the very beginning of its light path.
No, usually not, but it is safe to do so. Mitsuba tracks which medium a ray currently is in by tracking medium transitions when hitting a shape - there's isn't a global data structure that allows queries like "tell me which medium this 3d point is in". Hence why we also need to tell it its original medium. So, if your ray is always inside the medium you don't need to enclose it in a shape, as the shape's sole purpose is to define a transition.
I think my first answer covers this.
I'm not quite sure what you're referring to. Could you point out some piece of code? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Based on the first few paragraphs of the documentation for participating media (https://mitsuba.readthedocs.io/en/latest/src/generated/plugins_media.html), "When a medium permeates a volume of space (e.g. fog) that includes sensors, it is important to assign the medium to them. "
Can someone explain why we need to include the sensor? Do we also need to create a cube to enclose the scene? What exactly does assigning a medium to the sensor do? Thanks!
Secondary question, I've seen some mediums use the assignment
<bsdf type="null"/>
. Is this important to explicitly call (and what does it do)? If we do not do this, what exactly occurs?Beta Was this translation helpful? Give feedback.
All reactions