POV-Ray : Newsgroups : povray.binaries.images : Squirted pigments (34KB) : Re: Squirted pigments (34KB) Server Time
7 May 2024 23:49:47 EDT (-0400)
  Re: Squirted pigments (34KB)  
From: Tor Olav Kristensen
Date: 29 Sep 2001 20:52:11
Message: <3BB66CB1.1A55BD2A@hotmail.com>
Yes, I think this is a better way to control the colors.

Thanks Mark.


Tor Olav


Mark James Lewin wrote:
> 
> Tor,
>         Have you tried 'average'? I have used this to achieve similar control as
your
> technique (though not so complicated). Here is how I do it...
> 
> #declare F_Red = function{(sin(x)+sin(y)+sin(z)+3)/6}
> // Or any function between 0 and 1
> 
> #declare F_Green =function{(cos(x)+cos(y)+cos(z)+3)/6}
> #declare F_Blue =function{(sin(-x)+sin(-y)+sin(-z)+3)/6}
> 
> #declare P_Red =
> pigment
>         {
>         function{F_Red(x,y,z)}
>         colour_map
>                 {
>                 [0 rgb <0,0,0>][1 rgb <3,0,0>]
>                 // Note the colour max is 3, not 1
>                 }
>         }
> 
> #declare P_Green =
> pigment
>         {
>         function{F_Green(x,y,z)}
>         colour_map
>                 {
>                 [0 rgb <0,0,0>][1 rgb <0,3,0>]
>                 }
>         }
> 
> #declare P_Blue =
> pigment
>         {
>         function{F_Blue(x,y,z)}
>         colour_map
>                 {
>                 [0 rgb <0,0,0>][1 rgb <0,0,3>]
>                 }
>         }
> 
> #declare P_Average =
> pigment
>         {
>         average
>         pigment_map
>                 {
>                 [1 P_Red]
>                 [1 P_Green]
>                 [1 P_Blue]
>                 }
>         }
> 
> Then you have a pigment with control over rgb channels without semi transperent
layers.


Post a reply to this message

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