|
|
Hi all
I am creating a landscape-type image from a tiff file (which I have been able to
do thanks to the great advice on this forum), but was wondering if I can colour
in different areas of the landscape in different colours, depending on the
height of the area.
For example, like a map that shows different contours with different colours
representing different altitudes.
Really, I want to accenuate the different heights of the image by using
different colours or, perhaps more specifically, by using a colour scale.
Does anybody know if this is possible or not?
Cheers
Post a reply to this message
|
|
|
|
"Colaroid" <nomail@nomail> wrote:
> Does anybody know if this is possible or not?
>
Yes indeed. The simplest way is with a 'gradient y' color_map. You can blend
one color into another over a distance. (The default distance of the gradient y
pattern is from a height of 0.0 to a height of 1.0, but you can scale that.)
Since the base of your height_field is at 0.0 by default, you can get the color
blend to go from the base, up to the tip of your highest mountain peak. (The
color_map repeats after that.)
For example:
height_field{.....
texture{
pigment{
gradient y
color_map{
[0.0 rgb <.3,1,.3>] // green--starts at bottom
[1.0 rgb .6] // gray--ends at top
}
scale 2.5 // or whatever (to match the height of
// your height_field)
}
finish{ambient .2 diffuse .8}
}
} // end of height_field
BTW, you can have *many* colors in the color_map, between the 0.0-to-1.0 values
of the index list.
Hope this helps.
Ken
Post a reply to this message
|
|