POV-Ray : Newsgroups : povray.advanced-users : Waterdrops on Glass... How? Server Time
11 Oct 2026 04:14:17 EDT (-0400)
  Waterdrops on Glass... How? (Message 1 to 34 of 34)  
From: Tim Nikias
Subject: Waterdrops on Glass... How?
Date: 8 Jan 2003 14:24:59
Message: <3e1c7b0b@news.povray.org>
Hello all!

I've been working on my "Worldbowl" image again,
and am trying to update it with my most recent macros,
making things look better and more detailed, in order to
achieve a very pleasing and realistic image which I might
put on Zazzle. In my oppinion, its one of my images which
actually have the option to be made something very
special...

Well, to get to the point, I have come to the conclusion that
some nice raindrops on the window would look very nice
and add some tiny detail to the otherwise boring outside
view.
Right now, I'm just placing blob-components (more or less
random, I'm working on that part), but the main problem I have
is the refraction due to the water. Normally, Water has an ior
or 1.33 and glass one of 1.45 or so. In order to get rid of the
coincident surface problem, I'm just clipping the blob with a box.
This leaves an open shell on the glass surface.
I'm one of those ulra-realistic guys, so I'd like to know either
how I can either calculate an ior for the water to simulate the
refraction taking place between water and glass surfaces.
In this case, its not a big problem, I could just play with different
ior settings for the water till I get a look I like.
But let's not take a glass window, but one for drinking. In that case,
an "open shell" water would be a disc in the glass to simulate the
water surface. But I want to simulate the correct refraction taking place
when the viewing rays passes through the glass into the water.

Sounds pretty complicated and I'm not too sure if I make myself
clear. The other way round:
Most of the time, us POVers leave a little gap between two transparent
surfaces in order to avoid coincident surfaces. But when refracting rays,
the effect taking place is different as opposed to two surfaces touching
each other.

Any ideas?

Thanks in advance,
Tim

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 13 Jan 2003 19:16:31
Message: <3e2356df$1@news.povray.org>
Hm. Seems like I'm not raising much attention with this question,
eh?

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Gilles Tran
Subject: Re: Waterdrops on Glass... How?
Date: 13 Jan 2003 19:42:29
Message: <3e235cf5@news.povray.org>
"Tim Nikias" <tim### [at] gmxde> a écrit dans le message de news:
3e2356df$1@news.povray.org...
> Hm. Seems like I'm not raising much attention with this question,
> eh?
>

Can't help, I've had this little problem for years and I was never able to
solve it properly. Nothing I tried seemed to work as it should.  See :
http://www.oyonale.com/ldc/images/abeillesdetail2.jpg

The main issue, though, is less the surface problem than the distribution of
the droplets themselves. Ideally, their position should be the product of a
dynamic process, so that simple random positionning always seems wrong.
Perhaps Rune's particle system could help, I don't know. Blobs doesn't
behave like real water either, which is another problem.

G.

--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Christopher James Huff
Subject: Re: Waterdrops on Glass... How?
Date: 13 Jan 2003 19:47:12
Message: <cjameshuff-A31848.19470813012003@netplex.aussie.org>
In article <3e1c7b0b@news.povray.org>, "Tim Nikias" <tim### [at] gmxde> 
wrote:

> Most of the time, us POVers leave a little gap between two transparent
> surfaces in order to avoid coincident surfaces. But when refracting rays,
> the effect taking place is different as opposed to two surfaces touching
> each other.

Overlap them a bit. POV does things so that refraction is handled 
correctly in this case. The gap method simulates an air gap.

Designing the textures properly also helps. I usually use perfectly 
transparent textures and use interior attenuation or media to provide 
any coloration.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: KalleK
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 01:10:51
Message: <3e23a9eb@news.povray.org>
> Any ideas?
Hi Tim!

