POV-Ray : Newsgroups : povray.advanced-users : Get function from a height_field to define height dependent colors? : Re: Get function from a height_field to define height dependent colors? Server Time
28 Jul 2024 10:21:21 EDT (-0400)
  Re: Get function from a height_field to define height dependent colors?  
From: Warp
Date: 18 May 2006 18:07:23
Message: <446cf01b@news.povray.org>
Icetoaster <icetoaster_at_gmx.de> wrote:
> I like evaluate values from a height_field image:
> something like
> #declare f=function(x,y) { height_field { tga "mountains.tga" } }

  How would this be different from simply reading the image map directly
(as a pigment function) converted to grayscale?

  Heightfields are, after all, calculated from precisely that info.

> I like to use this function to define colors dependent from the height
> (e.g. starting with blue for sea level, green for middle values, gray for
> high values, and white for snow on top of the mountains.

  Wouldn't it be much easier to simply apply a "gradient y" texture map
to the heightfield directly?

> A second idea is to calculate a gradient from this function, in order to
> define the color from the steepness of the landscape (e.g. on steep
> passages there is no grass because there is no soil...).

  You can create a texture which depends on the slope of an object by using
the slope pattern (details in the documentation).

-- 
                                                          - Warp


Post a reply to this message

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