POV-Ray : Newsgroups : povray.advanced-users : Odd refraction phenomena. (Water to Air) Server Time
26 Nov 2024 13:21:37 EST (-0500)
  Odd refraction phenomena. (Water to Air) (Message 1 to 7 of 7)  
From: Simen Kvaal
Subject: Odd refraction phenomena. (Water to Air)
Date: 29 Apr 2000 20:31:02
Message: <390b7ec6$1@news.povray.org>
See (small) image in p.b.i. for visual impression.

I am trying to model air-bubbles in water, and ran across this problem:
Exactly _how_ does one model the camera _in_ water, viewing bubbles of air?
At first, I thought maybe place the camera inside an object with ior about
1.33 (water), then add objects (bubbles) with ior about 1.01 (air). That
produced weird results, however exactly the same as the second method.

The second method was using the law pysics: The ior is relative, I thought,
therefore, light passing from air into water, where air has (absolute) ior
1.01 and water (absolute) ior 1.33, would give a relative ior of 1.33/1.01
(water/air). When light passes from water to air, OTOH, we will get a
relative ior of 1.01/1.33, so I simply placed camera in space, and let the
bubbles have ior 1/1.33. That gave me exactly the same results as before. It
seems iors below 1 is not allowed, judging from the image I get.

The scene is really simple. A checkered plane with inverse applied to place
camera outside it. (Removing inverse places the camera inside, ie into the
water.) The sphere is just that; a sphere.

I've tried several combinations; all giving more or less the same results:
*Difference between (water-)box and sphere.
*Difference between (water-)plane and sphere.
*Sphere inside box.
*Sphere inside plane.

Any suggestions?


Post a reply to this message

From: Bob Hughes
Subject: Re: Odd refraction phenomena. (Water to Air)
Date: 29 Apr 2000 23:40:07
Message: <390bab17@news.povray.org>
First off it's difficult to say from one person to the next what "weird" is.
However I think just maybe what you might have there is a single surface
occurring instead of the two you are supposing it to be.
For instance, if you are CSG differencing the sphere out of either a plane
or box and applying a texture to both sphere and plane (or box) then I
think all you get is one texture left over there.
So, not two refractions, only the one.

Bob

"Simen Kvaal" <sim### [at] studentmatnatuiono> wrote in message
news:390b7ec6$1@news.povray.org...
| See (small) image in p.b.i. for visual impression.
|
| I am trying to model air-bubbles in water, and ran across this problem:
| Exactly _how_ does one model the camera _in_ water, viewing bubbles of air?
| At first, I thought maybe place the camera inside an object with ior about
| 1.33 (water), then add objects (bubbles) with ior about 1.01 (air). That
| produced weird results, however exactly the same as the second method.
|
| The second method was using the law pysics: The ior is relative, I thought,
| therefore, light passing from air into water, where air has (absolute) ior
| 1.01 and water (absolute) ior 1.33, would give a relative ior of 1.33/1.01
| (water/air). When light passes from water to air, OTOH, we will get a
| relative ior of 1.01/1.33, so I simply placed camera in space, and let the
| bubbles have ior 1/1.33. That gave me exactly the same results as before. It
| seems iors below 1 is not allowed, judging from the image I get.
|
| The scene is really simple. A checkered plane with inverse applied to place
| camera outside it. (Removing inverse places the camera inside, ie into the
| water.) The sphere is just that; a sphere.
|
| I've tried several combinations; all giving more or less the same results:
| *Difference between (water-)box and sphere.
| *Difference between (water-)plane and sphere.
| *Sphere inside box.
| *Sphere inside plane.
|
| Any suggestions?
|
|
|
|


Post a reply to this message

From: Chris Colefax
Subject: Re: Odd refraction phenomena. (Water to Air)
Date: 30 Apr 2000 20:30:30
Message: <390cd026@news.povray.org>
Simen Kvaal <sim### [at] studentmatnatuiono> wrote:
> See (small) image in p.b.i. for visual impression.
>
> I am trying to model air-bubbles in water, and ran across this problem:
> Exactly _how_ does one model the camera _in_ water, viewing bubbles of
air?
> At first, I thought maybe place the camera inside an object with ior about
> 1.33 (water), then add objects (bubbles) with ior about 1.01 (air). That
> produced weird results, however exactly the same as the second method.
>
> The second method was using the law pysics: The ior is relative, I
thought,
> therefore, light passing from air into water, where air has (absolute) ior
> 1.01 and water (absolute) ior 1.33, would give a relative ior of 1.33/1.01
> (water/air). When light passes from water to air, OTOH, we will get a
> relative ior of 1.01/1.33, so I simply placed camera in space, and let the
> bubbles have ior 1/1.33. That gave me exactly the same results as before.
It
> seems iors below 1 is not allowed, judging from the image I get.
>
> The scene is really simple. A checkered plane with inverse applied to
place
> camera outside it. (Removing inverse places the camera inside, ie into the
> water.) The sphere is just that; a sphere.
>
> I've tried several combinations; all giving more or less the same results:
> *Difference between (water-)box and sphere.
> *Difference between (water-)plane and sphere.
> *Sphere inside box.
> *Sphere inside plane.
>
> Any suggestions?

