POV-Ray : Newsgroups : povray.binaries.animations : Paths on Water (238kb MPG1) : Re: Paths on Water (238kb MPG1) Server Time
19 Jul 2024 09:29:19 EDT (-0400)
  Re: Paths on Water (238kb MPG1)  
From: Tim Nikias v2 0
Date: 31 Mar 2003 10:37:36
Message: <3e8860c0$1@news.povray.org>
> Way cool!  Not frozen but looks very real.  ;o)  Now comes the usual
> questions: Ease of use, render time? Is it possible to add wind without
> slowing down things a lot?  I guess it's easy to add something on the one
> side (one angle) that cause disturbance. But the wind needs to continue
all
> over the area, otherwise it would fade out, the greater distance it
reaches,
> from the one side... What about making a sinus wind, affecting the points
> every X steps? ... just some inspiration for you.

Thanks!

Well, parsing time is always the same, cause it has
to check a lot of arrays for cross-referencing, if waves
occur and what to calculate when they do.
When certain arrays don't get modified, they won't be
saved to disk again (which can save considerable parsing
time).

Parsing time?

With 48x48 nodes its just about 10 seconds on my 1.4GHz
Athlon, this includes generating the mesh with my MMM. This
time doesn't vary to great extent. It takes longer when the
environment has to be parsed in the beginning, and when certain
other effects actually happen, they take their time as well, but
I've tried to keep the script checking if they actually need to
calculate that much. The time naturally increases with larger
resolution, but the amount of waves have no effect on the parsing.

Ease of use? Here's an example:

[Some few declarations for creating the initial
surface, like Node-Resolution, corners, etc,
but above all: Filename! like #declare Water_Filename="test"]

Water_Start()

//Whereever the water is inside the environmental object,
// the node is switched to off and never by the wave-calculations.
#declare Environment=
cylinder{<0,-1,0>,<0,1,0>,4 inverse}
Water_Environment("test",Environment")

//Set the rain
#declare Water_Rain_Beg=0;
#declare Water_Rain_End=1/25;
#declare Water_Rain_DropsPerFrame=3;
#declare Water_Rain_Magnitude=<.6,.75>;
Water_Rain("test")

//Default for dampening is .95, and setting it here
//changes that
#declare Water_Dampening=.95;
Water_Step("test")

//Retrieve the data
#declare MeshData=Water_GetMeshDat("test")

Then, MeshData is a 2D-Array with all indices of the
surface-mesh. I use my Mesh-Modifying-Macros
to generate the mesh, and thats it!

I've also got some smaller Macros, like
Water_Stomp("test",Magnitude,Time_Of_Stomp),
which produces a "stomping-effect" near edges of
the environment, the water is raised to create that
Jurassic Park T-Rex-Effect. :-)

I'm also planning on writing some macros to easily
create custom effects (the macros will then help in
modifying the data in the proper way).

After the MeshData is retrieved, you can of course
still alter the nodes, and add wind later on if you
don't want the wind to be calculated inside the
wave-algorithms. For example that multi-sine-wave
simulation for natural ocean waves could just
be superimposed onto the data. Once a wave is
created on the surface via the macros, you can't
modify them. You can just add and subtract heights,
both will move outwards as waves do, so superimposing
might be the way to go for wind.

Regards,
Tim

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


Post a reply to this message

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