POV-Ray : Newsgroups : povray.newusers : converting DEM to height field : Re: converting DEM to height field Server Time
5 Nov 2024 05:23:58 EST (-0500)
  Re: converting DEM to height field  
From: Christoph Hormann
Date: 14 Jul 2000 11:02:24
Message: <396F2B81.372AFA6A@schunter.etc.tu-bs.de>
Eric Fielding wrote:
> 
> Does anyone have a program or code fragment (C or Fortran) to convert a
> "raw" Digital Elevation Model to one of the height_field formats that
> POV can use? I have MacDEM, but it only reads the standard USGS DEM
> format or ASCII text PGM files.
> 

You should have a look at the POV-sourcecode.  There you can find code for
writing/reading tga-files and samples how to use pnglib for png-files.  

> It seems a bit inefficient to store a DEM with 16 bits per sample in a
> 24-bit per pixel TARGA or PNG or PPM image, but I guess those formats
> contain the image size in a convenient form.
> 

I usually use 16Bit png files for that purpose.

Christoph

--
Christoph Hormann <chr### [at] gmxde>
Homepage: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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