POV-Ray : Newsgroups : povray.general : subtle color_map problem when fading to transparency : Re: subtle color_map problem when fading to transparency Server Time
1 Aug 2024 02:20:31 EDT (-0400)
  Re: subtle color_map problem when fading to transparency  
From: Mike Williams
Date: 22 May 2006 05:09:16
Message: <$QPsrCAw+XcEFw8Z@econym.demon.co.uk>
Wasn't it Kenneth who wrote:
>I've just recently noticed a little bit of a visual conundrum in attempting
>to fade a color to transparency in a color_map. A seemingly simple
>procedure, but the result isn't what I always assumed.  I suppose I wasn't
>paying close enough attention to the visual result until now.  :-[  Perhaps
>my "discovery" is an "old dog" in the POV world, already thoroughly
>explained. But I gamely soldier on...
>
>Looking back through the POV docs, specifically 2.3.4.1.4 and the following
>sections, I see that the recommended way of fading a color in a color_map
>is to use rgbf 1, basically like this:
>
> color_map{
> [0.0 rgb <1,.5,.3>] // any color
> [1.0 rgbf 1] // the transparent part
>                 }

The white comes from the fact that "rgbf 1" is shorthand for 
"rgbf <1,1,1,1>"

Try
  [0.0 rgb <1,.5,.3>] // any color
  [1.0 rgbf <1,.5,.3,1>] // the same colour but transparent
-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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