POV-Ray : Newsgroups : povray.newusers : color modulation in textures : Re: color modulation in textures Server Time
30 Jul 2024 00:30:45 EDT (-0400)
  Re: color modulation in textures  
From: tahoma
Date: 12 May 2005 04:42:12
Message: <opsqnmsz0px5erxw@buddie.egoof>
> #declare R = pigment {function {IM(x,y,z).red * Cr}
>    colour_map {[0 rgb 0][1 rgb <1,0,0>]}}
> #declare G = pigment {function {IM(x,y,z).green * Cg}
>    colour_map {[0 rgb 0][1 rgb <0,1,0>]}}
> #declare B = pigment {function {IM(x,y,z).blue * Cb}
>    colour_map {[0 rgb 0][1 rgb <0,0,1>]}}
>
> Then assemble the three components using an average pigment_map
>
> sphere {0,1
>   pigment {average
>     pigment_map {
>       [1 R]
>       [1 G]
>       [1 B]
>     }
>   }
> }

The assembled colors are just 1/3 of the intensity as the original
one's. I replaced Cr/Cg/Cb by 1/1/1. The average function
calculates (1*<1,0,0> + 1*<0,1,0> + 1*<0,0,1>)/3 = <1/3,1/3,1/3>.
If i could use 'add' instead of 'average' of disable the division
by the weight sum ... any ideas?

I think, i understand the colour_map now :)


Post a reply to this message

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