POV-Ray : Newsgroups : povray.newusers : draping image over height field : Re: draping image over height field Server Time
5 Sep 2024 14:22:45 EDT (-0400)
  Re: draping image over height field  
From: Bob Hughes
Date: 11 Jul 2000 11:40:04
Message: <396b3fd4@news.povray.org>
"Eric Fielding" <eri### [at] sierrasjplnasagov> wrote in message
news:396B3B20.D5865411@sierras.jpl.nasa.gov...
|
| I just downloaded POV Ray 3.1g.r2 for the Mac, and I read through the
| documentation to see if there was an easy way to drape a full-color
| image over a height field. I didn't see any recipe.
|
| I have a full-color (satellite) image that is co-registered to a height
| field (a real digital elevation model). The two have the same pixel
| size, etc. How can I tell POV Ray that the image and height field have
| the same size?
|
| Also does POV Ray support any image formats other than TARGA?

Hi Eric, yes, PNG.  Or at least it should on your Mac version too I would
expect.
Just remember that image_map and height_field are on two different planes.
Images go onto the xy plane and HF onto the xz plane.  So you will need to
rotate the image down onto the HF by doing a rotate 90*x in the pigment
statement.
Short example:

height_field { tga "dempic.tga"  // the dem data
  pigment {
   image_map { tga "picdem.tga"}  // the satellite image
   rotate 90*x }  // fold image over onto HF surface (both are 1 unit square)
 scale <300,3,300> // xz resolution (width/height) of images used, y being
vertical scale size
}

Both start out square with their lower-left and near-left corners at <0,0,0>
so to scale up will go to that number of units far-right on the xz plane.
Doing a translate <-0.5,0,-0.5> before the scaling will center it.
Hope that's of some use to you.

Bob


Post a reply to this message

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