









 
 




 
 


Am 20.05.2017 um 00:47 schrieb Kenneth:
> Media (with default settings, at least) does not actually make use of an EVEN
> number of samples, but ignores that and reverts to the previous ODD value,
> visually. For example, an even value say 8, between 7 and 9 shows NO change
> to media from 7 samples. I tried it with both scattering and absorption medias.
You are right in that when using sampling method 3, POVRay indeed
always uses an ODD minimum number of samples per interval.
However, POVRay actually always takes MORE samples than specified: If
the specified number is even, POVRay takes at least one more sample. If
the specified number is odd, POVRay takes at least two more.
The reason behind the odd minimum number of samples per interval with
method 3 is that POVRay subdivides the interval into N subintervals,
takes samples at the N+1 boundaries of those subintervals (avoiding
duplicates) and then for each of the N subintervals takes another
sample at the center to determine if it that subinterval needs to be
subdivided even more. Thus, a minimum of (N+1)+N = 2N+1 samples are
taken per interval, which is an odd number.
For some reason, N is computed as (S+1)/2 rounded down (where S is the
specified minimum number of samples), rather than S/2 rounded down,
which gives one more subinterval than strictly needed if S is odd.
This may have to do with the fact that when there is more than one
interval, the first sample for any interval is taken at about the same
place as the last sample of the previous one [*], so that with M
intervals, of the M*(2N+1) samples taken, M1 are actually duplicates
(give or take some jitter), so the effective total minimum number of
samples would be M*(2N+1)(M1) = M*2N+1, so for even S POVRay does not
effectively take one surplus sample per interval, but just one
additional sample in total.
[*The careful observer may notice a potential for performance
improvement here.]
> Perhaps it's some kind of nowandthen interplay between all the various
> media options like extinction, confidence, ratio, etc. OR, maybe a math
> interplay re: the number of scene lights vs. the number of media intervals
> which the docs allude to in an arcane way (although I've never understood it).
> From the paragraph about 'ratio':
> "Note that the total number of intervals must exceed the number of illuminated
> intervals. If a ray passes in and out of 8 spotlights but you have only
> specified 5 intervals then an error occurs."
That section is only relevant for the old sampling methods 1 and 2.
Post a reply to this message


 
 




 
 


"omniverse" <omn### [at] charternet> wrote:
>
> Gave it a try with good old 3.7, not quite the same. 10, 11 and 12 samples are
> identical. Likewise 20, 21 and 22.
That is indeed odd! But in light of Clipka's analysis, it could be the result of
3.7's possibly mixedup treatment of intervals, etc. My guess, anyway.
Post a reply to this message


 
 




 
 


Am 20.05.2017 um 16:53 schrieb Kenneth:
> "omniverse" <omn### [at] charternet> wrote:
>
>>
>> Gave it a try with good old 3.7, not quite the same. 10, 11 and 12 samples are
>> identical. Likewise 20, 21 and 22.
>
> That is indeed odd! But in light of Clipka's analysis, it could be the result of
> 3.7's possibly mixedup treatment of intervals, etc. My guess, anyway.
Maybe. I'm not going to revisit the old code unless there's some
absolutely compelling reason to do so. ;)
Post a reply to this message


 
 




 
 


