POV-Ray : Newsgroups : povray.beta-test : Strange alpha channel bug : Strange alpha channel bug Server Time
2 Nov 2024 09:17:57 EDT (-0400)
  Strange alpha channel bug  
From: Anders K 
Date: 7 Dec 2001 20:11:33
Message: <3c1168c5$1@news.povray.org>
I have a white plane that is half transparent (rgbt <1, 1, 1, 1/2>), and a
sphere on top of the plane that casts a shadow on it. I was then looking at
the alpha channel with GIMP's color picker tool. On the part of the plane
that's in the light, the alpha value is 186 (= the gamma-corrected version
of 1/2), as it should be. However, on the part of the plane that's in
shadow, the alpha value is 127, the *non*-gamma corrected version of 1/2!

Here's a simplified version of my scene that demonstrates the problem.

  // +ft +ua
  global_settings { assumed_gamma 1.0 }
  camera { orthographic location 10*z look_at 0 up y right 4/3*x }
  light_source { <-10, 10, 20> color rgb 1 }
  plane {
    z, 0 pigment { rgbt <1, 1, 1, 1/2> }
    finish { diffuse 1 ambient 0 brilliance 0 }
  }
  sphere { <0, 0, 5/16>, 5/16 pigment { rgb <1, 0, 0> } }

The "finish" line on the plane makes the plane pure white in the light, and
pure black in shadow. If you comment out this line, the alpha value in the
light becomes 147, while the alpha value in the shadow remains 127. It
should be 186 in both cases.

If the assumed_gamma 1.0 line is commented out, the alpha value in both the
light and the shadow is 127, as it should be (since there is no gamma
correction). So this definately has something to do with gamma correction,
but I don't see why it would. Shouldn't the color values only be
gamma-corrected at the very end, as part of writing the image file output?
Anyway, this bug should hopefully be easy to track down.

POV-Ray 3.5 beta 8, Windows 98, Athlon 700, 256 MB

Anders


Post a reply to this message

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