|
![](/i/fill.gif) |
Retsam,
Christopher James Huff is on a TAG team and I'm sure it will get
noted and checked...
Emory
Retsam wrote:
>
> >Christopher James Huff wrote:
> >>No, the second glass refraction is ignored. POV maintains a list with
> >>the objects it is currently "inside", which lets it figure out when
> >>refraction should be done.
> >>
> >I know that's probably what's intended, but I'm just looking at the code.
>
> I ran a test to confirm my suspicion. Rays were refracted twice at an ior
> of 1.57:1.33, once on entering the water, and once on leaving the glass
> (into the water). I did the test with POV-Ray 3.5 for Windows (Version
> 3.5.icl.win32)
>
> If it really is supposed to work the way you described, where it only
> refracts when leaving a surface if it's the last surface entered, then we
> should make the following code change:
>
> /* The ray is leaving the current object. */
> Ray_Exit(&NRay, nr);
> if (NRay.Index == -1)
> {
> /* The ray is leaving into the atmosphere. */
> .......
> }
> else if (NRay.Index+1 == nr) <------ this line was changed.
> {
>
> I could be off by one. But as I read it, NRay.Index should equal nr if the
> ray is leaving the last object entered. After the call to Ray_Exit,
> NRay.Index will be reduced by one: hence the "+1" in the if statement.
>
> I apologize if this post appears twice. I posted a similar response last
> night, and it hasn't shown up yet nearly a day later.
>
> By the way, do the developer's read messages in here? Who would I talk to
> about making this code change, if it is the way it should be handled (the
> documentation doesn't really describe the way it's supposed to work in
> tricky scenarios like this)?
Post a reply to this message
|
![](/i/fill.gif) |