|
|
High!
Once again I embarked on an attempt to build at least a crude version of
Khyberspace... therefore, I downloaded the 93 SRTM data tiles covering
Afghanistan (each one square degree at 1200 by 1200 measuring points),
then used a geo-visualization software called "3DEM" to remove faulty
radar samples (produced mostly by cloud cover), converted the exported
ASCII terrain matrix files to 16-bit PNG heightfields via a PoV-Ray
script (attached here) and then generated mesh2 objects following
Earth's curvature from these PNG heightfields.
For performance reasons, I generated the mesh2 data as a (huge!) *.inc
file rather than calculating them within the final scene script, using a
separate PoV-Ray script ("mesh2writer.pov").
Before starting with Afghanistan (those tiles need some more intricate
processing as they contain many error pixels), I tried a part of the
world more accurately mapped by the SRTM Space Shuttle mission in 2000 -
the part of Germany where I live, four one-square-degree tiles stitched
When I rendered the scene for the first time, I found ugly gaps between
the triangles of them mesh2 - and instantly I was reminded of my earlier
attempt at terrain from SRTM tiles back in 2005, when the same occurred.
Back then, IIRC it was Mike Williams who suggested rounding errors as
the reason for the gaps, so I looked up my old PoV-Ray scripts to find
out how I solved the problem...
Back then, I subtracted from each vertex of the mesh2 a vector
consisting of a normalized direction vector according the the
geographical positon of the vertex multiplied by Earth's radius. At the
end of the mesh statement, I re-translated the whole thing back to its
original position (see script file "png2mesh2.pov").
But when I now render the scene, I just get empty blackness... what went
wrong?
See you in Khyberspace!
Yadgar
Post a reply to this message
Attachments:
Download '2010-11-06 seven mountains from across the rhine, take 1.jpg' (16 KB)
Download 'rheinruhr.png' (4436 KB)
Download 'png2mesh2.pov.txt' (3 KB)
Download 'us-ascii' (3 KB)
Preview of image '2010-11-06 seven mountains from across the rhine, take 1.jpg'
Preview of image 'rheinruhr.png'
|
|