Maybe, you can tinker with clipped_by, to clip the surface of the drop which
would contact the window. I don't know wether the ray remembers the ior of
the object it currently is in or not. But if it's so, the ray would go from
1.33 straight into 1.45. which should be right...

Hope could help
Kalle


Post a reply to this message

From: Peter Popov
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 03:19:05
Message: <3uh72v0viblg0mea8cq2o0qhrhrh3v12kl@4ax.com>
On Tue, 14 Jan 2003 07:10:48 +0100, "KalleK" <kal### [at] gmxde> wrote:

>Maybe, you can tinker with clipped_by, to clip the surface of the drop which
>would contact the window. I don't know wether the ray remembers the ior of
>the object it currently is in or not. But if it's so, the ray would go from
>1.33 straight into 1.45. which should be right...

Hey Kalle, that's *extremely* neat - did you try it? It does sound
plausible...


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 06:49:00
Message: <3e23f92c$1@news.povray.org>
That's what I'm currently doing, but I'm not sure
if it works as we think it does. As far as I understand
the raytracing technique, POV will stay with ior 1.45 from
the glass until it hits the surface of the water, and gets
refracted the way it should when exiting a 1.33 ior to
1.00 ior (water to air). But I'm not too sure about that,
and also no quiet sure how I should test that...

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

>
> >Maybe, you can tinker with clipped_by, to clip the surface of the drop
which
> >would contact the window. I don't know wether the ray remembers the ior
of
> >the object it currently is in or not. But if it's so, the ray would go
from
> >1.33 straight into 1.45. which should be right...
>
> Hey Kalle, that's *extremely* neat - did you try it? It does sound
> plausible...
>
>


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 06:52:13
Message: <3e23f9ed$1@news.povray.org>
It "does things"? What does it do? Just curious.
Though doing that with blobs is still kinda difficult...
Instead of clipping, I'd have to difference it away
position it slightly inside the window... Pretty tracing
intensive, hu? I'll try and look what happens. Thanks
for the suggestion though,

Tim

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

>
> > Most of the time, us POVers leave a little gap between two transparent
> > surfaces in order to avoid coincident surfaces. But when refracting
rays,
> > the effect taking place is different as opposed to two surfaces touching
> > each other.
>
> Overlap them a bit. POV does things so that refraction is handled
> correctly in this case. The gap method simulates an air gap.
>
> Designing the textures properly also helps. I usually use perfectly
> transparent textures and use interior attenuation or media to provide
> any coloration.
>


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 07:22:57
Message: <3e240121$1@news.povray.org>
You're definitely right about placing the droplets.
I've written a small include, which scatters droplets
randomly across an area (the whole thing was designed
so far only for windows), and also creates "trails":
At one spot, it starts, and moves downward (a little
randomly moving towards right or left), and leaves
very small droplets on the way, and at the end, a big droplet.
Just like those drops that get big enough to flow down.

I've uploaded a zoomed-version on the window,
http://www.digitaltwilight.de/no_lights/rain_1.jpg
Its 100kb, but shows how the results look so far. I'm
fiddling a bit with size and numbers to see if I can
get something near-realistic with this method.

I guess Rune's Particle System won't be of use, cause
it doesn't have particle-particle-interaction, and that
would be what droplets on windows are screaming for.
Perhaps I'll try to create an include file for windows, but
doing it with curved survaces and other objects... Way
too difficult. Got to have a running particle-system to do
that...
But near-realistic isn't too bad. Its all about the looks.
How did you place those droplets of yours? Using trace?
Though some look like the gravitational-pull is actually
affecting the droplet. How'd you do that?

Regards,
Tim

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

