Skip to content
Discussion options

You must be logged in to vote

Hi @Disgruntoad

Can someone explain why we need to include the sensor?

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.

Do we also need to create a cube to enclose the scene?

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…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Disgruntoad
Comment options

@njroussel
Comment options

Answer selected by njroussel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants