POV-Ray : Newsgroups : povray.advanced-users : Editing or creating an image or heightfield in POV-Ray : Re: Editing or creating an image or heightfield in POV-Ray Server Time
3 Dec 2023 00:04:46 EST (-0500)
  Re: Editing or creating an image or heightfield in POV-Ray  
From: Bald Eagle
Date: 10 Sep 2023 17:30:00
Message: <web.64fe3522574212401f9dae3025979125@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

> I guess I'll just bite the bullet and remember how to make a mesh, calculate the
> normals, make smooth triangles..... {sigh}.

I abandoned an A* driven method in favor of using existing algorithms instead of
starting from scratch with no real idea what I'm doing.  (A* might be useful for
filling in the terrain with water cascading downhill via the erosion paths.)

So, I made the meshes, calculated the normals, made the smooth_triangles, edited
a small erosion algorithm, ran it a few times (which took longer that it should
have), and then added some elapsed time code.
Had to hack the algorithm to get rid of the deep pitting.

My meshes look terrible, my color_map is all off, etc.

I'm using a tiny 358 x 358 image for my terrain.  That's 128164 pixels or 256328
triangles (maybe a few less).

I then drop 20,000 raindrops that undergo a max of 50 erosion/deposition cycles.

No idea what the parameter values ought to be.

Building HeightField array ...
Took 2.47 sec to build the HeightField array.
Making starting mesh ...
Took 59.70 sec to build the starting mesh.
Took 1.43 min to erode starting mesh.
Making eroded mesh ...
Took 1.08 min to make the Eroded mesh.

Parser Time
  Parse Time:       0 hours  3 minutes 32 seconds (212.499 seconds)
Elapsed time 215.84 seconds.

That's an awful damned long time to build a stinking mesh, especially since the
array gets populated in 2.47 sec.

Anyway, it's a start, and I'm sure there are improvements to be made, for those
interested in having a go at it.

- BW

Post a reply to this message

Download 'a-star heightmap.png' (453 KB)

Preview of image 'a-star heightmap.png'
a-star heightmap.png


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