POV-Ray : Newsgroups : povray.newusers : having trouble with a filtered transparency... : Re: having trouble with a filtered transparency... Server Time
4 Sep 2024 22:16:07 EDT (-0400)
  Re: having trouble with a filtered transparency...  
From: Tony
Date: 29 Jun 2002 16:57:02
Message: <3d1e1f1e$1@news.povray.org>
Thanks for the help - will this also solve the transparency problem?

Tony S


Mike Williams wrote in message ...
>Wasn't it Tony who wrote:
>>Help!
>>
>>In my current POVray work, I'm incorporating a lightning bolt - to do this
>>I'm using a GIF image textured onto a very thin box primitive, and using
>>'transmit' to filter out the various shades..the trouble is, the colours
>>that need to be completely transparent, just...well...aren't.
>>
>>What happens is that I get my bright lightning bolt, fair enough...but the
>>part that needs to be completely transparent just looks a little darker.
>>
>>I've tried pretty much everything to eliminate this problem, as you can
see
>>from the snippet below:
>>
>>#declare lightning1 = box {<0,0,0>, <2,-5,0.0001> texture {pigment
>>{image_map {gif "lightning1.gif" transmit 0, 0.1 transmit 1, 0.5 transmit
>>2,0.6 transmit 3,0.7 transmit 4,0.8 transmit 5,0.9 transmit 6,0.95
transmit
>>7,1.0 transmit 8,1.0 transmit 9,1.0 transmit 10, 1.0 transmit 11, 1.0
>>transmit 12, 1.0 transmit 13, 1.0  transmit 14, 1.0  transmit 15, 1.0
>>interpolate 4} scale 2.25 scale y*1.25}} interior {fade_power 0
>>fade_distance 0} finish {ambient 1.0  diffuse 0} hollow no_shadow}
>>
>>Any help will be very much appreciated - this is making me lose a lot of
>>hair!!!!!!!
>>
>>BTW - is there any way to compact/refine this particular piece of script?
>>Looks kind of ugly to me.
>
>It would be an awful lot easier to turn your gif into a png and give it
>an alpha channel. Your code would then reduce to:
>
>#declare lightning1 = box {<0,0,0>, <2,-5,0.0001>
>  texture {
>    pigment {
>      image_map {png "lightning1.png" interpolate 4}
>      scale 2.25 scale y*1.25}
>    }
>    finish {ambient 1.0  diffuse 0}
>  }
>  no_shadow
>}
>
>--
>Mike Williams
>Gentleman of Leisure


Post a reply to this message

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