←back to thread

Distributed Ray-Tracing

(www.4rknova.com)
36 points ibobev | 2 comments | | HN request time: 0s | source
Show context
amelius ◴[] No.45668543[source]
Perhaps someone can help me with this. I was doing some experimentation with lenses and PBTR v4. This was going great, I was able to model the projection of an object through a lens onto a surface quite well. However, now I want to simulate doublets: lenses which consist of two parts so with two materials. I don't know how to model this in PBTR. It seems that it is not possible to have a shape (lens) touch more than one other material.

> PBRT's MediumInterface system can only represent a single "inside" medium and a single "outside" medium per shape. If a shape physically touches multiple different media (for example, a glass sphere sitting at the interface between water and air), PBRT cannot directly represent this configuration.

I think this is kind of odd for a renderer which is otherwise quite capable. Can anyone explain why this is the case, and how I can work around this limitation?

replies(2): >>45668863 #>>45669331 #
1. maybewhenthesun ◴[] No.45668863[source]
I don't know PBTR, but in other raytracers the trick is to create a single surface between the two materials and set the ior of that surface's material to the quotient of the iors of the materials o both sides.

That way the light will refract on the internal boundary as if it moves from the one material to the other.

Prerequisite is that you ened to be able to create non-manifold objects...

replies(1): >>45669018 #
2. amelius ◴[] No.45669018[source]
Ok, thanks, that sounds like an important hint.

When you say quotient, which material's ior is in the numerator and which in the denominator?