POV-Ray : Newsgroups : povray.binaries.images : Sparkling water : Re: Sparkling water Server Time
2 Aug 2024 22:16:59 EDT (-0400)
  Re: Sparkling water  
From: Cousin Ricky
Date: 11 Feb 2007 13:40:01
Message: <web.45cf6169789a7b7885de7b680@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> I just experimented a bit with glass, water and photons. For making
> a glass filled with water, the documentation recommends to make a
> hollow container using CSG, and filling it with a liquid object
> scaled down a bit to avoid coincident surfaces. I'm a bit unsure
> about this, as the extra transitions through a thin air slice would
> seem to cause unnecessary calculations, and yield incorrect results
> as well (e.g., I think it is possible that the expected refraction
> at a water/glass transition turns into a total internal reflection
> at a water/air transition). A problem like this was discussed some
> time ago in povray.newusers regarding "Refraction in the eye":

I've had an idea for quite a while, but i've never tested it.  It is similar
to the recommended technique: scale the water slightly, but then reduce the
reflection on those parts of the glass and the water that are in contact.
The idea is to have a well-defined ior transition (which is achieved by the
recommended technique), without the surface-to-air reflections.

You'll want to keep some of the reflection, though, for the imaginary
glass-to-water surface.  The air will not significantly affect regular
high-angle reflections; the distortion of the angle of incidence caused by
the air layer will be cancelled out by the return trip through the air
layer.  However, i haven't tried to figure out the effect on internal
reflections from low angles of incidence.  Low-angle internal reflections
depend on the ior of the outer material, and a reflected ray would never
know that it was supposed to hit water, not glass.

> 2. Embeds the liquid in a solid glass block (in the hope that
>     the IOR specified in the second object takes precedence)

I don't see why not. Unlike in image #3, the 2nd object has a defined
surface where an ior switch can be made.

> 3. Is a variation of 1., with the liquid scaled *up* a tiny
>     bit and the "merge"-d with the glass container to remove
>     the inner surface (but no idea how POV-Ray handles the
>     differing IORs in a merge).

When you remove the internal surfaces, you are effectively left with a
variable ior.  A quick glance through the documentation reveals that
variable ior is deliberatedly unsupported, so i would imagine that the
behavior of the light in image #3 is quite undefined.


Post a reply to this message

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