POV-Ray : Newsgroups : povray.advanced-users : color_map question with. GIF files Server Time
26 Dec 2024 13:52:58 EST (-0500)
  color_map question with. GIF files (Message 1 to 3 of 3)  
From: David Vincent-Jones
Subject: color_map question with. GIF files
Date: 16 Nov 1999 17:46:20
Message: <3831debc@news.povray.org>
I am working with a 1250 x 1000 gif file in 256 colors. This is used in a
height_field.
Regardless of how much I scale the scene I can only get the color_map to
work within the range 0f 0 and 0.1.
Any ideas !!

As a test I rendered a smaller (480 x 360) gif height_field from the front
edge
then used identical settings with the larger image
I tried using a vertical scale at both 250 and 500.
With the smaller image the results were quite predictable and OK
With the 1250 x 1000 file the image was correctly scalled but much too low
in the view
and the color_map only reflected the scale of less than 0.01 !!

What is going on ?


Post a reply to this message

From: Chris Huff
Subject: Re: color_map question with. GIF files
Date: 16 Nov 1999 18:00:56
Message: <3831E2D8.6F713FCF@compuserve.com>
I assume you are using a gradient pattern to color a height field based
on it's height?
In that case, try applying the texture before you scale the height
field.

height_field {
    //blah blah, height field stuff
    pigment {gradient y //or planar
        color_map {
            [0 color Green]
            [1 color Red]
        }
    }
}

Or are you asking about applying an image_map pigment to a height field
and having it align properly? In that case, remember that they are at
right angles to each other, and you have to rotate the image_map by 90
degrees on the x-axis before it will line up.
(image_map uses the xy plane by default, height fields are aligned in
the xz plane)


Post a reply to this message

From: David Vincent-Jones
Subject: Re: color_map question with. GIF files
Date: 17 Nov 1999 16:19:33
Message: <38331be5@news.povray.org>
Chris;
I thought this was very straightforward and I think is exactly as you
suggest
This is my code:

height_field  {
 gif "NewGrey.gif" smooth
 pigment {  gradient y
  color_map {
       [0 color Blue]
       [0.25 color Blue]
       [0.46875 color White]
       [(0.46875) color ForestGreen]
       [0.6 color red 0.65 green 0.65 blue 0.65]
       [1.0 color red 0.85 green 0.85 blue 0.85]   }  }
  scale <1233,250,960>
  translate <East,Datum,North >   }  NB. lift the HF to match the water-line

The result is that the file sits very very low in the scene and all within
the blue band......
Values need to be changed from 0 to a max of 0.01 to achieve the color range

A check on the image shows that there are 207 distinct gray levels within
the 8 bits!!!

Chris Huff <Chr### [at] compuservecom> wrote in message
news:3831E2D8.6F713FCF@compuserve.com...
> I assume you are using a gradient pattern to color a height field based
> on it's height?
> In that case, try applying the texture before you scale the height
> field.
>
> height_field {
>     file://blah blah, height field stuff
>     pigment {gradient y file://or planar
>         color_map {
>             [0 color Green]
>             [1 color Red]
>         }
>     }
> }
>
> Or are you asking about applying an image_map pigment to a height field
> and having it align properly? In that case, remember that they are at
> right angles to each other, and you have to rotate the image_map by 90
> degrees on the x-axis before it will line up.
> (image_map uses the xy plane by default, height fields are aligned in
> the xz plane)
>


Post a reply to this message

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