>
> Can't help, I've had this little problem for years and I was never able to
> solve it properly. Nothing I tried seemed to work as it should.  See :
> http://www.oyonale.com/ldc/images/abeillesdetail2.jpg
>
> The main issue, though, is less the surface problem than the distribution
of
> the droplets themselves. Ideally, their position should be the product of
a
> dynamic process, so that simple random positionning always seems wrong.
> Perhaps Rune's particle system could help, I don't know. Blobs doesn't
> behave like real water either, which is another problem.
>
> G.
>
> --
> **********************
> http://www.oyonale.com
> **********************
> - Graphic experiments
> - POV-Ray and Poser computer images
> - Posters
>
>
>


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 07:35:42
Message: <3e24041e@news.povray.org>
Using google this came up when looking for
"water droplets simulation":

http://www.cs.unc.edu/~lin/COMP259/LEC/29b.ppt

Its pretty interesting and perhaps, when I get the time to
understand it, I'll implement it. Could be useful, at least
for meshes (and windows can easily be done with
meshes).


--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Gilles Tran
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 16:21:55
Message: <3e247f73$1@news.povray.org>
"Tim Nikias" <tim### [at] gmxde> a écrit dans le message de news:
3e240121$1@news.povray.org...
> I've uploaded a zoomed-version on the window,
> http://www.digitaltwilight.de/no_lights/rain_1.jpg

Looks like a good start. Perhaps the droplets should be more homogeneous in
shape, though it depends on whether it's still raining or not. Here are some
reference images if you haven't got them.
http://www.danheller.com/images/Italy/Tuscany/rain-window-big.jpg
http://www.pacamera.com/memberGalleries/ammac/rainWindow.jpg
http://www.sengers.ch/special/tropfen.jpg

> How did you place those droplets of yours? Using trace?
> Though some look like the gravitational-pull is actually
> affecting the droplet. How'd you do that?

The trouble is that the code isn't commented...
From what I understand of it, it first creates a grid of droplets in a u,v
plane, because I had observed that in real life dew droplets are somehow
organised and not 100% random (it's different from the rain-beated window
then). The macro is given attractor points that draw droplets to them
(droplets far from the attractor are smaller), with some gentle
function-based displacement. This allows "lines" of droplets of decreasing
size to be created (it's more visible here
http://www.oyonale.com/ldc/images/abeilles.jpg). It's far from perfect but
100% random positionning was really unrealistic.
The u,v positions and sizes of the droplets are stored in arrays and are
then wrapped around the object (a simple cylinder in this case) as a single
blob.
About the gravitational pull, I remember doing it but I can't find it in the
code so perhaps it's just luck...

G.


--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Florian Brucker
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 16:27:38
Message: <3e2480ca$1@news.povray.org>
hey guys

> http://www.cs.unc.edu/~lin/COMP259/LEC/29b.ppt

can you tell me which app i have to use to view that file? powerpoint fails
(normaly uses .ppt, didn't think it would fit either), but google, wotsit ?
co just give powerpoint as target application...

thanks:florian


Post a reply to this message

From: Gilles Tran
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 16:29:19
Message: <3e24812f@news.povray.org>
"Tim Nikias" <tim### [at] gmxde> a écrit dans le message de news:
3e24041e@news.povray.org...
> http://www.cs.unc.edu/~lin/COMP259/LEC/29b.ppt
>
> Its pretty interesting and perhaps, when I get the time to
> understand it, I'll implement it. Could be useful, at least
> for meshes (and windows can easily be done with
> meshes).

Thanks ! It looks very interesting indeed. I'll have a look at it too, but I
haven't done this kind of math since 1986... It seems feasible in POV-Ray
SDL and could give very nice results.

G.


--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters

> --
> Tim Nikias
> Homepage: http://www.digitaltwilight.de/no_lights/index.html
> Email: Tim### [at] gmxde
>
>


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 16:32:10
Message: <3e2481da$1@news.povray.org>
It worked fine with Powerpoint for me. Perhaps you've
got the wrong Version?

Here's something that looks much better, and covers the same
topic (I guess its actually the same, though the PPT was the
presentation part...)
http://www.eml.hiroshima-u.ac.jp/member/staff/kin/publications/CA93/wdroplet
.pdf


--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 16:34:46
Message: <3e248276@news.povray.org>
As mentioned to Florian Brucker, here's a link to a better
and more handsome PDF-Version:
http://www.eml.hiroshima-u.ac.jp/member/staff/kin/publications/CA93/wdroplet
.pdf

If you actually do it, remember to comment it the SDL heavily,
so that others might learn from it. I know, you're french, and would
probably comment in french, but I'm german and still try to stick to
english when naming parameters and such, so that most Users might
learn something and understand it very easily...

And from your posts it doesn't look like you're not skilled enough for
english commentary! :-)

Regards,
Tim

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Gilles Tran
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 16:55:58
Message: <3e24876e$1@news.povray.org>
"Tim Nikias" <tim### [at] gmxde> a écrit dans le message de news:
3e248276@news.povray.org...

> If you actually do it, remember to comment it the SDL heavily,
> so that others might learn from it.

Oh well, some people here are so good at maths that they could probably
implement this in a evening or so [hint, hint ;-)] ...

