POV-Ray : Newsgroups : povray.general : Light and dark Server Time
23 Dec 2024 11:52:59 EST (-0500)
  Light and dark (Message 1 to 7 of 7)  
From: Mike Horvath
Subject: Light and dark
Date: 6 Apr 2018 13:20:48
Message: <5ac7ac70$1@news.povray.org>
I'm trying to capture a shadow of an object that I will later process in 
GIMP. I want the shadow to be perfectly black, and the rest of the image 
to be perfectly white. (A bit of anti-aliasing is fine.)

How can I accomplish this? I have a white plane, but it ends up slightly 
darker than white. Also, the shadow is a bit lighter than black.

Thanks!


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Light and dark
Date: 6 Apr 2018 13:50:54
Message: <5ac7b37e$1@news.povray.org>
On 4/6/2018 1:20 PM, Mike Horvath wrote:
> I'm trying to capture a shadow of an object that I will later process in 
> GIMP. I want the shadow to be perfectly black, and the rest of the image 
> to be perfectly white. (A bit of anti-aliasing is fine.)
> 
> How can I accomplish this? I have a white plane, but it ends up slightly 
> darker than white. Also, the shadow is a bit lighter than black.
> 
> Thanks!
> 
> 
> Mike

I forgot to add that the light source is at a 60 degree angle to the 
ground plane.


Mike


Post a reply to this message

From: clipka
Subject: Re: Light and dark
Date: 6 Apr 2018 13:56:32
Message: <5ac7b4d0$1@news.povray.org>
Am 06.04.2018 um 19:20 schrieb Mike Horvath:
> I'm trying to capture a shadow of an object that I will later process in
> GIMP. I want the shadow to be perfectly black, and the rest of the image
> to be perfectly white. (A bit of anti-aliasing is fine.)
> 
> How can I accomplish this? I have a white plane, but it ends up slightly
> darker than white. Also, the shadow is a bit lighter than black.

There are a couple of factors that may contribute to your white plane
not looking Pearly White(tm):

(1) The pigment may be non-white. Make sure to use `rgb 1`.

(2) The `diffuse` parameter may be set too low. Make sure to use
`diffuse 1` (and while I normally advocate using `diffuse albedo FLOAT`,
in this particular context I deliberately don't).

(3) The light source may not be directly overhead. In that case, make
sure to use `brilliance 0` in the finish.

Alternatively, just crank up the light source brightness to some
insanely high value ;)


As for the shadow not looking pitch black, this is most certainly due to
the `ambient` setting. Make sure to use `ambient 0`. (Also, make sure
you are not using radiosity.)


Post a reply to this message

From: Mike Horvath
Subject: Re: Light and dark
Date: 6 Apr 2018 13:58:50
Message: <5ac7b55a$1@news.povray.org>
On 4/6/2018 1:20 PM, Mike Horvath wrote:
> I'm trying to capture a shadow of an object that I will later process in 
> GIMP. I want the shadow to be perfectly black, and the rest of the image 
> to be perfectly white. (A bit of anti-aliasing is fine.)
> 
> How can I accomplish this? I have a white plane, but it ends up slightly 
> darker than white. Also, the shadow is a bit lighter than black.
> 
> Thanks!
> 
> 
> Mike


Disregard.

I set the background to 0 and the white plane's diffuse to 2, and I am 
getting desired results now.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Light and dark
Date: 6 Apr 2018 14:15:51
Message: <5ac7b957$1@news.povray.org>
On 4/6/2018 1:59 PM, Mike Horvath wrote:
> On 4/6/2018 1:20 PM, Mike Horvath wrote:
>> I'm trying to capture a shadow of an object that I will later process 
>> in GIMP. I want the shadow to be perfectly black, and the rest of the 
>> image to be perfectly white. (A bit of anti-aliasing is fine.)
>>
>> How can I accomplish this? I have a white plane, but it ends up 
>> slightly darker than white. Also, the shadow is a bit lighter than black.
>>
>> Thanks!
>>
>>
>> Mike
> 
> 
> Disregard.
> 
> I set the background to 0 and the white plane's diffuse to 2, and I am 
> getting desired results now.
> 
> 
> Mike

