POV-Ray : Newsgroups : povray.binaries.images : Seascape II -- Thanks (~50k) : Re: Seascape II -- Thanks (~50k) Server Time
12 Aug 2024 19:38:25 EDT (-0400)
  Re: Seascape II -- Thanks (~50k)  
From: Chris Johnson
Date: 27 Aug 2003 20:20:03
Message: <3f4d4ab3$1@news.povray.org>
-[I might be able to make some crests on the waves by fiddling around with
pigments and normals]-
By crests, do you mean white peaks of bubbles at the top of waves? If so,
you ought to be able to find out where these are on a heightfield by looking
for peaks in the heightfield, i.e. where the gradient is (close to) zero and
where the curvature is negative. These can be found by comparing each point
in the heightfield with its 4 closest neighbours (those points north, south,
east and west of it):

Gradient is close to zero when the difference in height between the north
and south points is small, and the difference in height between east and
west points is small.

Curvature is negative when the height of the point in question is greater
than the average heights of the four points around it.

When both of these conditions are satisfied, the point in the centre is on
the crest of a wave, and the texture could be modified accordingly.

I'm not sure how easy it would be to incorporate this into the Tim's LSSM
macros - I don't remember having seen macro-generated pigments/textures
before, so it may not be possible without an external program to generate
image files for colour maps.

-Chris


Post a reply to this message

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