POV-Ray : Newsgroups : povray.general : Liquid-Surface-Simulation-Macros released! Server Time
14 Oct 2026 05:53:15 EDT (-0400)
  Liquid-Surface-Simulation-Macros released! (Message 1 to 17 of 17)  
From: Tim Nikias v2 0
Subject: Liquid-Surface-Simulation-Macros released!
Date: 10 May 2003 03:54:14
Message: <3ebcb026$1@news.povray.org>
Working late into the night I've finally finished
my LSSM. I'm not quite sure if all bugs have been
tracked down, but there's only so much one man
alone can do...
For all those going out now and downloading it,
I'd like to have some feedback on the Help and
on the usage of the system, if its intuitive (as far
as it is possible) or irritating in some places.

Do note that the simulation just comes with one
"Walkthrough", a heavily commented example
which'll explain some stuff as it is being used. Its
meant as a hands-on experience to read and
grasp some ideas. Good-looking examples with
small scene-files are being looked for on my
HD. If you guys create something small and neat,
you could send it to me via email, I'll take a look
at it, and perhaps I'll just release an LSSM-Example-
Bundle or something like that.

Anyways, comments, suggestions (the typical
feedbacl) would be appreciated.

Regards,
Tim

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


Post a reply to this message

From: Hugo Asm
Subject: Re: Liquid-Surface-Simulation-Macros released!
Date: 10 May 2003 17:55:28
Message: <3ebd7550@news.povray.org>
Woooow.  :o)  I'm going to play with this tomorrow! You've done terrific
work.

Best regards
Hugo


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: Liquid-Surface-Simulation-Macros released!
Date: 10 May 2003 18:43:42
Message: <3ebd809e@news.povray.org>
Thanks. I just hope you'll stick to that
comment once you've begun using it... :-)

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

> Woooow.  :o)  I'm going to play with this tomorrow! You've done terrific
> work.
>
> Best regards
> Hugo
>
>


Post a reply to this message

From: Tim Nikias v2 0
Subject: LSSM Update!
Date: 22 May 2003 18:36:09
Message: <3ecd50d9@news.povray.org>
I've implemented some major and minor changes to the
core-code of the LSSM. Some issues had been taken care
of by using additional files for the more rare cases. I've
changed that to use one and the same file to check for
corrupt/correct/"needs update".
Additionally, some resimulation-parts where wiped out,
and replaced with ability to simply regenerate some
important parts, instead of redoing the entire simulation
(for example because of a corrupt Environmental-File) it
will just reparse the needed file "on the fly". Doesn't
work for all files of course.
Anyways, also added about 450 lines of comments into
the code to make it more obvious what I'm doing.

The main handling of the Macros hasn't changed, so
feel free to download the new version and overwrite the
old one, you're already existing files are broken with
it.

Regards,
Tim

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


Post a reply to this message

From: Hugo Asm
Subject: Re: LSSM Update!
Date: 23 May 2003 05:41:19
Message: <3ecdecbf$1@news.povray.org>
Tim,

Thanks for all this. I have not changed my mind regarding my earlier
statement: Terrific work!

I'm wondering (for some time now; even posted my idea some months ago) how
to add wind to the algoritm. Maybe you have a plan for this? I could just
average the wind and the LSSM of course, but it needs deeper integration to
interact with the enviroment. Maybe I can figure something out, when I read
your comments in the updated LSSM... Or maybe 'the master' is more qualified
to tell me, what I can do.

Wind aside. I see it's possible to make nice trails behind moving objects.
Do you have ideas how to push the water in front of a moving object? You
know, in real life there is a wave in many such cases.

I'm thinking about using the LSSM in a large area of water, for example a
river or ocean. It seems unnecessary to parse the entire area with the LSSM,
but it's pretty easy to fade out "your data", and fade in the data of the
..lets say "the river". The only problem is the wind. Even if LSSM would
support a kind of wind, if the algoritm is not the same as the river, it may
not look the same.. (This is just something to consider before working on
LSSM - wind)

I hope you don't mind my ideas. Of course you are free to take a vacation
from these macros, in that case, just ignore what I said. I think your
macros are well done and already support enough things to be useful. I
browsed around on google to find alternative water systems (non-pov or
whatever) and I found mostly junk. Your system looks good in comparison. I
hope people will begin to use it.

