POV-Ray : Newsgroups : povray.unofficial.patches : Transmit -> File alpha bug im MP0.7 : Re: Transmit -> File alpha bug im MP0.7 Server Time
6 Oct 2024 12:39:03 EDT (-0400)
  Re: Transmit -> File alpha bug im MP0.7  
From: PoD
Date: 10 Jun 2001 21:05:20
Message: <3B24194C.9A46192C@internode.on.net>
Nathan Kopp wrote:
> 
> "PoD" <pod### [at] internodeonnet> wrote...
> > The alpha channel for pixels corresponding to an object with transmit !=
> > 0 is set to fully opaque regardless of the actual transmit value.
> >
> > I've tracked this down to compute_lighted_texture() in lighting.c
> > but I'm having trouble following why a lot of the changes were made.
> >
> > line 4711 says
> > ResCol[TRANSM] = (0.30*AttCol[0] + 0.59*AttCol[1] + 0.11*AttCol[2]) *
> > FilCol[TRANSM];
> > but FilCol[TRANSM] is never changed from 0.0 as far as I can see.
> >
> > There's a comment at line 4617
> > /* note FilCol[3] stays at 1.0, [4] stays at 0.0 */
> > Why is that?
> 
> For the purposes of FilCol, anything that can be represented with the
> Transmit channel can be represented using the filter channel with an
> appropriate color.
> 
> Examples:
> <0,0,0,0,1> can be represented as <1,1,1,1,0>
> <0,0,0,0,.5> can be represened either as <.5,.5,.5,1,0>
> <.5,0,0,.5,.5> can be represented as <1,.5,.5,1,0>
> etc.
> 

OK. The problem is that the output alpha channel contains exactly what
is put into the tranmit part of FilCol at the start of
compute_lighted_texture.
To test this I made FilCol = [1.0,1.0,1.0,1.0,0.5] and then the output
alpha for any ray is 128.

-- 
PoD.


Post a reply to this message

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