POV-Ray : Newsgroups : povray.newusers : height_field + image_map for real world mapping Server Time
30 Jul 2024 14:26:20 EDT (-0400)
  height_field + image_map for real world mapping (Message 1 to 3 of 3)  
From: Michael Cooper
Subject: height_field + image_map for real world mapping
Date: 2 Dec 2003 06:05:02
Message: <web.3fcc712cfd57eb597fa21dff0@news.povray.org>
I am trying to overlay a chorpleth map (i.e., a map showing country borders
with shaded values) onto a height field. Both are 24 bit tga images and
both have exactly the same size and geographic extent. I can create a
height field no problem, but any image I place on top of it doesn't display
correctly. What I normally end up getting is only the highest points of the
height_field getting some color from the overlaid image, but even that
color is not correct.

It is important that the image is aligned perfectly with the height_field in
order to match country borders with physical features, particularly
coastlines.

This seem like an easy process of just overlaying an image onto a
height_field, but maybe I am missing something. Below is one sample of some
code I have tried.

height_field {
  tga "d:/povcyg/scenes/gtopo30/dtm.tga"
      pigment {
  image_map{ tga "d:/povcyg/scenes/gtopo30/map.tga"
  map_type 0
  interpolate 2
   }
  translate <-.52, 0, -.5>
     scale <100, .5, 100>
  }
     translate <-.52, 0, -.5>
     scale <100, .5, 100>
    }

Any help would be greatly appreciated.  Thanks


Post a reply to this message

From: Warp
Subject: Re: height_field + image_map for real world mapping
Date: 2 Dec 2003 06:54:05
Message: <3fcc7d5d@news.povray.org>
The heightfield is created on the x-z plane. The image map is created
on the x-y plane. Obviously they are oriented differently.
  Thus, rotate the image map so that it has the same orientation as
the heightfield, like this:

height_field
{ tga "whatever"
  pigment
  { image_map { tga "whatever" }
    rotate x*90
  }
  transformations
}

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Michael Cooper
Subject: Re: height_field + image_map for real world mapping
Date: 2 Dec 2003 08:15:01
Message: <web.3fcc8fe3ed57fecd7fa21dff0@news.povray.org>
Warp wrote:
>  The heightfield is created on the x-z plane. The image map is created
>on the x-y plane. Obviously they are oriented differently.
>  Thus, rotate the image map so that it has the same orientation as
>the heightfield, like this:
>
>height_field
>{ tga "whatever"
>  pigment
>  { image_map { tga "whatever" }
>    rotate x*90
>  }
>  transformations
>}
>
>plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
>sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
>density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
><1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -
>


Holy Crap!!! It worked. Thanks for the info!


Post a reply to this message

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