I discovered a problem with increasing diffuse past 1.

At high diffuse values (for instance `diffuse 200`), the border of the 
shadow is no longer "fuzzy" with some gray pixels as a result of 
anti-aliasing. Instead, the border is extremely sharp, with black 
bordering directly on white.

So I changed the diffuse of the white plane from `2` to `1/sind(60)`, 
where `60` is the angle of the light source above the plane.

Not sure if this is the correct workaround, mathematically.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Light and dark
Date: 6 Apr 2018 14:24:40
Message: <5ac7bb68$1@news.povray.org>
On 4/6/2018 1:56 PM, clipka wrote:
> Am 06.04.2018 um 19:20 schrieb Mike Horvath:
>> I'm trying to capture a shadow of an object that I will later process in
>> GIMP. I want the shadow to be perfectly black, and the rest of the image
>> to be perfectly white. (A bit of anti-aliasing is fine.)
>>
>> How can I accomplish this? I have a white plane, but it ends up slightly
>> darker than white. Also, the shadow is a bit lighter than black.
> 
> There are a couple of factors that may contribute to your white plane
> not looking Pearly White(tm):
> 
> (1) The pigment may be non-white. Make sure to use `rgb 1`.
> 
> (2) The `diffuse` parameter may be set too low. Make sure to use
> `diffuse 1` (and while I normally advocate using `diffuse albedo FLOAT`,
> in this particular context I deliberately don't).
> 
> (3) The light source may not be directly overhead. In that case, make
> sure to use `brilliance 0` in the finish.
> 
> Alternatively, just crank up the light source brightness to some
> insanely high value ;)
> 
> 
> As for the shadow not looking pitch black, this is most certainly due to
> the `ambient` setting. Make sure to use `ambient 0`. (Also, make sure
> you are not using radiosity.)
> 


The `ambient` of the plane is 0, and the light source is `rgb 1`.

I did not know about changing `brilliance`. That seems to have fixed the 
problem, too.

Thanks!


Mike


Post a reply to this message

From: Alain
Subject: Re: Light and dark
Date: 6 Apr 2018 21:43:59
Message: <5ac8225f@news.povray.org>
Le 18-04-06 à 14:16, Mike Horvath a écrit :
> On 4/6/2018 1:59 PM, Mike Horvath wrote:
>> On 4/6/2018 1:20 PM, Mike Horvath wrote:
>>> I'm trying to capture a shadow of an object that I will later process 
>>> in GIMP. I want the shadow to be perfectly black, and the rest of the 
>>> image to be perfectly white. (A bit of anti-aliasing is fine.)
>>>
>>> How can I accomplish this? I have a white plane, but it ends up 
>>> slightly darker than white. Also, the shadow is a bit lighter than 
>>> black.
>>>
>>> Thanks!
>>>
>>>
>>> Mike
>>
>>
>> Disregard.
>>
>> I set the background to 0 and the white plane's diffuse to 2, and I am 
>> getting desired results now.
>>
>>
>> Mike
> 
> I discovered a problem with increasing diffuse past 1.
> 
> At high diffuse values (for instance `diffuse 200`), the border of the 
> shadow is no longer "fuzzy" with some gray pixels as a result of 
> anti-aliasing. Instead, the border is extremely sharp, with black 
> bordering directly on white.
> 
> So I changed the diffuse of the white plane from `2` to `1/sind(60)`, 
> where `60` is the angle of the light source above the plane.
> 
> Not sure if this is the correct workaround, mathematically.
> 
> 
> Mike

It' beter to use that texture:
texture{
  pigment{rgb 1}
  finish{ambient 0 diffuse 1 brilliance 0}
}

brilliance 0 make the illumination direction independent.


Post a reply to this message

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