clipka <ano### [at] anonymousorg> wrote:
>
> The reason behind the odd minimum number of samples per interval with
> method 3 is that POVRay subdivides the interval into N subintervals,
> takes samples at the N+1 boundaries of those subintervals (avoiding
> duplicates) and then for each of the N subintervals takes another
> sample at the center to determine if it that subinterval needs to be
> subdivided even more...
[snip]
Wow, that is a deep and thorough analysis of the situation. Congratulations and
thanks for such quick detective work!
>
> > From the paragraph about 'ratio':
> > "Note that the total number of intervals must exceed the number of
> > illuminated intervals. If a ray passes in and out of 8 spotlights but
> > you have onlyspecified 5 intervals then an error occurs."
>
> That section is only relevant for the old sampling methods 1 and 2.
I keep wondering if that small section needs some rewording, to make better
sense. For example, the meaning of 'illuminated intervals' vs. nonilluminated
intervals isn't at all clear (to me, anyway.) And the 2nd sentence might be
reworded like this (IF I'm correct about it):
"If a CAMERA 'ray' passes in and out of 8 spotlight CONES but you have only
specified 5 intervals [in your single large media container?], then an error
occurs."
By the way...
[Kenneth wrote:}
"...8, between 7 and 9..."
Duh.
Yes indeed, the number 8 IS between 7 and 9!! I made *that* astounding discovery
last night as well!
Sorry. ;P
Post a reply to this message


 
 




 
 


"Kenneth" <kdw### [at] gmailcom> wrote:
>
> I keep wondering if that small section needs some rewording... [snip]
It just occurred to me that, if I *am* correct about the rewording of the
sentence, then 'illuminated intervals' vs. nonilluminated ones does make
sense but it assumes that the lights in the scene are all SPOTLIGHTS, with
clearlydefined 'illuminated' cone areas vs. areas outside the cones... the
latter being the 'nonilluminated' media intervals. (And it makes sense with
either a "large media container" OR just atmospheric media, with no container.)
Trouble is, the docs don't make any distinctions between using spotlights vs.
point lights, for example. With point lights, there would be NO
'nonilluminated' intervals, the way I understand it.
Post a reply to this message


 
 




 
 


Le 170520 Ã 12:42, Kenneth a Ã©crit :
> "Kenneth" <kdw### [at] gmailcom> wrote:
>
>>
>> I keep wondering if that small section needs some rewording... [snip]
>
> It just occurred to me that, if I *am* correct about the rewording of the
> sentence, then 'illuminated intervals' vs. nonilluminated ones does make
> sense but it assumes that the lights in the scene are all SPOTLIGHTS, with
> clearlydefined 'illuminated' cone areas vs. areas outside the cones... the
> latter being the 'nonilluminated' media intervals. (And it makes sense with
> either a "large media container" OR just atmospheric media, with no container.)
>
> Trouble is, the docs don't make any distinctions between using spotlights vs.
> point lights, for example. With point lights, there would be NO
> 'nonilluminated' intervals, the way I understand it.
>
You forgot the cases where there is shadows involved. You may have a
single light and an object with a gradient pattern that alternate
between opaque and transparent. That can cause A LOT of illuminated
intervals, possibly over 100...
Imagine:
sampling_method 1
intervals 500
samples 1,5
OUCH!
Post a reply to this message


 
 




 
 


Alain <kua### [at] videotronca> wrote:
>
> You forgot the cases where there is shadows involved.
Yeah, the media's selfshadowing behavior is another aspect of this. Regarding
intervals, are those *partial* shadows in the category of 'illuminated
intervals' or not? It's a mystery to me!
Post a reply to this message


 
 




 
 


Am 21.05.2017 um 18:28 schrieb Kenneth:
> Alain <kua### [at] videotronca> wrote:
>
>>
>> You forgot the cases where there is shadows involved.
>
> Yeah, the media's selfshadowing behavior is another aspect of this. Regarding
> intervals, are those *partial* shadows in the category of 'illuminated
> intervals' or not? It's a mystery to me!
I've never really looked at the intervals mechanism in detail (I just
know that they exist), but I can't imagine it being able to detect such
cases. I wouldn't even know how it could possibly detect the shadows of
objects. Such effects can only be detected on a subinterval basis.
So from what I know, the intervals mechanism can only identify the
boundaries of spotlights, and/or possibly overlapping media containers
(though I guess the latter is handled at a higher level).
Post a reply to this message


 
 




 
 


clipka <ano### [at] anonymousorg> wrote:
> Am 21.05.2017 um 18:28 schrieb Kenneth:
> >
> > Regarding intervals, are those *partial* shadows in the category of
> > 'illuminated intervals' or not? It's a mystery to me!
>
> I've never really looked at the intervals mechanism in detail (I just
> know that they exist), but I can't imagine it being able to detect such
> cases. I wouldn't even know how it could possibly detect the shadows of
> objects. Such effects can only be detected on a subinterval basis.
>
> So from what I know, the intervals mechanism can only identify the
> boundaries of spotlights, and/or possibly overlapping media containers
> (though I guess the latter is handled at a higher level).
Well, it heartens me to know that bigger brains than mine are having a bit of
trouble with this too ;)
I've been rereading the docs about this stuff (again!), and see another
sentence in 'ratio' that mayor may not? need clarifying: "The ratio keyword
distributes intervals differently between lit and unlit areas." I think it
should say SAMPLES rather than 'intervals', because the following sentence then
makes more sense: "The default value of ratio 0.9 means that lit intervals get
more samples than unlit intervals." Are INTERVALS actually "distributed
differently" too??
That little paragraph about 'ratio' has given me WAY too much trouble in the
past; it's now my sworn duty to try and improve it ;)
Post a reply to this message


 
 




 
 


Le 170521 Ã 17:53, Kenneth a Ã©crit :
> clipka <ano### [at] anonymousorg> wrote:
>> Am 21.05.2017 um 18:28 schrieb Kenneth:
>>>
>>> Regarding intervals, are those *partial* shadows in the category of
>>> 'illuminated intervals' or not? It's a mystery to me!
>>
>> I've never really looked at the intervals mechanism in detail (I just
>> know that they exist), but I can't imagine it being able to detect such
>> cases. I wouldn't even know how it could possibly detect the shadows of
>> objects. Such effects can only be detected on a subinterval basis.
>>
>> So from what I know, the intervals mechanism can only identify the
>> boundaries of spotlights, and/or possibly overlapping media containers
>> (though I guess the latter is handled at a higher level).
>
> Well, it heartens me to know that bigger brains than mine are having a bit of
> trouble with this too ;)
>
> I've been rereading the docs about this stuff (again!), and see another
> sentence in 'ratio' that mayor may not? need clarifying: "The ratio keyword
> distributes intervals differently between lit and unlit areas." I think it
> should say SAMPLES rather than 'intervals', because the following sentence then
> makes more sense: "The default value of ratio 0.9 means that lit intervals get
> more samples than unlit intervals." Are INTERVALS actually "distributed
> differently" too??
>
> That little paragraph about 'ratio' has given me WAY too much trouble in the
> past; it's now my sworn duty to try and improve it ;)
>
>
>
>
When using sampling method 3, the default, ratio have no meaning.
You only need to think about total samples count. ratio, confidence and
variance are not used. intervals need to stay at it's default value of 1.
Leave them out unless you use method 1 or 2 and save yourself from
headaches.
Alain
Post a reply to this message


 
 




 

