POV-Ray : Newsgroups : povray.programming : Re: New way of specifying transparence? : Re: New way of specifying transparence? Server Time
28 Jul 2024 20:27:13 EDT (-0400)
  Re: New way of specifying transparence?  
From: Bob Hughes
Date: 13 Jul 1999 01:55:31
Message: <378AD4B8.FF162D54@aol.com>
Is this not similar to 'rgbft' as it is already? (sorry, I had to ask
that :)
You're last example apparently needs the 0 replaced with a 1 (am I
right?)

>   At Transparence_Value = 0, you get    // = 1  instead?
>     w1[] = 1,  w2[] = 1.0,
>     therefore ResultColour[] = pigment_Colour[]*Colour_Behind_Object[];

Anyhow, I'm just a curious onlooker, not much on the technical aspects
of POV-Ray.
I get what you are trying to do though, sort of a mathematical rgb,
however my first question actually should be asked I guess. Using math
on the color vector isn't new, but I can see where this would be a help
in defining the various attributes for ease of manipulation on the
transparency.
Hope someone else here understands it so they can help.


Nathan Kopp wrote:
> 
> This message is a bit technical, so I'm putting it in .programming.
> =========
> 
> First, I think it should go within the texture, not the interior.  Kind
> of a decoupling of color(colour) and transparency.
> 
> One forumla that could be used for general transparancy is:
> 
> Result_Colur[red] =
>   Pigment_Colour[red] * w1[red]  <op> Colour_Behind_Object[red] * w2[red];
> 
> (same formula for green, blue)
> 
> <op> is the operator that combines the two (like +, -, *)
> 
> Transmit is:
>   w1[red] = w1[green] = w1[blue] = 1.0 - Transmit_Value;
>   w2[red] = w2[green] = w2[blue] = Transmit_Value;
>   <op> = +
> 
> Filter is:
>   w1[red] = w1[green] = w1[blue] = 1.0 - Filter_Value;
>   w2[red]   = Filter_Value * Pigment_Colour[red];
>   w2[green] = Filter_Value * Pigment_Colour[green];
>   w2[blue]  = Filter_Value * Pigment_Colour[blue];
> 
> Of course, other formulas could be used for other effects (dodge, burn,
> darken, lighten, etc.)  Notice that with this you have two weights
> in the combination formula, which makes the 'amount of transparence'
> somewhat ambiguous.  What does 100% additive transparance mean?
> What about 0% additive?
> 
> I guess for additive/subtractive you could just use:
>   w1[red] = w1[green] = w1[blue] = 1.0;
>   w2[red] = w2[green] = w2[blue] = Transparence_Value;
> 
> For Multiplicitve you might want:
>   w1[red] = w1[green] = w1[blue] = 1.0;
>   w2[red] = 1.0 / (1.0-Colour_Behind_Object[red])*Transparence_Value+
>                    Colour_Behind_Object[red])
> 
>   At Transparence_Value = 0, you get
>     w1[] = 1,  w2[] = Colour_Behind_Object[],
>     therefore ResultColour[] = Pigment_Colour[red];
> 
>   At Transparence_Value = 0, you get
>     w1[] = 1,  w2[] = 1.0,
>     therefore ResultColour[] = Pigment_Colour[]*Colour_Behind_Object[];
> 
> Does this make any sense?  Is there a better way to generalize this for
> easier use.  There will probably have to be some compromises in how
> general it is in order to make it less overwhelming.  Or have some good
> defaults with the ability to change them if you so desire.
> 
> -Nathan

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/homepage.htm
 mailto://inversez@aol.com?Subject=PoV-News


Post a reply to this message

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