POV-Ray : Newsgroups : povray.general : Spherical Height fields? : Re: Spherical Height fields? Server Time
13 Aug 2024 15:32:44 EDT (-0400)
  Re: Spherical Height fields?  
From: Jerry Anning
Date: 9 Aug 1998 13:59:35
Message: <35CDD57B.D6AE8E57@dhol.com>
Bret Slivka wrote:

> I'm working on a 3d model of the planet Earth. I am trying to figure out
> how to take this elevation map, turn it into a heightfield and somehow
> "wrap" this heightfield around a sphere. but i'm a little stumped

As Dan Connelly points out, the surface of the Earth is relatively
smoother than a billiard ball.  The heights of surface features compared
to the radius of the Earth are negligible.  Nonetheless, relief globes
sell well and provide useful info and a pov relief globe would be a good
thing, so here is a little bit of information.

I would need to see the elevation map to tell you for sure how to turn
it into a heightfield, but if brightness corresponds to height, just use
pov to project it on a square as an image map, instead of lights, give
it an ambient 1 finish, and use an orthographic camera with (if you
want, say, 512x512 resolution) up of <0, 512, 0> and right of <512, 0,
0>.  Position the camera at <.50001, .50001, -1> and look_at <.5, .5,
0>.  Use hf_gray_16.  In any case, once you have the heightfield, you
can either:

a) Get a free program from the brilliant John Beale called orb-cyl.  It
can be found at http://shell3.ba.best.com/~beale/ .  Look in the source
code section of the page.  It is available as both source and executable
for dos or linux.  It will do the job, although it will be fairly slow
and memory intensive.  This is probably the current method of choice.

or

b) I have recently been experimenting with a trick using Tmpov, a Win95
custom compile of 3.02 with many extra features available at
http://twysted.net .  It has an hf_height_at command.  You can create
the height field invisibly in some convenient location and use
hf_height_at to read heights of the hf points, which you can then use a
bit of math to project on to a large sphere as spheres, blobs,
cylinders, cones, whatever of appropriate height.  With enough
resolution in the height field, this can give interesting results. 
Again, time and memory can be an issue.  If time and health permit, I
may write an include or at least a tutorial on this subject.

Incidentally, if your elevation map is from a freely available source, I
would like to see a link.  I have been looking for such a map for my own
experiments along these lines.

Jerry Anning
cle### [at] dholcom


Post a reply to this message

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