POV-Ray : Newsgroups : povray.newusers : Texturing height_field Server Time
26 Nov 2024 15:01:18 EST (-0500)
  Texturing height_field (Message 1 to 4 of 4)  
From: Eric
Subject: Texturing height_field
Date: 15 Apr 2004 02:35:00
Message: <web.407e2be9578c3af63cec3e620@news.povray.org>
I created a heightfield that renders just fine.  I then took the (windows
bmp) height map and colorized it in an attempt to show altitude (very low
altitude values blue like water, higher values green tones and the highest
values more yellow).

When I look at the colorized version in a paint program, the pattern of the
colors visually matches the visual (black & white) pattern of the height
field exactly.

When I set up a POV scene and place the camera above the height field
looking down, the wrong values are taken for coloration - the yellow values
appear to be used for middle-height altitudes, rather than, as I expect,
for texturing whatever "pixel" happens to be under that color on the height
map.

Am I missing something here?

Images and code snippet are posted at http://www.johannsen.us/pov


Post a reply to this message

From: Hughes, B 
Subject: Re: Texturing height_field
Date: 15 Apr 2004 04:07:16
Message: <407e42b4$1@news.povray.org>
Simple solution: rotate the image to lay across the HF. A common mistake,
not orienting the two. HF lies along a xz plane, like a ground, while images
stand (as seen from default camera) as though projected onto a wall in the
xy plane.

So... rotate 90*x (or <90,0,0>) for the image.

My personal choice of the way to do things like this is to 'translate -0.5',
which centers them, then rotate the image, finally scaling them. That way
they both respond in the same manner.

-- 
Bob H.
http://www.3digitaleyes.com


Post a reply to this message

From: Tom Melly
Subject: Re: Texturing height_field
Date: 15 Apr 2004 05:26:08
Message: <407e5530$1@news.povray.org>
"Eric" <pov### [at] johannsenus> wrote in message
news:web.407e2be9578c3af63cec3e620@news.povray.org...
> Am I missing something here?

See Hughes's answer for the solution to your particular problem. Have you taken
a look at the gradient pattern? (gradient y in your case). It would remove the
need for an external image map. Following on from that, you can have even more
fun with the slope pattern (which can work with both the normal and the
altitude - e.g. high flat areas get a coating of snow, low flat areas get grass,
and steep areas get bare rock, irrespective of altitude).


Post a reply to this message

From: Eric
Subject: Re: Texturing height_field
Date: 15 Apr 2004 13:00:01
Message: <web.407ebee8f6d030aea681554c0@news.povray.org>
Thanks!


Post a reply to this message

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