My only advantage is that Nobel Prize Pierre-Gilles de Gennes (who is cited
a in the paper) works a couple of streets away so I could perhaps kidnap him
and ask for functional, working code...

> probably comment in french, but I'm german and still try to stick to
> english when naming parameters and such, so that most Users might
> learn something and understand it very easily...

I know, I know, even the scenes I don't plan to release are commented in
English now, just in case I have to cut and paste some code in these
groups... Not that I like it but it's better than renaming the variables at
the last minute.

G.

--

**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Christopher James Huff
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 17:07:02
Message: <cjameshuff-CABB66.17064414012003@netplex.aussie.org>
In article <3e23a9eb@news.povray.org>, "KalleK" <kal### [at] gmxde> wrote:

> Maybe, you can tinker with clipped_by, to clip the surface of the drop which
> would contact the window. I don't know wether the ray remembers the ior of
> the object it currently is in or not. But if it's so, the ray would go from
> 1.33 straight into 1.45. which should be right...

Don't. This will not work properly: the ray will never leave the object 
if it goes through an area that was clipped away, and won't enter the 
object properly from the glass side. The correct solution is simpler, 
just overlap the objects.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 17:16:49
Message: <cjameshuff-95B46C.17162714012003@netplex.aussie.org>
In article <3e23f9ed$1@news.povray.org>,
 "Tim Nikias" <tim### [at] gmxde> wrote:

> It "does things"? What does it do? Just curious.

Take a ray entering a droplet for example: it hits the droplet surface 
and gets refracted, and is now inside the droplet. The next surface it 
hits is the glass, so it gets refracted as it should when going from 
water to glass. It is now inside the glass and the droplet. When it hits 
the other droplet surface, *no refraction is done*, but it leaves the 
droplet. (I think it still computes the texture, I'm not sure it should 
though.)
Now the ray has gone through the droplet, been refracted going from 
air/water and water/glass, and is now in the glass, just as it should be.


> Though doing that with blobs is still kinda difficult...

No more so than for any other object. The difficulty is more determined 
by the object you are placing the blobs on.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 19:56:42
Message: <3e24b1ca$1@news.povray.org>
Why don't you like it? I've heard several rumours about
french people and languages... They like to stick to theirs... ;-)

In some respect, germans are much the same. Some are
really against incorporating english words into the known german
vocabulary. And sometimes, things get messed up. For example,
cell-phones are called "Handy", but ask any american, they
wouldn't know what we're referring to, unless they're told.

About that math-stuff... I think, if I sit down, I could solve it,
though perhaps not strictly by the rules given in the paper. Especially
that modelling part about angles of the water-droplets and such would
be quite difficult, I think.

