POV-Ray : Newsgroups : povray.advanced-users : Why don't shadows get blurry after a certain distance? ("Distance Field Sha= : Re: Why don't shadows get blurry after a certain distance? ("Distance Field=Sha=3D Server Time
11 Aug 2022 10:52:04 EDT (-0400)
  Re: Why don't shadows get blurry after a certain distance? ("Distance Field=Sha=3D  
From: Alain Martel
Date: 6 Jun 2022 10:34:38
Message: <629e107e$1@news.povray.org>
Le 2022-06-04 à 12:58, HackerDaGreat57 a écrit :
> Alain Martel <kua### [at] videotronca> wrote:
>> Le 2022-06-03 à 23:53, HackerDaGreat57 a écrit :
>>> I was just rendering the Biscuit sample and found something strange: The shadows
>>> on objects don't get blurrier as they get farther away from the object.
>>>
>>> If your mind is completely foggy and you are confused and don't know what I'm
>>> talking about, take a look at this Unreal Engine 4 documentation page:
>>>
https://docs.unrealengine.com/4.27/en-US/BuildingWorlds/LightingAndShadows/RayTracedDistanceFieldShadowing/
>>>
>>
>> That scene use a point light. That kind of light always produce sharp
>> shadows without any blurring. It's an infinitely small light source.
>>
>> The used light is :
>> light_source {<-140,200, 300> rgb <1.0, 1.0, 0.95>*1.5}
>>
>> To have blurring shadows, you need to use an area_light.
>> Change it to :
>> #declare Size = 3;
>> light_source {<-140,200, 300> rgb <1.0, 1.0, 0.95>*1.5 area_light Size*x
>> Size*z 17 17 jitter adaptive 0 circular orient}
>>
>> to simulate a spherical light source with a diameter of 3 units.
>> The «adaptive 0» makes it render much faster by using an adaptive
>> sampling method.
>> Change «Size» to change the broadness of the penumbra, or how much the
>> shadow get blurry.
> 
> Is it possible to change the 'Radius' of the point light? Like in Blender's
> Cycles for example, there is an option to change the point light's radius which
> increases the 'amount' of penumbra on my shadows.
> 
> Thanks anyway for the useful reference though.
> 

Not at all. The default point light have no dimension, only a location 
and colour.

The only way to have a penumbra is to use the area_light feature.

A word about the adaptive option :
It use adaptive sampling. It start to sample the illumination with a 
subset of the elements of the area_light. That number of samples is 
determined by the integer value that follows the adaptive key word.
The starting samplings according to the adaptive value are :
0 → 2 x 2 (2^0 +1)
1 → 3 x 3 (2^1 +1)
2 → 5 x 5 (2^2 +1)
3 → 9 x 9 (2^3 +1)
...
If all samples from a 2 x 2 block are identical, then, no further 
sampling is done within that block, all sampling points inside that 
block are assumed to be identically illuminated or not. If at least one 
is different, then, 5 more samples are taken : One between each corner 
and one in the centre. This is repeated until the maximum sampling 
density is reached.

The circular option make the sampling rectangle into a circle or ellipse.

The orient ensure that the plane of the samples is always perpendicular 
to the vector between the light and the currently rendered point in the 
scene. Orient demand that the circular option is also used AND require 
that the length and width to be the same and that the number of samples 
in both direction are identical.

The size of the area_light are it's width and length.
An area_light can be long and narrow and can simulate a fluorescent tube 
like this :
light_source {<-140,200, 300> rgb <1.0, 1.0, 0.95>*1.5 area_light 20*x
1*z 63 5 jitter adaptive 1}


Post a reply to this message

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