Regards,
Hugo


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: LSSM Update!
Date: 23 May 2003 19:18:29
Message: <3eceac45@news.povray.org>
Thanks again!

Regarding the wind:
Since wind would be a constant turbulence on the
surface, I'd say, for most cases it would be enough
to use some pattern and displace the final nodes a
little. If you'll take a look at the Help or the Source-Code,
you'll notice that LSS_Visualize() just uses another
macro to get the different nodes out of the system, and
then uses my MMM to build the mesh. If you do that
yourself by extracting the Node-Data using

#declare Node_Array=LSS_Get_MeshDat("System-Name");

You have an array of points which you can displace however
you like. These are the actual positions of the nodes, so
you might want to take care of displacing them only along
the "calm" surface normal.
After that, just use Make_Mesh() or Make_Smooth_Mesh()
from my MMM to visualize the mesh (Make_Smooth_Mesh
requires another macro beforeend to calculate the surface-normals,
but thats all supplied in MMM).

If you want wind which actually creates small waves which will
interact with objects... I'll have to think about that. It should be
possible to somehow generate a wave-state in which not single
drops are placed, but rather wave-fronts. The algorithm would then
move these onward... I'll have to think about that. If you've got some
specific suggestions on how much you'd want to define yourself
(like: use one image with painted waves along with an
initial direction, thats the first idea that pops into my mind), tell
me. I'll look into it. Shouldn't be that difficult though (unless you
want me to use functions, I'm no good at that yet).

Regarding the waves:
The system actually creates the waves in front of the moving object,
or, to be more precise, around the nodes that are newly blocked
(which are, on moving objects, the ones up front). Pushing that
wave around would make things more difficult, as I'd have to calculate
in which overall direction the object is moving at that point (which
gets pretty tricky when the object is just rotating). They actually
do push a small wave in front of them, but it doesn't grow and
accumulate, if thats what you mean. The problem is that the algorithm
doesn't actually simulate masses of water, but rather just works on
the height of the nodes and interpolates them to the surrounding
nodes. Thats the reason why waves cannot have different speeds or
"fall over" and create overhangs. The code is really complex as it is,
and IMHO, for a better simulation, a different underlying concept should
be used, with which overhangs, different speeded waves due to
"overrolling" etc are possible. But thats probably too difficult and
time-consuming for pure POV-Code.

Regards,
Tim

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

> Tim,
>
> Thanks for all this. I have not changed my mind regarding my earlier
> statement: Terrific work!
>
> I'm wondering (for some time now; even posted my idea some months ago) how
> to add wind to the algoritm. Maybe you have a plan for this? I could just
> average the wind and the LSSM of course, but it needs deeper integration
to
> interact with the enviroment. Maybe I can figure something out, when I
read
> your comments in the updated LSSM... Or maybe 'the master' is more
qualified
> to tell me, what I can do.
>
> Wind aside. I see it's possible to make nice trails behind moving objects.
> Do you have ideas how to push the water in front of a moving object? You
> know, in real life there is a wave in many such cases.
>
> I'm thinking about using the LSSM in a large area of water, for example a
> river or ocean. It seems unnecessary to parse the entire area with the
LSSM,
> but it's pretty easy to fade out "your data", and fade in the data of the
> ..lets say "the river". The only problem is the wind. Even if LSSM would
> support a kind of wind, if the algoritm is not the same as the river, it
may
> not look the same.. (This is just something to consider before working on
> LSSM - wind)
>
> I hope you don't mind my ideas. Of course you are free to take a vacation
> from these macros, in that case, just ignore what I said. I think your
> macros are well done and already support enough things to be useful. I
> browsed around on google to find alternative water systems (non-pov or
> whatever) and I found mostly junk. Your system looks good in comparison. I
> hope people will begin to use it.
>
> Regards,
> Hugo
>
>


Post a reply to this message

From: Patrick Elliott
Subject: Re: LSSM Update!
Date: 24 May 2003 18:33:21
Message: <MPG.1939a104f761c6bf9897f5@news.povray.org>
In article <3eceac45@news.povray.org>, tim### [at] gmxde says...
> Regarding the wind:
Haven't actually tried your macros yet, but.. With respect to wind things 
are somewhat complex. On the low end you get 'cats paws' little 
displacements that look like some animal running across the water. These 
can happen in no specific pattern or can leave a trail across the water 
that aren't visible on what is around it until the wavelets spread out 
and fade. Higher winds follow a similar random displacement, or perhaps 
simply a larger number of displacements with greater force. To be 
realistic any simulation of wind would likely need to duplicate these 
effects.

Then there is the second things I have wondered about. Moving an object 
through water is one things, how about removing what is already there, 
like when a foot goes in and out of the water, or like with boiling 
water, where there are 'pockets' that when they reach the surface leave a 
sudden 'hole' in the surface and thus cause the displacement? I would 
prefer to get bad news about these sorts of effects from the horses mouth 
so to speak, since trying to read other peoples code, especially when 
complex math is involved leaves me cross eyed and seriously confused. lol

-- 
void main () {
  If Schrödingers_cat is alive  
    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: LSSM Update!
Date: 24 May 2003 21:00:19
Message: <3ed015a3$1@news.povray.org>
It is possible to do create negative waves, just
specify negative heights! As for objects leaving
the water: The LSS_Object-Macro has one
parameter for just that. Once a node gets
accessible again, it can create a wave, be it
positive or negative.
Same applies to other Macros imprinting waves
into the simulation, you may use negative values.

To do that for the boiling water, you'd have to position
a single LSS_Drop at where you want the
bubble to appear, and use a negative wave-height.
Or you could use a sphere as bubble and imprint
negative waves when moving it with LSS_Object.

As for the wind: yes, that is pretty difficult. But to
get some aligned waves for near-wind effects could
be possible. The algorithm isn't a full-fledged hyper-
realistic mass-preserving simulation, so "looks
a lot like" is probably the best you can get in some
cases...
But its at least better than static water! :-)

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

> > Regarding the wind:
> Haven't actually tried your macros yet, but.. With respect to wind things
> are somewhat complex. On the low end you get 'cats paws' little
> displacements that look like some animal running across the water. These
> can happen in no specific pattern or can leave a trail across the water
> that aren't visible on what is around it until the wavelets spread out
> and fade. Higher winds follow a similar random displacement, or perhaps
> simply a larger number of displacements with greater force. To be
> realistic any simulation of wind would likely need to duplicate these
> effects.
>
> Then there is the second things I have wondered about. Moving an object
> through water is one things, how about removing what is already there,
> like when a foot goes in and out of the water, or like with boiling
> water, where there are 'pockets' that when they reach the surface leave a
> sudden 'hole' in the surface and thus cause the displacement? I would
> prefer to get bad news about these sorts of effects from the horses mouth
> so to speak, since trying to read other peoples code, especially when
> complex math is involved leaves me cross eyed and seriously confused. lol
>
> -- 
> void main () {
>   If Schrödingers_cat is alive
>     call functional_code()
>   else
>     call crash_windows();
> }


Post a reply to this message

From: Patrick Elliott
Subject: Re: LSSM Update!
Date: 25 May 2003 18:02:15
Message: <MPG.193aeb0eb66057dc9897f7@news.povray.org>
In article <3ed015a3$1@news.povray.org>, tim### [at] gmxde says...
> It is possible to do create negative waves, just
> specify negative heights! As for objects leaving
> the water: The LSS_Object-Macro has one
> parameter for just that. Once a node gets
> accessible again, it can create a wave, be it
> positive or negative.
> Same applies to other Macros imprinting waves
> into the simulation, you may use negative values.
> 
> To do that for the boiling water, you'd have to position
> a single LSS_Drop at where you want the
> bubble to appear, and use a negative wave-height.
> Or you could use a sphere as bubble and imprint
> negative waves when moving it with LSS_Object.
> 
Hmm. Ok.. For it to work I considered having the bubbles start out 
'under' the surface as in real boiling and more or less deleting the 
spheres once they hit the surface. The problem of course was a) how to 
'delete' them so that they had the intended effect and b) how to tell if 
you hit the surface when it was already perturbed. May just experiment a 
bit with it, if I ever get around to working on it or the other 4-5 
projects I keep telling myself I need to start on/finish. lol