But right now, I'm not really in the mood to dig into that. There's a lot
of scientific papers floating on my harddrive, waiting to be implemented
in one way or the other... Next week perhaps... ;-)
No, seriously, I do like the idea of this, might be a very useful addition
to lots of realistic scenes. I've actually found some MPEG showing off
what the code is capable of:
http://www.eml.hiroshima-u.ac.jp/member/staff/kin/publications/JVCA
As I'm posting this, the page can't be accessed, don't know why. Perhaps
back online tomorrow.

We'll see who gets to implement this first. That wave-algorithm Rune
and then Christopher Hormann (if I'm not mistaken, was at least a
Christopher :-) implemented was something I wanted to do as well...

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde

>
> Oh well, some people here are so good at maths that they could probably
> implement this in a evening or so [hint, hint ;-)] ...
>
> My only advantage is that Nobel Prize Pierre-Gilles de Gennes (who is
cited
> a in the paper) works a couple of streets away so I could perhaps kidnap
him
> and ask for functional, working code...
>
>
> I know, I know, even the scenes I don't plan to release are commented in
> English now, just in case I have to cut and paste some code in these
> groups... Not that I like it but it's better than renaming the variables
at
> the last minute.
>


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 20:01:20
Message: <3e24b2e0$1@news.povray.org>
> Take a ray entering a droplet for example: it hits the droplet surface
> and gets refracted, and is now inside the droplet. The next surface it
> hits is the glass, so it gets refracted as it should when going from
> water to glass. It is now inside the glass and the droplet. When it hits
> the other droplet surface, *no refraction is done*, but it leaves the

I guess you meant "When it hits the other glass surface", cause it makes
no sense if it doesn't refract when exiting the water and entering air.

> droplet. (I think it still computes the texture, I'm not sure it should
> though.)

I think it should compute the texture, since if an object is transparent and
has two sides, POV's rays will be affected by each surface. That's just
the way its implemented and IMHO how I would expect it to behave. If
we'd want 100% realism, we'd probably have to texture it completely
transparent, but add some interior color, like using fade_color and
fade_power or such.

> No more so than for any other object. The difficulty is more determined
> by the object you are placing the blobs on.

You're right about that. It works pretty well for a window made of a single
box, but I'm always thinking "general", to keep things flexible.

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde


Post a reply to this message

From: Christopher James Huff
Subject: Re: Waterdrops on Glass... How?
Date: 14 Jan 2003 23:08:49
Message: <cjameshuff-CCD54F.23083314012003@netplex.aussie.org>
In article <3e24b2e0$1@news.povray.org>,
 "Tim Nikias" <tim### [at] gmxde> wrote:

> > Take a ray entering a droplet for example: it hits the droplet surface
> > and gets refracted, and is now inside the droplet. The next surface it
> > hits is the glass, so it gets refracted as it should when going from
> > water to glass. It is now inside the glass and the droplet. When it hits
> > the other droplet surface, *no refraction is done*, but it leaves the
> 
> I guess you meant "When it hits the other glass surface", cause it makes
> no sense if it doesn't refract when exiting the water and entering air.

No, I meant the other water surface, I was ignoring the case where it 
exits directly into air. First the ray hits the drop and goes from air 
to water. Then it hits the glass and goes from water to glass, though it 
is still inside the drop object it is now travelling through glass. Then 
it hits the far side of the drop...they overlap, remember? Since it 
already did the refraction for water/glass, it ignores the refraction 
this time, and just removes the drop from the containing objects.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Tim Nikias
Subject: Re: Waterdrops on Glass... How?
Date: 15 Jan 2003 06:18:13
Message: <3e254375@news.povray.org>
Oh, now I get it. I was thinking of my special case
scenario, in which the rays travels through the glass
first and meets the droplets on the backside. Thus my
interpretation of air-glass to glass-water to water-air.

To make the point: the issue is, once its inside the first
medium and enters the next, it won't get refracted again
when exiting the first medium it was in, right?

