POV-Ray : Newsgroups : povray.newusers : adding 2 pigments : Re: adding 2 pigments Server Time
5 Sep 2024 04:18:17 EDT (-0400)
  Re: adding 2 pigments  
From: Simon
Date: 12 Oct 2001 05:06:19
Message: <3bc6b28b@news.povray.org>
Elias Pschernig <eli### [at] aonat> schrieb in im Newsbeitrag:
3bc60881@news.povray.org...
> Is there a way to add 2 pigments together into a new pigment? Something
like
> "average", but only adding the values, without dividing afterwards. I
tried
> all sort of things, even splitting both pigments into different color
> channel functions, adding the functions, and then combining them again
into
> the new pigment.. but it's quite complicated and messy, only for such a
> simple thing. I think there must be a simpler solution and I'm just not
> seeing it.
>
> For example, I have one pigment which is <0,0,0> everywhere and has a
stripe
> of <1,0,0> somewhere, and another pigment which also is black and has
> another red stripe. The resulting pigment should be black as well, but
have
> both stripes. If I use average, it has both stripes, but they get very
> dark. I must be overlooking something..
>
> Right now I have this, which does not what I want:
>
> #declare Pigment3 = pigment {
>    average
>    pigment_map {
>       [1 Pigment1]
>       [1 Pigment2]
>    }
> }
>
> Any ideas?
You could put both pigments in a function then add the to functions in
another function and use this as your pigment.


Post a reply to this message

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