Miles Bader wrote:
> Miles Bader <miles.bader@[EMAIL PROTECTED]
> writes:
>> R
>> /
>> ---+ +----------4-+ +---
>> | | I / | |
>> +-------+--------3---+--------+
>> \ | / | /
>> | +------2-----+ |
>> | / |
>> | W/ |
>> \ / /
>> +--------1----------------+
>> /
>> G .
>> .
>> -------0-----------------------
>
> Hmm now that I think about it, the problem with that this is that it
> gives different depending on what direction you come from...
>
> Maybe if each material had a priority associated with it, and it would
> essentially ignore "enter" transitions for puproses of setting the
> current IOR, when entering a material with a priority less than the
> current priority. So in this example you'd give the ice-cube higher
> priority than the water. If you think about a ray going the opposite
> direction from the previous example, any transition from I->W without
> exiting the I first would act like it was still in the I; then when I
> was eventually exited, W would be the innermost active medium, and so
> _then_ would become current.
The stack only works if the media don't intersect, and where there is a
transition you have to model both outside faces, even if they occupy the
same space. So at junction 2, you need ice polygons facing into the
water, and water polygons facing the ice.


|