--
Tim Nikias
Homepage: http://www.digitaltwilight.de/no_lights/index.html
Email: Tim### [at] gmxde
>
> > > Take a ray entering a droplet for example: it hits the droplet surface
> > > and gets refracted, and is now inside the droplet. The next surface it
> > > hits is the glass, so it gets refracted as it should when going from
> > > water to glass. It is now inside the glass and the droplet. When it
hits
> > > the other droplet surface, *no refraction is done*, but it leaves the
> >
> > I guess you meant "When it hits the other glass surface", cause it makes
> > no sense if it doesn't refract when exiting the water and entering air.
>
> No, I meant the other water surface, I was ignoring the case where it
> exits directly into air. First the ray hits the drop and goes from air
> to water. Then it hits the glass and goes from water to glass, though it
> is still inside the drop object it is now travelling through glass. Then
> it hits the far side of the drop...they overlap, remember? Since it
> already did the refraction for water/glass, it ignores the refraction
> this time, and just removes the drop from the containing objects.
>
> --
> Christopher James Huff <cja### [at] earthlinknet>
> http://home.earthlink.net/~cjameshuff/
> POV-Ray TAG: chr### [at] tagpovrayorg
> http://tag.povray.org/


Post a reply to this message

From: Florian Brucker
Subject: Re: Waterdrops on Glass... How?
Date: 15 Jan 2003 07:10:46
Message: <3e254fc6$1@news.povray.org>
hey tim

> It worked fine with Powerpoint for me. Perhaps you've
> got the wrong Version?

could be. anyhow, the pdf worked. thanks

greetings:florian


Post a reply to this message

From: Florian Brucker
Subject: Re: Waterdrops on Glass... How?
Date: 15 Jan 2003 07:15:11
Message: <3e2550cf@news.povray.org>
hey guys!

