|
![](/i/fill.gif) |
Christian Froeschlin wrote:
> stbenge wrote:
>
>> You're first suggestion makes more sense, to add one function to
>> another inside a function block. I will give that a try. Thanks :)
>
> You're welcome. Maybe I don't understand something here ;)
Whether you know it or not, you gave me the idea of adding separate rgb
channels together *inside* functions, rather than averaging them to the
existing image, or placing the result over the existing image. There's a
difference, and the 'select' function keeps the values from ever going
past 1.
> By additively combining pigments, don't you mean that if
> one pigment A evaluates to <r1,g1,b1> at some point and
> pigment B evaluates to <r2,g2,b2> at that point that
> A+B should simply evaluate to <r1+r2,g1+g2,b1+b2>?
That's pretty much I'm doing inside the function block, although I see a
way to simplify my code now.
> And wouldn't average {pigment_map {[A] [B]}} evaluate to
> <(r1+r2)/2,(g1+g2)/2,(b1+b2)/2> = 0.5*<r1+r2,g1+g2,b1+b2>,
> so scaling it up by a factor of two should do the trick?
No, not at all. You see, by averaging the colors, you are effectively
bringing something down. You are giving dark colors the same chance at
being seen as the light ones.
Instead of saying (r1+r2)/2, I think this is better:
r3=(r1+r2)
if(r3>1)r3=1;
The new version of my code is nearly complete now. The images it
produces are more saturated, without being 'over the top'. I hope to
release it soon, but I need to test it more.
Sam
Post a reply to this message
|
![](/i/fill.gif) |