> As for the wind: yes, that is pretty difficult. But to
> get some aligned waves for near-wind effects could
> be possible. The algorithm isn't a full-fledged hyper-
> realistic mass-preserving simulation, so "looks
> a lot like" is probably the best you can get in some
> cases...
> But its at least better than static water! :-)
> 
> 

Definitely. Though some of us are never satisfied with merely better than 
nothing. lol

-- 
void main () {
  If Schrödingers_cat is alive  
    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Patrick Elliott
Subject: Re: LSSM Update!
Date: 25 May 2003 18:13:15
Message: <MPG.193aeda1f3b8f929897f8@news.povray.org>
How about using a particle system style thing to 'add' positive amounts 
at the top of a sloped surface and something to 'delete' some of the 
'surface' at the bottom, so that you get flowing water as the algorithm 
tries to stabilize a surface that is literally being continually 
destablized at both ends? Would something like that work? All of your 
samples assume a 'flat' basin that has stable confinement.

-- 
void main () {
  If Schrödingers_cat is alive  
    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: LSSM Update!
Date: 25 May 2003 19:55:01
Message: <3ed157d5$3@news.povray.org>
I'm not quiet sure what you're after here.

But to make one thing clear: the algorithm
works by taking the difference from the equilibrium
height (where the surface is fully calm), and spreads
the heights out until they are dampened away. During
this process they get reflected off of walls etc.

What you're suggesting seems to me like positive
waves rolling down a surface, while negative waves
would roll up the surface (all discrepancies are handled
the same way). It could be possible that it looks like
water-trails rolling down a hill, but that has to
experimented with. And the macros so far just work
on a rectangular grid, which should cover a lot of
effects where water is being used, but this doesn't
make it easier to apply onto hills...


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

> How about using a particle system style thing to 'add' positive amounts
> at the top of a sloped surface and something to 'delete' some of the
> 'surface' at the bottom, so that you get flowing water as the algorithm
> tries to stabilize a surface that is literally being continually
> destablized at both ends? Would something like that work? All of your
> samples assume a 'flat' basin that has stable confinement.
>
> -- 
> void main () {
>   If Schrödingers_cat is alive
>     call functional_code()
>   else
>     call crash_windows();
> }


Post a reply to this message

From: Patrick Elliott
Subject: Re: LSSM Update!
Date: 26 May 2003 14:20:49
Message: <MPG.193c08bbabe5ce4d9897f9@news.povray.org>
In article <3ed157d5$3@news.povray.org>, tim### [at] gmxde says...
> I'm not quiet sure what you're after here.
> 
> But to make one thing clear: the algorithm
> works by taking the difference from the equilibrium
> height (where the surface is fully calm), and spreads
> the heights out until they are dampened away. During
> this process they get reflected off of walls etc.
> 
> What you're suggesting seems to me like positive
> waves rolling down a surface, while negative waves
> would roll up the surface (all discrepancies are handled
> the same way). It could be possible that it looks like
> water-trails rolling down a hill, but that has to
> experimented with. And the macros so far just work
> on a rectangular grid, which should cover a lot of
> effects where water is being used, but this doesn't
> make it easier to apply onto hills...
> 
> 
> 
You got it right. So the reality is a big 'maybe'. :p Figured if your 
macros worked then it would be a serious improvement over particle 
systems which so far have proven to be of questionable use for this sort 
of thing in what examples I have seen for them. I had figured that with
a stream you would place 'channel' through the scene which would contain 
the surface and any rocks, etc. to be interacted with, then hide both 
ends so that that addition off positive and negative waves at the two 
ends would not be visible. For something like a water trails a particles 
system would still be best, though getting the particle sizes small 
enough to avoid having it look stupid (as in most cases I have seen so 
far) isn't exactly easy. For a real stream though... Definitely going to 
have to play with this thing a bit one of these days. lol

-- 
void main () {
  If Schrödingers_cat is alive  
    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Florian Brucker
Subject: Re: LSSM Update!
Date: 27 May 2003 08:26:55
Message: <3ed3598f@news.povray.org>
Hey all
> For something like a water trails a particles system would still be best
Perhaps you should have a look at Rune's great particle system. It has no
mass-mass-collision-detection between the particles themselves (only
paritcle-environment), so filling a glass with water is not possible (all
the particles would stay on the bottom). But it makes wonderful streams,
waterfalls, fountains and even explosions. You can get it from
http://www.runevision.com

hth,
florian


Post a reply to this message

From: Patrick Elliott
Subject: Re: LSSM Update!
Date: 27 May 2003 14:53:31
Message: <MPG.193d61e0b8bf5f399897fb@news.povray.org>
In article <3ed3598f@news.povray.org>, tor### [at] torfboldcom says...
> Hey all
> > For something like a water trails a particles system would still be best
> Perhaps you should have a look at Rune's great particle system. It has no
> mass-mass-collision-detection between the particles themselves (only
> paritcle-environment), so filling a glass with water is not possible (all
> the particles would stay on the bottom). But it makes wonderful streams,
> waterfalls, fountains and even explosions. You can get it from
> http://www.runevision.com
> 
> hth,
> florian
> 
> 
> 

Yes, but I am not looking for water trails or the like, but the sort of 
real stream that is a transparent surface (not particulate) and is merely 
perturbed by any rocks or the like is interacts with. Now combining 
particle systems into this so that say an area where you get spatter and 
splashes would emit particles that when they hit add to the positive wave 
of this Tim's system would be very handy. However, as you mention, 
neither particle systems not this one can effectively simulate every 
situation. Making some provisions for some combination of them, assuming 
that my theoretical use of Tim's macros will work would provide better 
realism. Though actually... For it to really work right you would need a 
combinational system that only emitted particles when a 'wave' crested 
and began to collapse again. So that the 'spray' would be thrown from the 
edge of that wave. Tim's is easier for a standing pool and 'might' work 
for a river or stream.

Particle systems, especially with inter-particle reactions would be much 
slower to simulate the same thing (I assume) in and one reason why the 
examples often look horrid is that a 50 foot waterfall, for example, 
doesn't have droplets any larger than a 5 foot fountain. If you cheat, 
then you get a large structure with globs of water that visually are ten 
feet wide, but if you scale up the waterfall to a real size the number of 
particles needed skyrockets. Obviously you can't do much about the 
problem with 50 foot waterfalls, but if you are making a river and you 
want to show spray, then a perturbed surface, with a 'few' carefully 
placed particle emitters around some key rocks and which have the right 
droplet size, makes more sense than using a particle system for the 
entire thing. However, if Tim's macros can't simulate such a sloped 
surface effect...

I suspect however that is might, since a relatively flat river or stream 
could be thought of as one of his macros with one end open. I.e. water 
'joining' one end causes displacement, but the edges do not generate a 
return deflection unless the wave hits an intervening object. If all the 
added disturbance occurs at the 'high' end and the low end is open and 
just swallows the wave that reach it.... Guess that is the real question, 
can it be made to ignore the 'edges' of the surface as a deflection point 
and only treat intervening objects for that purpose. Though that is 
probably not something that it will do. :p

-- 
void main () {
  If Schrödingers_cat is alive  
    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: LSSM Update!
Date: 27 May 2003 15:51:21
Message: <3ed3c1b9@news.povray.org>
If I've understood you correctly, you want a
possibility to create "wave-swallowing" effects,
meaning that waves hitting a certain region won't
get reflected, in order to create your river.

That should be possible. The effect of reflecting
waves happens because the height of the wave
gets spread out less where it can't spread onto
blocked nodes. But, if I'd just nullify the heights
at certain points, the waves won't move further
than there...

In fact, as I've put a possibility to call a macro
between every step, this could be used to create
just the "no-wave-reflection" effect you're after.
I'd have to look into that, especially since this
might be handy for other situations as well.

As for particle-wave interaction: You could always
use POV's trace-function to check if an arbitrary
positions intersects the water-mesh, and if it does,
just place a LSS_Drop at the correct coordinates.
Emitting particles from the system would be a little
more difficult I guess, but again, the macro which
may be called after every step might be useful for that,
combined with some other macros which keep track
of wave-heights and -changes...
But I'm not much into that specific part (particles)
at the moment. I'm currently under a little stress, but
I'll look at wave-swallowing effects as soon as possible.

Other than that, all I can say is that the system is
more suited for calm waves and a little effect than
storms... As I mention in the help: This isn't a fully-fledged
volume-preserving simulation. Its a neat little effect,
originating from 2D-pixel-displacement, so don't expect
too much of it... :-)

(I still think highly of it! I'm proud I've begun and
finished something worthwhile which someone might
actually use... :-)

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

> > Hey all
> > > For something like a water trails a particles system would still be
best
> > Perhaps you should have a look at Rune's great particle system. It has
no
> > mass-mass-collision-detection between the particles themselves (only
> > paritcle-environment), so filling a glass with water is not possible
(all
> > the particles would stay on the bottom). But it makes wonderful streams,
> > waterfalls, fountains and even explosions. You can get it from
> > http://www.runevision.com
> >
> > hth,
> > florian
> >
> >
> >
>
> Yes, but I am not looking for water trails or the like, but the sort of
> real stream that is a transparent surface (not particulate) and is merely
> perturbed by any rocks or the like is interacts with. Now combining
> particle systems into this so that say an area where you get spatter and
> splashes would emit particles that when they hit add to the positive wave
> of this Tim's system would be very handy. However, as you mention,
> neither particle systems not this one can effectively simulate every
> situation. Making some provisions for some combination of them, assuming
> that my theoretical use of Tim's macros will work would provide better
> realism. Though actually... For it to really work right you would need a
> combinational system that only emitted particles when a 'wave' crested
> and began to collapse again. So that the 'spray' would be thrown from the
> edge of that wave. Tim's is easier for a standing pool and 'might' work
> for a river or stream.
>
> Particle systems, especially with inter-particle reactions would be much
> slower to simulate the same thing (I assume) in and one reason why the
> examples often look horrid is that a 50 foot waterfall, for example,
> doesn't have droplets any larger than a 5 foot fountain. If you cheat,
> then you get a large structure with globs of water that visually are ten
> feet wide, but if you scale up the waterfall to a real size the number of
> particles needed skyrockets. Obviously you can't do much about the
> problem with 50 foot waterfalls, but if you are making a river and you
> want to show spray, then a perturbed surface, with a 'few' carefully
> placed particle emitters around some key rocks and which have the right
> droplet size, makes more sense than using a particle system for the
> entire thing. However, if Tim's macros can't simulate such a sloped
> surface effect...
>
> I suspect however that is might, since a relatively flat river or stream
> could be thought of as one of his macros with one end open. I.e. water
> 'joining' one end causes displacement, but the edges do not generate a
> return deflection unless the wave hits an intervening object. If all the
> added disturbance occurs at the 'high' end and the low end is open and
> just swallows the wave that reach it.... Guess that is the real question,
> can it be made to ignore the 'edges' of the surface as a deflection point
> and only treat intervening objects for that purpose. Though that is
> probably not something that it will do. :p
>
> -- 
> void main () {
>   If Schrödingers_cat is alive
>     call functional_code()
>   else
>     call crash_windows();
> }


Post a reply to this message

From: Tim Nikias v2 0
Subject: Re: LSSM Update!
Date: 28 May 2003 13:13:18
Message: <3ed4ee2e$1@news.povray.org>
I tried swallowing waves by setting certain
nodes to zero-height, but this has the same
effect as a wall does, waves get reflected.
I think this is due to how the heights of nodes
are gathered and averaged to spread the
waves, a zero height is still different than what
the travelling wave would have been, and
voila: the wave seems to get reflected.

The only other solution I could think of would
be to pass the wave heights on to a next node,
much like pushing the waves downstream...
The top line, which can't get data from anywhere,
will then just randomly create new heights.

I'll cook up the code and post it in binaries.animations
shortly.

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

> If I've understood you correctly, you want a
> possibility to create "wave-swallowing" effects,
> meaning that waves hitting a certain region won't
> get reflected, in order to create your river.
>
> That should be possible. The effect of reflecting
> waves happens because the height of the wave
> gets spread out less where it can't spread onto
> blocked nodes. But, if I'd just nullify the heights
> at certain points, the waves won't move further
> than there...
>
> In fact, as I've put a possibility to call a macro
> between every step, this could be used to create
> just the "no-wave-reflection" effect you're after.
> I'd have to look into that, especially since this
> might be handy for other situations as well.
>
> As for particle-wave interaction: You could always
> use POV's trace-function to check if an arbitrary
> positions intersects the water-mesh, and if it does,
> just place a LSS_Drop at the correct coordinates.
> Emitting particles from the system would be a little
> more difficult I guess, but again, the macro which
> may be called after every step might be useful for that,
> combined with some other macros which keep track
> of wave-heights and -changes...
> But I'm not much into that specific part (particles)
> at the moment. I'm currently under a little stress, but
> I'll look at wave-swallowing effects as soon as possible.
>
> Other than that, all I can say is that the system is
> more suited for calm waves and a little effect than
> storms... As I mention in the help: This isn't a fully-fledged
> volume-preserving simulation. Its a neat little effect,
> originating from 2D-pixel-displacement, so don't expect
> too much of it... :-)
>
> (I still think highly of it! I'm proud I've begun and
> finished something worthwhile which someone might
> actually use... :-)
>
> -- 
> Tim Nikias v2.0
> Homepage: http://www.digitaltwilight.de/no_lights
> Email: Tim### [at] gmxde
>
> > > Hey all
> > > > For something like a water trails a particles system would still be
> best
> > > Perhaps you should have a look at Rune's great particle system. It has
> no
> > > mass-mass-collision-detection between the particles themselves (only
> > > paritcle-environment), so filling a glass with water is not possible
> (all
> > > the particles would stay on the bottom). But it makes wonderful
streams,
> > > waterfalls, fountains and even explosions. You can get it from
> > > http://www.runevision.com
> > >
> > > hth,
> > > florian
> > >
> > >
> > >
> >
> > Yes, but I am not looking for water trails or the like, but the sort of
> > real stream that is a transparent surface (not particulate) and is
merely
> > perturbed by any rocks or the like is interacts with. Now combining
> > particle systems into this so that say an area where you get spatter and
> > splashes would emit particles that when they hit add to the positive
wave
> > of this Tim's system would be very handy. However, as you mention,
> > neither particle systems not this one can effectively simulate every
> > situation. Making some provisions for some combination of them, assuming
> > that my theoretical use of Tim's macros will work would provide better
> > realism. Though actually... For it to really work right you would need a
> > combinational system that only emitted particles when a 'wave' crested
> > and began to collapse again. So that the 'spray' would be thrown from
the
> > edge of that wave. Tim's is easier for a standing pool and 'might' work
> > for a river or stream.
> >
> > Particle systems, especially with inter-particle reactions would be much
> > slower to simulate the same thing (I assume) in and one reason why the
> > examples often look horrid is that a 50 foot waterfall, for example,
> > doesn't have droplets any larger than a 5 foot fountain. If you cheat,
> > then you get a large structure with globs of water that visually are ten
> > feet wide, but if you scale up the waterfall to a real size the number
of
> > particles needed skyrockets. Obviously you can't do much about the
> > problem with 50 foot waterfalls, but if you are making a river and you
> > want to show spray, then a perturbed surface, with a 'few' carefully
> > placed particle emitters around some key rocks and which have the right
> > droplet size, makes more sense than using a particle system for the
> > entire thing. However, if Tim's macros can't simulate such a sloped
> > surface effect...
> >
> > I suspect however that is might, since a relatively flat river or stream
> > could be thought of as one of his macros with one end open. I.e. water
> > 'joining' one end causes displacement, but the edges do not generate a
> > return deflection unless the wave hits an intervening object. If all the
> > added disturbance occurs at the 'high' end and the low end is open and
> > just swallows the wave that reach it.... Guess that is the real
question,
> > can it be made to ignore the 'edges' of the surface as a deflection
point
> > and only treat intervening objects for that purpose. Though that is
> > probably not something that it will do. :p
> >
> > -- 
> > void main () {
> >   If Schrödingers_cat is alive
> >     call functional_code()
> >   else
> >     call crash_windows();
> > }
>
>


Post a reply to this message

From: Patrick Elliott
Subject: Re: LSSM Update!
Date: 28 May 2003 14:44:56
Message: <MPG.193eb15e84e901249897fc@news.povray.org>
In article <3ed4ee2e$1@news.povray.org>, tim### [at] gmxde says...
> I tried swallowing waves by setting certain
> nodes to zero-height, but this has the same
> effect as a wall does, waves get reflected.
> I think this is due to how the heights of nodes
> are gathered and averaged to spread the
> waves, a zero height is still different than what
> the travelling wave would have been, and
> voila: the wave seems to get reflected.
> 
> The only other solution I could think of would
> be to pass the wave heights on to a next node,
> much like pushing the waves downstream...
> The top line, which can't get data from anywhere,
> will then just randomly create new heights.
> 
> I'll cook up the code and post it in binaries.animations
> shortly.
> 
> 
Ok. Will be interesting to see. ;)

I do realize that like most stuff not implemented in the engine this is 
basically a hack, but half the useful stuff people do are hacks. lol A 
complete system would obviously include the surface 'pushing' objects 
around and different amounts of wave absorption as well depending on 
material interacted with. This is obviously not practical in your macros. 
;) lol But it is definitely a nice tool.

-- 
void main () {
  If Schrödingers_cat is alive  
    call functional_code()
  else
    call crash_windows();
}


Post a reply to this message

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