i think i'll give it at least a try, i just checked the maths stuff, looks
like the things we do in school these days.
it'll nevertheless take some time, cause i'm graduating this spring and
really should do some excercises ;-(

greetings:florian


Post a reply to this message

From: Christopher James Huff
Subject: Re: Waterdrops on Glass... How?
Date: 15 Jan 2003 11:06:11
Message: <cjameshuff-74CD4E.11054315012003@netplex.aussie.org>
In article <3e254375@news.povray.org>, "Tim Nikias" <tim### [at] gmxde> 
wrote:

> To make the point: the issue is, once its inside the first
> medium and enters the next, it won't get refracted again
> when exiting the first medium it was in, right?

Right. When going from one object into another overlapping one, a ray 
goes through two surfaces but only gets refracted once.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: KalleK
Subject: Re: Waterdrops on Glass... How?
Date: 15 Jan 2003 14:06:05
Message: <3e25b11d$1@news.povray.org>
> Don't. This will not work properly: the ray will never leave the object
> if it goes through an area that was clipped away, and won't enter the
> object properly from the glass side.
Well... was just an idea... - I used something like this when I modeled a
closed glass with halfway water and halfway air - there are some
"conincident-surface" problems...

> The correct solution is simpler,
> just overlap the objects.
Is this really correct? There is this border of my drop, sitting in the
window-glas...
Or is it just a good looking workaround?

Greetings, Kalle


Post a reply to this message

From: KalleK
Subject: Re: Waterdrops on Glass... How?
Date: 15 Jan 2003 17:34:36
Message: <3e25e1fc@news.povray.org>
> Is this really correct? There is this border of my drop, sitting in
> the window-glas...
> Or is it just a good looking workaround?
>
> Greetings, Kalle

Well, answered in another piece of this thread...
Thank you anyway.
Kalle


Post a reply to this message

From: Florian Brucker
Subject: First results
Date: 16 Jan 2003 10:55:26
Message: <3e26d5ee$1@news.povray.org>
hey guys!

this nice little paper about water droplets on glass did really fascinate
me. I started right away yesterday evening (in spite of learning for a class
test *g*) and had half of the algorithm implented till I went to bed.
I rendered a small animation of it while I was at school this morning. You
can download it from

http://www.torfbold.com/droplets.avi (about 330K,100 Frames)
(its compressed using divx 5, you can download it from http://www.divx.com)

I'm afraid it is not water on glass but water on something non-transparent.
I didn't have the time to set up a nice demo-scene, suggestions welcome *g*.
For this animation, I used a grid of 120x120 cells. It took about one hour
to render it on my Athlon 600 256 MB SDRAM, half of the time was spent
parsing, the other half tracing. I think the algorithm could be made faster,
but I'm not a specialist in this field.
I'll release it after I coded the rest of the algorithm, so anybody can have
a try.

I didn't used the approach of using a mesh which was suggested by the paper,
but reduced it to a simple n*m grid. Due to this, it's only possible to
render droplets running down even plates like windows. These plates may have
nevertheless all possible inclination angles.

There is still much room for improvements, but this is as far as I came
yesterday:
- The basic algorithm for animations is implemented
- the masses of the droplets and their paths are already calculated
correctly

What is still to be done:
- calculating the correct size of each droplet according to its mass (at the
moment i'm using a simple linear connection)
- calculating the correct velocities of the droplets. I'm not sure about
this part of the paper as it is not clearly stated how these velocities are
used.

I think the result in the middle of the animation is pretty nice, but in the
end there are many non-moving masses around and you can see that they are
arranged in a grid. The blob-parameters i used were imho not that good, the
droplets lack "blobiness". I'm not very familiar with blobs, but I hope I'll
find some better values for them.
The behaviour of the droplets are dependent on some parameters. Perhaps
other values for these parametres will lead to nicer results, but i had not
yet time to try this.

Comments & ideas welcomed!

greetings:florian


Post a reply to this message

From: Per Rutquist
Subject: Re: Waterdrops on Glass... How?
Date: 7 Feb 2003 12:05:04
Message: <web.3e43e6949320e9d02ce39a3a0@news.povray.org>
Water-Glass-Air problem:

I've given this problem a lot of thought while trying to accurately model a
glass of Champagne. I've come up with four non-solutions.

Model with air-gap:
  -Doesn't work because it results in total reflection where
   there shouldn't be. (The air gap work the same way as the
   air gaps in optical fiber lines.)
  -Awful render times because of rays bouncing back and forth
   in the gap.

Union with overlap:
  -Not as much total reflection, but still incorrect.
  -Still awful render times, because of the two surfaces.

Merge with overlap:
  -Not really correct since merged objects shouldn't have different
   interiors.
  -The material is determined by the ray's point of entry, and
   doesn't change, because there is no surface at all where there
   were two surfaces before

Union + clipping.
  -Correct number of surfaces (one) between water and glass.
  -Problem when ray reenters air. (It doesn't, because it
     misses the surface where it should leave the water.)
  -Example:
    1st surface: Enter water (Ray is in water)
    2nd surface: Enter glass (Ray is in glass in water)
    - Surface to leave water is clipped
    3rd surface: Leave glass (Ray is in water, when it is actually in air.)

The only solution that I can think of would be to modify POV-ray itself.
The feature we need is a half-merge. That is a method which takes the
union of two objects, and keeps exactly one of the internal surfaces.

/Per


Post a reply to this message

From: Christopher James Huff
Subject: Re: Waterdrops on Glass... How?
Date: 7 Feb 2003 14:33:24
Message: <cjameshuff-0E5DB4.14301007022003@netplex.aussie.org>
In article <web.3e43e6949320e9d02ce39a3a0@news.povray.org>,
 "Per Rutquist" <per### [at] volvocom> wrote:

> The only solution that I can think of would be to modify POV-ray itself.
> The feature we need is a half-merge. That is a method which takes the
> union of two objects, and keeps exactly one of the internal surfaces.

Read the rest of this thread, what POV-Ray does has been explained. You 
should simply overlap the surfaces slightly, this will give the correct 
result.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Waterdrops on Glass... How?
Date: 7 Feb 2003 15:18:26
Message: <3e441492$1@news.povray.org>
Christopher James Huff wrote:
> Read the rest of this thread, what POV-Ray does has been explained. You 
> should simply overlap the surfaces slightly, this will give the correct 
> result.

No, that would be 'will give a visually acceptable result'.   Surfaces
don't overlap in the real world.

-- 
--Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Christopher James Huff
Subject: Re: Waterdrops on Glass... How?
Date: 10 Feb 2003 18:54:56
Message: <cjameshuff-E232E7.18515910022003@netplex.aussie.org>
In article <3e441492$1@news.povray.org>,
 "Timothy R. Cook" <z993126bellsouth.net> wrote:

> No, that would be 'will give a visually acceptable result'.   Surfaces
> don't overlap in the real world.

As already mentioned in this thread, the way POV handles this situation 
results in refraction being handled correctly.

Can we drop it now?

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Timothy R  Cook
Subject: Re: Waterdrops on Glass... How?
Date: 10 Feb 2003 19:22:18
Message: <3e48423a$1@news.povray.org>
Christopher James Huff wrote:
> Can we drop it now?

Water drop it, even.  hehehehhehehehehe

er

*cough*

-- 
--Tim Cook
http://home.bellsouth.net/p/PWP-empyrean

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GFA dpu- s: a?-- C++(++++) U P? L E--- W++(+++)>$
N++ o? K- w(+) O? M-(--) V? PS+(+++) PE(--) Y(--)
PGP-(--) t* 5++>+++++ X+ R* tv+ b++(+++) DI
D++(---) G(++) e*>++ h+ !r--- !y--
------END GEEK CODE BLOCK------


Post a reply to this message

From: Lazlo Hollyfeld
Subject: Re: Waterdrops on Glass... How?
Date: 2 Apr 2003 19:35:31
Message: <3e8b81d3$1@news.povray.org>
Hi!  I realize this is an old posting from the POV news sever, but you can
go here to see a new technique I created to make waterdroplets do what I
want them to do on a flat, glass surface, and am working on making it happen
on a curved surface.  The piece is animated, but here are some screenshots
to look at.  All the water droplets on this image are CG created.

http://www.actlab.utexas.edu/~arie/intersection/

Arie Stavchansky


"Per Rutquist" <per### [at] volvocom> wrote in message
news:web.3e43e6949320e9d02ce39a3a0@news.povray.org...
> Water-Glass-Air problem:
>
> I've given this problem a lot of thought while trying to accurately model
a
> glass of Champagne. I've come up with four non-solutions.
>
> Model with air-gap:
>   -Doesn't work because it results in total reflection where
>    there shouldn't be. (The air gap work the same way as the
>    air gaps in optical fiber lines.)
>   -Awful render times because of rays bouncing back and forth
>    in the gap.
>
> Union with overlap:
>   -Not as much total reflection, but still incorrect.
>   -Still awful render times, because of the two surfaces.
>
> Merge with overlap:
>   -Not really correct since merged objects shouldn't have different
>    interiors.
>   -The material is determined by the ray's point of entry, and
>    doesn't change, because there is no surface at all where there
>    were two surfaces before
>
> Union + clipping.
>   -Correct number of surfaces (one) between water and glass.
>   -Problem when ray reenters air. (It doesn't, because it
>      misses the surface where it should leave the water.)
>   -Example:
>     1st surface: Enter water (Ray is in water)
>     2nd surface: Enter glass (Ray is in glass in water)
>     - Surface to leave water is clipped
>     3rd surface: Leave glass (Ray is in water, when it is actually in
air.)
>
> The only solution that I can think of would be to modify POV-ray itself.
> The feature we need is a half-merge. That is a method which takes the
> union of two objects, and keeps exactly one of the internal surfaces.
>
> /Per
>
>


Post a reply to this message

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