POV-Ray : Newsgroups : povray.general : Alpha channel affecting highlighting Server Time
26 Nov 2024 01:31:35 EST (-0500)
  Alpha channel affecting highlighting (Message 1 to 9 of 9)  
From: Thomas A  Fine
Subject: Alpha channel affecting highlighting
Date: 18 May 2012 17:59:26
Message: <4fb6c63e$1@news.povray.org>
Hi,

I've just tried out the +UA option to turn on alpha channel in the output
based on the background.  I'm using a very simple image of an object
that is not transparent, and everything else is background.  The background
part is coming out transparent, however the object's highlighting is much
dimmer with the alpha channel on.

I've tried turning up the specular crazy high, and I just end up with a large
grey spot where a large highlight should be (but it isn't getting alpha channel
stuck in there, i.e.  nothing is showing through where the highlight is).

I can't imagine why this would be happening.  I also looked for known
bugs (I'm using version 3.6 at the moment) but couldn't find anything.
It does seem there's a bug related to highlighting on objects that DO
have some transparency, but as I said, my test object is totally
opaque.

Any help is appreciated.

    tom


Post a reply to this message

From: clipka
Subject: Re: Alpha channel affecting highlighting
Date: 18 May 2012 18:38:28
Message: <4fb6cf64$1@news.povray.org>
Am 18.05.2012 23:59, schrieb Thomas A. Fine:
> Hi,
>
> I've just tried out the +UA option to turn on alpha channel in the output
> based on the background.  I'm using a very simple image of an object
> that is not transparent, and everything else is background.  The background
> part is coming out transparent, however the object's highlighting is much
> dimmer with the alpha channel on.
>
> I've tried turning up the specular crazy high, and I just end up with a large
> grey spot where a large highlight should be (but it isn't getting alpha channel
> stuck in there, i.e.  nothing is showing through where the highlight is).
>
> I can't imagine why this would be happening.  I also looked for known
> bugs (I'm using version 3.6 at the moment) but couldn't find anything.
> It does seem there's a bug related to highlighting on objects that DO
> have some transparency, but as I said, my test object is totally
> opaque.

I've never heard of anything like that happening in 3.6, although it's 
been out quite a while now, and the thing you're doing sounds like a 
standard use case, so I'm a bit puzzled about this one.

Does this affect both the render preview and the generated image file? 
Can you post the complete scene? What output file format are you using? 
What's your exact version of POV-Ray?


Post a reply to this message

From: Thomas A  Fine
Subject: Re: Alpha channel affecting highlighting
Date: 18 May 2012 23:04:22
Message: <4fb70db6$1@news.povray.org>
In article <4fb6cf64$1@news.povray.org>,
clipka  <ano### [at] anonymousorg> wrote:
>Does this affect both the render preview and the generated image file? 
>Can you post the complete scene? What output file format are you using? 
>What's your exact version of POV-Ray?

Yes, both the preview and the generated file - PNG format.  My exact version
is:

Persistence of Vision(tm) Ray Tracer Version 3.6.1 (/usr/bin/g++-4.0 4.0.1 @
 i386-apple-darwin9)
This is an unofficial version compiled by:
 MacPorts
 The POV-Ray Team(tm) is not responsible for supporting this version.

(and yes, I can see it's unsupported.  I'm not asking for a fix, just
looking to see if I missed some obvious known issue or something that's
solved with a simple setting)

I've reduced the scene to the simplest possible case where it has the
problem.  A sphere and a light source.  I had a more complex isosurface
originally, and I tried it with and without an explicitly defined black
background, and I tried putting in a bunch of off-camera black boxes fully
surrounding my scene to see if the change in how the background is
interpreted was affecting the highlighting.

Anyway, the simple case is included below.  Build it with and without
+UA, and see if the specular highlight looks the same.

     tom

camera
{
  up <0, 1, 0>
  right <1, 0, 0>
  location <30,0,-3>
  look_at <0,0,0>
  angle 10
}

#declare redgloss = texture { pigment { color rgb <1,0,0> } finish { ambient 0.1
specular 0.5 diffuse 0.5 reflection 0.1 } }

light_source { <200,180,-300> color rgb <2,2,2> }

