|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi to all..
Sorry for my bad english, but I need a code-sample or a tutorial that
describes how POV-Rays isosurface objects can be used to render a landscape
from digital elevation maps (DEM)..
can someone help me?..please?..
thanks,
Alberto
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"albe99" <alb### [at] hotmailit> wrote:
> Hi to all..
> Sorry for my bad english, but I need a code-sample or a tutorial that
> describes how POV-Rays isosurface objects can be used to render a landscape
> from digital elevation maps (DEM)..
> can someone help me?..please?..
>
> thanks,
> Alberto
Well, I don't know for sure how it's done, but I guess it all depends on
what you want exactly: do you want an exact replica of the data? In this
case I would use a mesh rather than an isosurface. I'm sure somebody more
knowledgeable than me can give you a macro that reads the data and outputs
triangles. Otherwise, if you want smooth surfaces that follow the data with
some error (smoothing out the data), you can use isosurfaces: pick a
function shape you fancy, impose boundary conditions if you want to use
splines, find out the parameters in a regression package (Excel can do it
too, although it isn't recommended) and render.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
albe99 wrote:
> Hi to all..
> Sorry for my bad english, but I need a code-sample or a tutorial that
> describes how POV-Rays isosurface objects can be used to render a landscape
> from digital elevation maps (DEM)..
> can someone help me?..please?..
The isusrface tutorial in the official docs contains an example how to
displace a planar surface with a function:
http://www.povray.org/documentation/view/3.6.1/73/
Instead of the noise function used there just use an image_pattern
pattern function or image_map pigment function. There is also a macro
in the IsoCSG library that wraps an isosurface to be used like a
height_field:
http://www.imagico.de/pov/ic/docu02.html#Heightfield
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 15 Oct. 2006)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
@Grassblade
Thank you very much, I think this is the best way for me:
> if you want smooth surfaces that follow the data with
> some error (smoothing out the data), you can use isosurfaces: pick a
> function shape you fancy, impose boundary conditions if you want to use
> splines, find out the parameters in a regression package (Excel can do it
> too, although it isn't recommended) and render.
(..it would be nice to see a code sample.. :) )
@Christoph Hormann
thank you so much for these very useful liks..
Alberto.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"albe99" <alb### [at] hotmailit> wrote:
> Hi to all..
> Sorry for my bad english, but I need a code-sample or a tutorial that
> describes how POV-Rays isosurface objects can be used to render a landscape
> from digital elevation maps (DEM)..
> can someone help me?..please?..
>
> thanks,
> Alberto
DEM data is better handled by POV's "height field" function, which creates a
mesh of triangles on the fly.
The trick is to convert the DEM data into a form which the height field
function can use.
This can be done by reading the DEM data and writing a Targa file in which
only the red and blue bytes contain the elevation data. There used to be
some POV utilities which could do this; for my own part, I use software
called MacDem, on a Mac, and this software is quite amazing, in that it
very quickly reads DEMs and renders a shaded-relief image of the terrain
(in a few seconds at most), but, perhaps more importantly, it can merge
multiple DEMs.
And then it will quickly export the (possibly merged) DEM data to a Targa
file of exactly the right sort, and to a POV scene file which contains the
exact scaling information required to render the terrain without
distortion.
I do not know if any such freeware or sharware is available for Windows or
Linux platforms; the combination of merging DEMs and writing, not only the
Targa file, but the POV scene file, is wonderful.
I have been using POV to render landscapes for ten years now. One can also
use a sun position algorithm to place a virtual sun in the sky, for any
minute of any day of any year.
I doubt this will help, but I hope it does.
--Russell Towle
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Russell Towle" <rto### [at] inreachcom> wrote:
> "albe99" <alb### [at] hotmailit> wrote:
> > Hi to all..
> > Sorry for my bad english, but I need a code-sample or a tutorial that
> > describes how POV-Rays isosurface objects can be used to render a landscape
> > from digital elevation maps (DEM)..
> > can someone help me?..please?..
> >
> > thanks,
> > Alberto
>
>
> DEM data is better handled by POV's "height field" function, which creates a
> mesh of triangles on the fly.
>
> The trick is to convert the DEM data into a form which the height field
> function can use.
>
> This can be done by reading the DEM data and writing a Targa file in which
> only the red and blue bytes contain the elevation data. There used to be
> some POV utilities which could do this; for my own part, I use software
> called MacDem, on a Mac, and this software is quite amazing, in that it
> very quickly reads DEMs and renders a shaded-relief image of the terrain
> (in a few seconds at most), but, perhaps more importantly, it can merge
> multiple DEMs.
>
> And then it will quickly export the (possibly merged) DEM data to a Targa
> file of exactly the right sort, and to a POV scene file which contains the
> exact scaling information required to render the terrain without
> distortion.
>
> I do not know if any such freeware or sharware is available for Windows or
> Linux platforms; the combination of merging DEMs and writing, not only the
> Targa file, but the POV scene file, is wonderful.
>
> I have been using POV to render landscapes for ten years now. One can also
> use a sun position algorithm to place a virtual sun in the sky, for any
> minute of any day of any year.
>
> I doubt this will help, but I hope it does.
>
> --Russell Towle
You can download Dem2POV for windows to convert your data to tga. Link:
http://www.programmersheaven.com/download/1799/download.aspx Then use a
height field as suggested by Russell Towle.
For the isosurface the code might be something like (I don't know for sure,
I'm a newbie :p):
#declare fn_Pigm=function {
pigment {
image_map{ tga "filename.tga" // replace filename with whatever you
called your tga file
map type 0
}
scale 1// if pic is too small increase value
}
isosurface{
function{fn_Pigm
max_gradient // put a suitable value here
bounded_by{box <> <>} // put suitable values in the <>
}
}
Be sure to put some colour on it.
For smoothing the data, I'm on it, but I first need to figure out how to
invert a n*n matrix in POV. No need to do the calculations in another
program after all. :p
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
So.. perhaps "height field" can be the solution, but I'm a linux user and
can't use MacDem or Dem2POV..
I've found srtm (geotiff converted to png or tga) data ready to use like an
image_map at this link:
http://srtm.csi.cgiar.org/SELECTION/inputcoord.asp
it seems works pretty good..
bye and thank you again..
Alberto.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Russell Towle wrote:
>
> DEM data is better handled by POV's "height field" function, which creates a
> mesh of triangles on the fly.
In this general form this is certainly wrong. Using an isosurface is
more memory efficient and you can get much higher quality results (no
mesh artefacts). In most cases an isosurface will render slower than a
heightfield but often this is not the most important factor.
Christoph
--
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 15 Oct. 2006)
MegaPOV with mechanics simulation: http://megapov.inetart.net/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christoph Hormann <chr### [at] gmxde> wrote:
> Russell Towle wrote:
> >
> > DEM data is better handled by POV's "height field" function, which creates a
> > mesh of triangles on the fly.
>
> In this general form this is certainly wrong. Using an isosurface is
> more memory efficient and you can get much higher quality results (no
> mesh artefacts). In most cases an isosurface will render slower than a
> heightfield but often this is not the most important factor.
I have no experience with the isosurface method.
It is true that the mesh of triangles created in the POV height field
becomes visible when one zooms in close enough. This is rarely a problem
for me; I use the highest-resolution DEM data commonly available in the
U.S., the 30-meter DEMs, which span 7.5 minutes of latitude by 7.5 minutes
of longitude. I will often merge larger numbers of these DEM quadrangles
before rendering in POV. For instance, recently I've been using a merged
set of thirty DEMs. This gives me a patch of terrain of something like
twenty or thirty miles square (though it is not really "square").
Typically, I never see any sign of the mesh itself. I am interested in
landscape-scale geomorphology and geology: the incision of canyons, here in
California's Sierra Nevada, the difference between glacially-eroded and
stream-eroded canyons, the difference between canyons incised into granite
versus canyons incised into metavolcanic rock versus canyons incised into
metasedimentary rock.
These differences are often astoundingly visible using the merged 30-meter
DEMs.
So, for my own purposes, the height field works quite well.
Russell Towle
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|