|
|
|
|
|
|
| |
| |
|
|
From: Cousin Ricky
Subject: Re: Why don't shadows get blurry after a certain distance? ("Distance Field Sha=
Date: 4 Jun 2022 03:12:57
Message: <629b05f9$1@news.povray.org>
|
|
|
| |
| |
|
|
On 2022-06-03 23:53 (-4), HackerDaGreat57 wrote:
> 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.
See area lights in the documentation:
https://wiki.povray.org/content/Reference:Light_Source#Area_Lights
Post a reply to this message
|
|
| |
| |
|
|
From: Alain Martel
Subject: Re: Why don't shadows get blurry after a certain distance? ("Distance Field Sha=
Date: 4 Jun 2022 09:14:31
Message: <629b5ab7$1@news.povray.org>
|
|
|
| |
| |
|
|
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.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain Martel <kua### [at] videotronca> wrote:
> > 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.
> sampling method.
> 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.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"HackerDaGreat57" <Hac### [at] gmailcom> wrote:
> 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 in the way you're asking.
But maybe another way.
If you create a sphere with an emissive finish, then you could make a scene
using radiosity, and that might work in the way you want it to.
You can also add no_image to the object definition so that it doesn't show up in
the scene, if it's in the camera's view frustum.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "HackerDaGreat57" <Hac### [at] gmailcom> wrote:
>
> > 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 in the way you're asking.
> But maybe another way.
>
> If you create a sphere with an emissive finish, then you could make a scene
> using radiosity, and that might work in the way you want it to.
>
> You can also add no_image to the object definition so that it doesn't show up in
> the scene, if it's in the camera's view frustum.
That would, in fact, work like a charm.
Do emissive materials count as light sources? (I'm concerned about the 127 light
limit)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"HackerDaGreat57" <Hac### [at] gmailcom> wrote:
> Do emissive materials count as light sources? (I'm concerned about the 127 light
> limit)
I doubt it. The whole radiosity mechanism is completely different from the
typical raytracing from a light source way of doing things - the way I
understand it is, basically every object in your scene is treated as a "light
source" since a lot of the point of radiosity is picking up and transferring the
color of surrounding objects to a surface via reflected ambient light.
So, if you had a room painted blue, and put a white box on a table, and shone a
light onto one of the walls, the box would appear blue - because it would be lit
only by the blue light reflected from the walls. That sort of thing.
The real trick is understanding and properly adjusting the settings to get a
good result. I'd start by using some of the radiosity levels in the include
file "rad.inc" or whatever it's called....
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"HackerDaGreat57" <Hac### [at] gmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > "HackerDaGreat57" <Hac### [at] gmailcom> wrote:
> >
> > > 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 in the way you're asking.
> > But maybe another way.
> >
> > If you create a sphere with an emissive finish, then you could make a scene
> > using radiosity, and that might work in the way you want it to.
> >
> > You can also add no_image to the object definition so that it doesn't show up in
> > the scene, if it's in the camera's view frustum.
>
> That would, in fact, work like a charm.
>
> Do emissive materials count as light sources? (I'm concerned about the 127 light
> limit)
You can use an object with texture{ finish{emission 1.0}} instead of regular
light_source, when the radiosity turn on.
But, you need very high radiosity quality settings, especially "error_bound", or
you will get a very blurred shadow without accuracy created by radiosity.
The accuracy will establish when error_bound is very small. But at this time you
need high "count" to eliminate spotted result.
radiosity{
pretrace_start 64/image_width
pretrace_end 4/image_width
count 160
nearest_count 2
error_bound 0.28 // this should be smaller
// if you use radiosity emission
// as a light source
recursion_limit 4
low_error_factor 0.5
gray_threshold 0.0
brightness 1.0 // brightness 1 is natural correct
media off
}
radiosity {} block place in the global_settings{}
Post a reply to this message
|
|
| |
| |
|
|
From: Alain Martel
Subject: Re: Why don't shadows get blurry after a certain distance? ("Distance Field=Sha=3D
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
|
|
| |
| |
|
|
From: Alain Martel
Subject: Re: Why don't shadows get blurry after a certain distance? ("Distance Field=
Date: 6 Jun 2022 10:50:11
Message: <629e1423$1@news.povray.org>
|
|
|
| |
| |
|
|
Le 2022-06-06 à 03:46, And a écrit :
> "HackerDaGreat57" <Hac### [at] gmailcom> wrote:
>> "Bald Eagle" <cre### [at] netscapenet> wrote:
>>> "HackerDaGreat57" <Hac### [at] gmailcom> wrote:
>>>
>>>> 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 in the way you're asking.
>>> But maybe another way.
>>>
>>> If you create a sphere with an emissive finish, then you could make a scene
>>> using radiosity, and that might work in the way you want it to.
>>>
>>> You can also add no_image to the object definition so that it doesn't show up in
>>> the scene, if it's in the camera's view frustum.
>>
>> That would, in fact, work like a charm.
>>
>> Do emissive materials count as light sources? (I'm concerned about the 127 light
>> limit)
>
> You can use an object with texture{ finish{emission 1.0}} instead of regular
> light_source, when the radiosity turn on.
> But, you need very high radiosity quality settings, especially "error_bound", or
> you will get a very blurred shadow without accuracy created by radiosity.
>
> The accuracy will establish when error_bound is very small. But at this time you
> need high "count" to eliminate spotted result.
>
>
>
> radiosity{
> pretrace_start 64/image_width
> pretrace_end 4/image_width
>
> count 160
> nearest_count 2
> error_bound 0.28 // this should be smaller
> // if you use radiosity emission
> // as a light source
> recursion_limit 4
> low_error_factor 0.5
> gray_threshold 0.0
> brightness 1.0 // brightness 1 is natural correct
> media off
>
> }
>
>
> radiosity {} block place in the global_settings{}
>
In a case like that, it's very interesting to use the importance feature
of the latest versions.
It's used as follow :
You start by assigning a default importance weight to everything with a
#default statement :
#declare HighSamples = 50000;
#declare AverageSamples = 75;
#default{rediosity{ importance AverageSamples /HighSamples }}
Then, for the objects to be used as light sources, you add :
radiosity{ importance 1 }
usually just before the closing brace or just before the texture definition.
In cases like this, I tend to also use the adaptive nearest_count :
nearest_count 20 3
#declare HighSamples = 50000;
#declare AverageSamples = 75;
#default{radiosity{ importance AverageSamples/HighSamples }}
global_settings{ assumed_gamma 1
radiosity{
pretrace_start 64/image_width
pretrace_end 4/image_width
minimum_reuse 4/image_width-0.05
count HighSamples
nearest_count 20 2
error_bound 0.2 // this should be smaller
// if you use radiosity emission
// as a light source
recursion_limit 4
low_error_factor 0.35
media off
}
<other optional global_settings stuff>}
That cause the average number of samples used to be about 75 for most f
the scene, but to be up to 50000 when sampling the area near the high
emission objects.
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Why don't shadows get blurry after a certain distance? ("DistanceField=
Date: 7 Jun 2022 07:44:31
Message: <629f3a1f$1@news.povray.org>
|
|
|
| |
| |
|
|
Op 6-6-2022 om 16:50 schreef Alain Martel:
>
> In a case like that, it's very interesting to use the importance feature
> of the latest versions.
>
> It's used as follow :
> You start by assigning a default importance weight to everything with a
> #default statement :
> #declare HighSamples = 50000;
> #declare AverageSamples = 75;
> #default{rediosity{ importance AverageSamples /HighSamples }}
>
> Then, for the objects to be used as light sources, you add :
> radiosity{ importance 1 }
> usually just before the closing brace or just before the texture
> definition.
>
> In cases like this, I tend to also use the adaptive nearest_count :
> nearest_count 20 3
>
> #declare HighSamples = 50000;
> #declare AverageSamples = 75;
> #default{radiosity{ importance AverageSamples/HighSamples }}
>
> global_settings{ assumed_gamma 1
> radiosity{
> pretrace_start 64/image_width
> pretrace_end 4/image_width
> minimum_reuse 4/image_width-0.05
>
> count HighSamples
> nearest_count 20 2
> error_bound 0.2 // this should be smaller
> // if you use radiosity emission
> // as a light source
> recursion_limit 4
> low_error_factor 0.35
> media off
>
> }
> <other optional global_settings stuff>}
>
> That cause the average number of samples used to be about 75 for most f
> the scene, but to be up to 50000 when sampling the area near the high
> emission objects.
This is very good advise! Note that you may have to crank-up your
emission value way beyond 1. For a rapid test, I used emission 1000
together with diffuse 1, for instance.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|