sphere { <0,0,0> 1 texture { redgloss } }


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Alpha channel affecting highlighting
Date: 19 May 2012 09:11:11
Message: <4fb79bef$1@news.povray.org>
Thomas A. Fine wrote:

 > Anyway, the simple case is included below.  Build it with and without
 > +UA, and see if the specular highlight looks the same.

I can reproduce the problem with an official 3.6 on Windows 7.

With 3.7 everything seems to work fine.

> Persistence of Vision(tm) Ray Tracer Version 3.6.1 (/usr/bin/g++-4.0 4.0.1 @
>  i386-apple-darwin9)
> This is an unofficial version compiled by:
>  MacPorts
>  The POV-Ray Team(tm) is not responsible for supporting this version.
> 
> (and yes, I can see it's unsupported.  I'm not asking for a fix, just
> looking to see if I missed some obvious known issue or something that's
> solved with a simple setting)

You might try the unofficial 3.7 RC4 for Mac, see

http://news.povray.org/povray.general/thread/%3C1kfs3ae.23o5vw13v5gloN%25yvo.s@cancel_This_gmx.net%3E/


Post a reply to this message

From: clipka
Subject: Re: Alpha channel affecting highlighting
Date: 19 May 2012 10:04:56
Message: <4fb7a888@news.povray.org>
Am 19.05.2012 05:04, schrieb Thomas A. Fine:

> #declare redgloss = texture { pigment { color rgb<1,0,0>  } finish { ambient 0.1
specular 0.5 diffuse 0.5 reflection 0.1 } }

Did you try without the reflection?

If that helps, try adding

   sphere { <0,0,0> 100000
     texture {
       pigment { color rgb 0 }
     }
     finish { ambient 0 specular 0 diffuse 0 }
     no_image
   }

It might be that reflections of a transparent background produce weird 
results; by enveloping the scene in a huge black sphere we provide 
something opaque to reflect, and the "no_image" statement makes sure the 
image itself still shows the background.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Alpha channel affecting highlighting
Date: 19 May 2012 11:26:10
Message: <4fb7bb92$1@news.povray.org>
clipka wrote:

> Did you try without the reflection?

I tried removing it but the effect was still there in 3.6


Post a reply to this message

From: Thomas A  Fine
Subject: Re: Alpha channel affecting highlighting
Date: 21 May 2012 11:48:16
Message: <4fba63c0$1@news.povray.org>
Thanks everybody.  I've given the unofficial Mac 3.7 from MegaPOV a try
(really, no command line?).  It doesn't suffer from this issue.

On the other hand it doesn't render the same as 3.6 in terms of the tone
of color and size of the specular highlight.  (Maybe there's some
setting I missed?)  But it's close enough to work with it.

     tom


Post a reply to this message

From: Cousin Ricky
Subject: Re: Alpha channel affecting highlighting
Date: 21 May 2012 16:05:01
Message: <web.4fba9f4690e3954585de7b680@news.povray.org>
fin### [at] head-cfaharvardedu (Thomas A. Fine) wrote:
> On the other hand it doesn't render the same as 3.6 in terms of the tone
> of color and size of the specular highlight.  (Maybe there's some
> setting I missed?)  But it's close enough to work with it.

Have you taken the changes in gamma correction into account?  Do you have a
#version setting at the top of the file?


Post a reply to this message

From: Alain
Subject: Re: Alpha channel affecting highlighting
Date: 22 May 2012 16:36:44
Message: <4fbbf8dc$1@news.povray.org>
Le 5/21/2012 11:48 AM, Thomas A. Fine a écrit :
> Thanks everybody.  I've given the unofficial Mac 3.7 from MegaPOV a try
> (really, no command line?).  It doesn't suffer from this issue.
>
> On the other hand it doesn't render the same as 3.6 in terms of the tone
> of color and size of the specular highlight.  (Maybe there's some
> setting I missed?)  But it's close enough to work with it.
>
>       tom

Probably a gamma handling thing.
Version 3.7 "prefers" to work using assumed_gamma of 1, linear colour 
space, while 3.6 pushed you to use an assumed_gamma of 2.2.



Alain


Post a reply to this message

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