POV-Ray : Newsgroups : povray.general : variable refraction : Re: variable refraction Server Time
10 Aug 2024 09:19:07 EDT (-0400)
  Re: variable refraction  
From: Mark Wagner
Date: 28 Jan 2000 02:23:36
Message: <389143f8@news.povray.org>
Chris Huff wrote in message ...
>
>I have often noticed this, and have been wondering how it could be
>done...
>Probably the best way would be to follow the ray a short
>distance(specified by a parameter) into the object, sample the ior at
>that point(or actually, the rate and direction it is changing), and
>repeat this process. It would probably be as slow as media, and would
>slow media down(since the path media is sampled over would have to
>change due to the variable ior). It might not be extremely difficult to
>implement, but I don't have the math knowledge to do it.


I've been looking in to this, and handling variable IOR like this would be
MUCH slower than media, since for each step, you would need to do
intersection tests for the ray segment you are working with.  Further, these
steps would need to be much smaller than the steps used in calculating
media, since minor errors in sampling media tend to cancel each other out,
while minor errors in sampling a variable IOR tend to accumulate.  This
would be especially noticable when rendering large-scale phenomena like
mirages, where the errors will result in a blur instead of a mirage.

Mark


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.