POV-Ray : Newsgroups : povray.advanced-users : Waterdrops on Glass... How? Server Time
29 Jul 2024 10:19:08 EDT (-0400)
  Waterdrops on Glass... How? (Message 21 to 30 of 34)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 4 Messages >>>
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

<<< Previous 10 Messages Goto Latest 10 Messages Next 4 Messages >>>

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