POV-Ray : Newsgroups : povray.animations : how to animate water? : Re: how to animate water? Server Time
28 Jul 2024 14:29:04 EDT (-0400)
  Re: how to animate water?  
From: Peter Popov
Date: 21 Jan 2000 04:30:56
Message: <fw6IOOqL+alZ7CUZOIosSb9I8L=o@4ax.com>
On Thu, 20 Jan 2000 10:47:43 -0500, "Steven Durham"
<ste### [at] earthlinknet> wrote:

>hi group,
>could someone (Ken Maybe?) direct me to a good tutorial on the basics of
>animating water with Pov? I am talking about ripples on a pond or waves in
>an ocean.
>
>thanks.
>Steven

For a cheap and dirty solution you may use the ripple or waves normal
with phase hooked on the clock variable. You may use a normal_map
based on the cylindrical or spherical pattern to make them fade with
distance.

A little more complicated approach involves actual 3D modelling of the
ripples using an isosurface. You may use a function such as
sin(sqrt(x*x+z*z)) or directly a waves or ripple pattern. The
isosurface approach would require either of the Isosurface, Superpatch
or Megapov unofficial compiles.

Another approach would be (and I wonder why Ken, our resident hf
expert, missed it :) ) to use a height field. You can launch another
copy of POV-Ray before your scene (using the pre-frame shellout in the
INI file) to render the source image for the height field, which is
most easily done with an orthographic camera facing a plane of ambient
1 and a grayscale pigment such as ripples, waves, wrinkles, bumps or
some combination thereof.

The last, most physically correct, hardest and slowest to parse,
approach is to model the water surface by successively calculating
surface tension forces. Have a rectangular mesh of 100x100 points
(most easily done with a 100x100 array). Let the distance between two
adjacent points be 1 or sqrt(2) depending on the direction of
adjacance. Lastly, let each point pull the surrounding 8 points by
forces proportional to the respective distances to them. Now, apply a
disturbance in the mesh, for example move the central point 10 units
downward. Because all points interract with the ones surrounding them,
this model will reliably represent surface tension forces on a water
surface. So as you start rendering successive frames you'll see that
the mesh of points (render them using spheres or make a mesh object
out of them) will act as a real water surface. The disturbace of the
central point may represent the stone that causes the pond ripples.

Hope this hels some. Modelling water is no easy task and texturing
it... well, I'll let you find out by yourself if you haven't already
:)




Peter Popov
pet### [at] usanet
ICQ: 15002700


Post a reply to this message

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