Why using the inverse of Snell's law ?

129 views
Skip to first unread message

Viewon01

unread,
Mar 17, 2011, 5:16:30 PM3/17/11
to OSL Developers
Hi,

In the specification you tell this for the reflection/refraction
methods :

"eta is the ratio of the index of refraction of the medium on the
“inside” of the surface divided by the index of refration of the
medium on the “outside” of the surface"

But in Snell law, we use n1/n2 (See http://en.wikipedia.org/wiki/Snell's_law).
Which is the inverse !

So, why this choice ?

(You will tell me that it is mathematically the same, yes, but
strange :-P except if you have a good reason !)

Thanks

Larry Gritz

unread,
Mar 17, 2011, 6:45:32 PM3/17/11
to osl...@googlegroups.com
Assuming that we consider the "air" to have IOR of so close to 1.0 that the difference is negligible, and the camera is usually in air rather than embedded inside a solid mass, the "ior of the inside divided by the ior of the outside" is simply the ior of the surface.

It's incredibly more convenient to write a shader for an object where eta is the IOR (everybody knows ordinary glass is close to 1.5, water is about 1.33, etc.) than to worry about the inverses of these.

-- lg

> --
> You received this message because you are subscribed to the Google Groups "OSL Developers" group.
> To post to this group, send email to osl...@googlegroups.com.
> To unsubscribe from this group, send email to osl-dev+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/osl-dev?hl=en.
>
>

--
Larry Gritz
l...@imageworks.com


Viewon01

unread,
Mar 25, 2011, 11:47:46 AM3/25/11
to OSL Developers
Ok I understand,

But I think that using eta-inside and eta-outside will be a better
choice... when we want to be physically correct ! Even, if we can just
play with theses parameters :-P simply :-)

Thanks for your answer

Regards
Reply all
Reply to author
Forward
0 new messages