My instinct would be to difference the bubbles out of the water, which has
an ior, and also to place the camera *inside* a bubble (or rather, an
air-filled lens), e.g.:

   difference {
      plane {y, 0 texture {WaterSurfaceTexture}}
      object {UnionOfBubbles}
      sphere {0, 0.01 pigment {rgbt 1} translate camera_location}
      interior {ior 1.33}
      }

This way, a ray is bent after it leaves the camera, then bent back when it
enters a bubble (or exits the surface of the water).  I haven't tested it,
but hopefully this will give you the effect you're after...


Post a reply to this message

From: Simen Kvaal
Subject: Re: Odd refraction phenomena. (Water to Air)
Date: 1 May 2000 05:13:36
Message: <390d4ac0$1@news.povray.org>
>
>My instinct would be to difference the bubbles out of the water, which has
>an ior, and also to place the camera *inside* a bubble (or rather, an
>air-filled lens), e.g.:


Yeah, I've figured it out. And also, as mr Hughes pointed out, the
definition of "odd" is relative... I made an animation of a waterbox with a
morphing superellipsoid to get a more distanced view, and I have to admit it
looks natural.

In fact, It's okay to place the camera into empty air and give the bubble an
ior of 1.01/1.33. The method I use, however, is an isosurface with (waves on
top,) and subtract the bubbles, and place the camera inside the isosurface.
(Kills the short render-time, though...)


>
>This way, a ray is bent after it leaves the camera, then bent back when it
>enters a bubble (or exits the surface of the water).  I haven't tested it,
>but hopefully this will give you the effect you're after...
>


I have to test this!! Kind of emulates an underwater camera? Hopefully it
will give a wonderful perspective distortion.

:)

Simen.


Post a reply to this message

From: Markus Becker
Subject: Re: Odd refraction phenomena. (Water to Air)
Date: 5 May 2000 06:24:03
Message: <3912A211.F8B4B4B2@student.uni-siegen.de>
Simen Kvaal wrote:
> 
> See (small) image in p.b.i. for visual impression.

I've seen the image. Read your post. But still don't
know _what_ exactly you mean by weird? Is it the
strange checker pattern at the edge of the bubble?

Could it be it is just an alialing effect?

Markus


Post a reply to this message

From: Simen Kvaal
Subject: Re: Odd refraction phenomena. (Water to Air)
Date: 5 May 2000 14:41:45
Message: <391315e9@news.povray.org>
>I've seen the image. Read your post. But still don't
>know _what_ exactly you mean by weird? Is it the
>strange checker pattern at the edge of the bubble?

I referred to the strange checker pattern, as you say. But I've figured it
out; it's just my eyes playing tricks with me, and it's no error. (It would
be strange if it was, too...)


Post a reply to this message

From: Alf Peake
Subject: Re: Odd refraction phenomena. (Water to Air)
Date: 7 May 2000 18:21:36
Message: <3915ec70$1@news.povray.org>
Simen Kvaal <sim### [at] studentmatnatuiono> wrote in message
news:390b7ec6$1@news.povray.org...
> See (small) image in p.b.i. for visual impression.
>
> I am trying to model air-bubbles in water, and ran across this
problem:
> Exactly _how_ does one model the camera _in_ water, viewing bubbles
of air?
> At first, I thought maybe place the camera inside an object with ior
about
> 1.33 (water), then add objects (bubbles) with ior about 1.01 (air).
That
> produced weird results, however exactly the same as the second
method.
>
<snip>
>
> Any suggestions?

You may get some ideas here, a bubble viewed from under water.
http://www.interq.or.jp/blue/kawashu/gallery/p12.html

--
Alf

http://www.peake42.freeserve.co.uk/
http://ourworld.compuserve.com/homepages/Alf_Peake/


Post a reply to this message

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