|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In the scene below, I try to make a plane with the texture, first quarter black,
second white and the tophalf is a gradient from black to white. Well, that's
what I expected, but the top half shows a gradient form 50% to white. Why?
(Tried the same setup with a texture_map, with the same result)
How to get the result I want?
ingo
--
Met dank aan de muze met het glazen oog.
#declare CamLoc=-15*z;
camera {
location CamLoc
look_at z
angle 90
orthographic
}
plane {
-z,-100
no_shadow
pigment {
gradient y
scale 24
pigment_map {
[0.25, rgb 0]
[0.25, rgb 1]
[0.5 , rgb 1]
[0.5 , gradient y]
}
translate <0,-12,0>
}
finish {ambient 1}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 9 Jun 1999 22:43:57 +0200, ingo wrote:
>In the scene below, I try to make a plane with the texture, first quarter black,
>second white and the tophalf is a gradient from black to white. Well, that's
>what I expected, but the top half shows a gradient form 50% to white. Why?
>(Tried the same setup with a texture_map, with the same result)
>How to get the result I want?
Try this instead:
pigment_map {
[0.25, rgb 0]
[0.25, rgb 1]
[0.5 , rgb 1]
[0.5 , gradient y
color_map {
[.5 rgb 0]
[1 rgb 1]
}
]
}
The problem is that 'gradient y' maps the interval from y=0 to y=1
into the default color map, which is {[0 rgb 0][1 rgb 1]} for the gradient
pattern. This happens even when the gradient is specified within a pigment
map. This means that where y=.5, the color will be 50% gray.
There's an easier way to do this, too, if this result is really what you're
looking for and you haven't simplified it for the sake of debugging:
pigment_map {
[0.25, rgb 0]
[0.25, rgb 1]
[0.5 , rgb 1]
[0.5 , rgb 0]
[1.0 , rgb 1]
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker heeft geschreven in bericht <375ee0bd@news.povray.org>...
>The problem is that 'gradient y' maps the interval from y=0 to y=1
>into the default color map, which is {[0 rgb 0][1 rgb 1]} for the gradient
>pattern. This happens even when the gradient is specified within a pigment
>map. This means that where y=.5, the color will be 50% gray.
Obvious. I should have known this.
>There's an easier way to do this, too, if this result is really what you're
>looking for and you haven't simplified it for the sake of debugging:
Ah, this is indeed what I'm looking for. I came from a situation with several
gradients. Then a strange circular thinking pattern keeps you from seeing the
simple solution :(
Thanks Ron.
ingo
--
Met dank aan de muze met het glazen oog.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|