POV-Ray : Newsgroups : povray.advanced-users : Speeding up media Server Time
28 Nov 2021 10:34:41 EST (-0500)
  Speeding up media (Message 11 to 20 of 32)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Alain Martel
Subject: Re: Speeding up media
Date: 11 Feb 2021 10:45:30
Message: <6025511a$1@news.povray.org>
Le 2021-02-09 à 02:30, Thomas de Groot a écrit :
> Op 08/02/2021 om 16:16 schreef Alain Martel:
>> Le 2021-02-07 à 02:23, Thomas de Groot a écrit :
>>> Op 07/02/2021 om 04:41 schreef Mike Horvath:
>>>> On 2/5/2021 6:56 AM, Bald Eagle wrote:
>>>>> it's likely not your media - but your media settings.
>>>>>
>>>>> try:
>>>>>
>>>>>
http://news.povray.org/povray.newusers/message/%3C59a9ec1c%40news.povray.org%3E/#%3C59a9ec1c%40news.povray.org%3E

>>>>>
>>>>>
>>>>>
>>>>
>>>> I'm not sure how that applies to my case. I am not using emissive 
>>>> media or the "samples" keyword.
>>>>
>>>
>>> There is nothing really wrong with your code as far as I can tell and 
>>> from own experience. From the outside (of the media) it is even 
>>> rather fast due to the default intervals 1 and samples 1 (Yes! you 
>>> /do/ use samples, even if you don't).
>>>
>>> However, depending on the location of the camera within or without 
>>> the media, render times can be very different; you even may need to 
>>> increase the samples value to avoid splotches, and that will decrease 
>>> render time even more although not that much.
>>>
>>> Using media is time consuming. There is no alternative.
>>>
>>
>> The default for samples is 10.
>> samples default to 1 when using sampling method 1 or 2.
>> The default are, as of version 3.6 :
>>
>> sampling_method 3
>> intervals 1 //DO NOT increase !
>> samples 10
>>
>> Increasing intervals dramatically increase the rendering time without 
>> giving any appreciable improvement.
>>
>> samples 10 intervals 3 render slower than samples 50 intervals 1.
> 
> I don't know where in the wiki there was a line saying defaults being 
> intervals 1 and samples 1,1. Of course, I cannot find that paragraph 
> anymore (typical!); but you are right of course: default samples is 10.
> 
You have a mixup between the old version 3.5 and newer version 3.6 
documentations.

The format : samples 1,1
is that of method 1 and 2. It's used to set the number of samples for 
dark, bright intervals.
It's a leftover from the pre 3.6 version when the default sampling 
method was method 1. It demanded an intervals number large enough to 
match the number of distinct illuminated areas along a tracing path. If 
you had 20 spotlights shining through some media, then, you needed 40, 
or more, intervals : One interval for each illuminated part and one 
interval for each non-illuminated parts between the illuminated ones.

When using the default method 3, when you have two values for samples, 
the second is silently ignored.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Speeding up media
Date: 12 Feb 2021 02:33:43
Message: <60262f57@news.povray.org>
Op 11/02/2021 om 16:45 schreef Alain Martel:
> Le 2021-02-09 à 02:30, Thomas de Groot a écrit :
>> I don't know where in the wiki there was a line saying defaults being 
>> intervals 1 and samples 1,1. Of course, I cannot find that paragraph 
>> anymore (typical!); but you are right of course: default samples is 10.
>>
> You have a mixup between the old version 3.5 and newer version 3.6 
> documentations.
> 
> The format : samples 1,1
> is that of method 1 and 2. It's used to set the number of samples for 
> dark, bright intervals.
> It's a leftover from the pre 3.6 version when the default sampling 
> method was method 1. It demanded an intervals number large enough to 
> match the number of distinct illuminated areas along a tracing path. If 
> you had 20 spotlights shining through some media, then, you needed 40, 
> or more, intervals : One interval for each illuminated part and one 
> interval for each non-illuminated parts between the illuminated ones.
> 
> When using the default method 3, when you have two values for samples, 
> the second is silently ignored.

The wiki documentation then needs some updating here or a further 
elaboration.

-- 
Thomas


Post a reply to this message

From: Ash Holsenback
Subject: Re: Speeding up media
Date: 12 Feb 2021 06:03:39
Message: <6026608b$1@news.povray.org>
On 2/12/21 2:33 AM, Thomas de Groot wrote:
> Op 11/02/2021 om 16:45 schreef Alain Martel:
>> Le 2021-02-09 à 02:30, Thomas de Groot a écrit :
>>> I don't know where in the wiki there was a line saying defaults being 
>>> intervals 1 and samples 1,1. Of course, I cannot find that paragraph 
>>> anymore (typical!); but you are right of course: default samples is 10.
>>>
>> You have a mixup between the old version 3.5 and newer version 3.6 
>> documentations.
>>
>> The format : samples 1,1
>> is that of method 1 and 2. It's used to set the number of samples for 
>> dark, bright intervals.
>> It's a leftover from the pre 3.6 version when the default sampling 
>> method was method 1. It demanded an intervals number large enough to 
>> match the number of distinct illuminated areas along a tracing path. 
>> If you had 20 spotlights shining through some media, then, you needed 
>> 40, or more, intervals : One interval for each illuminated part and 
>> one interval for each non-illuminated parts between the illuminated ones.
>>
>> When using the default method 3, when you have two values for samples, 
>> the second is silently ignored.
> 
> The wiki documentation then needs some updating here or a further 
> elaboration.
> 

already there: about 2/3 of the way down...
http://wiki.povray.org/content/Reference:Sampling_Parameters_%26_Methods


Post a reply to this message

From: William F Pokorny
Subject: Re: Speeding up media
Date: 12 Feb 2021 07:45:31
Message: <6026786b$1@news.povray.org>
On 2/12/21 6:03 AM, Ash Holsenback wrote:
> On 2/12/21 2:33 AM, Thomas de Groot wrote:
>> Op 11/02/2021 om 16:45 schreef Alain Martel:
>>> Le 2021-02-09 à 02:30, Thomas de Groot a écrit :
...
>>>
>>> When using the default method 3, when you have two values for 
>>> samples, the second is silently ignored.
>>
>> The wiki documentation then needs some updating here or a further 
>> elaboration.
>>
> 
> already there: about 2/3 of the way down...
> http://wiki.povray.org/content/Reference:Sampling_Parameters_%26_Methods

Maybe my old eyes, but I see on that page more or less a block of text 
for method 3; then one for method 1 and last one for method 2.

For samples min, max in the block for method 1 I see:

"The samples Min, Max keyword specifies the minimum and maximum number 
of samples taken per interval. The default values are samples 1,1. The 
value for Max may be omitted, in which case the range Min = Max will be 
used."

Which for method 3 is:

- Wrong in suggesting the min and max are both used. Only min is used.

- Wrong in suggesting the default values for method 3 are 1,1. For 
method 3 it is 10. (A little bell that the wrong values are listed 
somewhere else too in the docs)

- Wrong in saying samples controls the min and max samples taken per 
interval. In method three the number of samples ultimately taken (where 
the adaptive method is actually working...) is controlled by 
aa_threshold and aa_level. The aa_level really being the limit on the 
recursive depth for the algorithm.

I think at a minimum Alain's sentence should be added to the block 
related to method 3 at the top. Plus a note about the default samples 
with method 3 for the single starting interval being the minimum 10.

Deja vu...

Aside: As people talk about media, it is kicking loose some of the items 
on my mental "media isn't quite right" list.

a) In multiple medias which I mentioned earlier I think the problem with 
mixing media types had to do with intervals. The first/last setting gets 
carried into the rest or similar because it gets set at parse time. It's 
always wrong for some of the media - if you mix types.

b) Do NOT use jitter with method 3. Well, unless you just want 
additional noise - and often slower media. It never fit the method 3 
approach and there are bugs with the actual jitter implementation in 
method 3. See, for example, https://github.com/POV-Ray/povray/issues/348.

Quite a bit of this post has been discussed previously elsewhere - a 
good chunk of it at least was public (newsgroups / github).

Bill P.


Post a reply to this message

From: Ash Holsenback
Subject: Re: Speeding up media
Date: 12 Feb 2021 10:59:11
Message: <6026a5cf$1@news.povray.org>
On 2/12/21 7:45 AM, William F Pokorny wrote:
> On 2/12/21 6:03 AM, Ash Holsenback wrote:
>> On 2/12/21 2:33 AM, Thomas de Groot wrote:
>>> Op 11/02/2021 om 16:45 schreef Alain Martel:
>>>> Le 2021-02-09 à 02:30, Thomas de Groot a écrit :
> ...
>>>>
>>>> When using the default method 3, when you have two values for 
>>>> samples, the second is silently ignored.
>>>
>>> The wiki documentation then needs some updating here or a further 
>>> elaboration.
>>>
>>
>> already there: about 2/3 of the way down...
>> http://wiki.povray.org/content/Reference:Sampling_Parameters_%26_Methods
> 
> Maybe my old eyes, but I see on that page more or less a block of text 
> for method 3; then one for method 1 and last one for method 2.

ok... i'm admitting to playing devils advocate to draw out more comments

> 
> For samples min, max in the block for method 1 I see:
> 
> "The samples Min, Max keyword specifies the minimum and maximum number 
> of samples taken per interval. The default values are samples 1,1. The 
> value for Max may be omitted, in which case the range Min = Max will be 
> used."

> 
> Which for method 3 is:
> 
> - Wrong in suggesting the min and max are both used. Only min is used.
> 
> - Wrong in suggesting the default values for method 3 are 1,1. For 
> method 3 it is 10.

i see that mention in the paragraph beginning: Sample method 1 and 
before paragraph beginning Sample method 2 ... am i picking nits?


>(A little bell that the wrong values are listed 
> somewhere else too in the docs)

fixed: http://wiki.povray.org/content?title=Special:RecentChanges&hidebots=0

> 
> - Wrong in saying samples controls the min and max samples taken per 
> interval. In method three the number of samples ultimately taken (where 
> the adaptive method is actually working...) is controlled by 
> aa_threshold and aa_level. The aa_level really being the limit on the 
> recursive depth for the algorithm.

again associated with Sample method 1... if you're buying my previous notion

> 
> I think at a minimum Alain's sentence should be added to the block 
> related to method 3 at the top. Plus a note about the default samples 
> with method 3 for the single starting interval being the minimum 10.

well i agree on this one ... just wanted discuss other issues before i 
addressed


Post a reply to this message

From: Thomas de Groot
Subject: Re: Speeding up media
Date: 13 Feb 2021 02:35:12
Message: <60278130@news.povray.org>
Op 12/02/2021 om 12:03 schreef Ash Holsenback:
> already there: about 2/3 of the way down...
> http://wiki.povray.org/content/Reference:Sampling_Parameters_%26_Methods

Aaah! The offending chapter! ;-)

To tell the truth, this whole chapter is one mix of confusion. At no 
point it becomes clear if we are reading about method 3, method 1, or 
method 2, as the text jumps from one item to another and back (maybe I 
am exagerating, but hardly so, and for non-native speakers a total 
bewilderment).

I would suggest to subdivide the chapter into clearly defined paragraphs 
with the following headers, /after the first 'note'/:

*- Method 3*
[following, a short exposition on how to use method 3 (default); the 
(exclusive) use of intervals 1 (default); the use of (single) samples, 
(default 10); etc]

*- Method 1*
[following, a short exposition of the legacy use of method 1]

*-Method 2*
[following, a short exposition of the legacy use of method 2]


That way, imho, new users and even experienced ones, will understand 
what it is all about. The recent discussion shows how confusing things 
sometimes appear to be...

-- 
Thomas


Post a reply to this message

From: Ash Holsenback
Subject: Re: Speeding up media
Date: 13 Feb 2021 08:18:34
Message: <6027d1aa$1@news.povray.org>
On 2/13/21 2:35 AM, Thomas de Groot wrote:
> Op 12/02/2021 om 12:03 schreef Ash Holsenback:
>> already there: about 2/3 of the way down...
>> http://wiki.povray.org/content/Reference:Sampling_Parameters_%26_Methods
> 
> Aaah! The offending chapter! ;-)
> 
> To tell the truth, this whole chapter is one mix of confusion. At no 
> point it becomes clear if we are reading about method 3, method 1, or 
> method 2, as the text jumps from one item to another and back (maybe I 
> am exagerating, but hardly so, and for non-native speakers a total 
> bewilderment).

agreed... i'm going to try to clean up grammar tangles etc

> 
> I would suggest to subdivide the chapter into clearly defined paragraphs 
> with the following headers, /after the first 'note'/:
> 
> *- Method 3*
> [following, a short exposition on how to use method 3 (default); the 
> (exclusive) use of intervals 1 (default); the use of (single) samples, 
> (default 10); etc]

spotted another difference with default for aa_level... 2nd paragraph 
after 1st note has it at 4

while: http://wiki.povray.org/content/Reference:Media

has it at 3... inquiring minds wanna know

> 
> *- Method 1*
> [following, a short exposition of the legacy use of method 1]
> 
> *-Method 2*
> [following, a short exposition of the legacy use of method 2]
> 
> 
> That way, imho, new users and even experienced ones, will understand 
> what it is all about. The recent discussion shows how confusing things 
> sometimes appear to be...
>


Post a reply to this message

From: William F Pokorny
Subject: Re: Speeding up media
Date: 13 Feb 2021 19:36:19
Message: <60287083$1@news.povray.org>
On 2/13/21 8:18 AM, Ash Holsenback wrote:
> On 2/13/21 2:35 AM, Thomas de Groot wrote:
...
> 
> spotted another difference with default for aa_level... 2nd paragraph 
> after 1st note has it at 4
> 
> while: http://wiki.povray.org/content/Reference:Media
> 
> has it at 3... inquiring minds wanna know
> 

It looks like it is 3.

media.cpp has:

Media::Media()
{
     Type = ISOTROPIC_SCATTERING;

     Intervals      = 10;
     Min_Samples    = 1;
     Max_Samples    = 1;
     Eccentricity   = 0.0;

     Absorption.Clear();
     Emission.Clear();
     Extinction.Clear();
     Scattering.Clear();

     is_constant = false;

     use_absorption = false;
     use_emission   = false;
     use_extinction = false;
     use_scattering = false;

     ignore_photons = false;

     sc_ext     = 1.0;
     Ratio      = 0.9;
     Confidence = 0.9;
     Variance   = 1.0 / 128.0;

     Sample_Threshold = nullptr;

     Sample_Method = 1;
     AA_Threshold = 0.1;
     AA_Level = 3;
     Jitter = 0.0;
}

Before anyone jumps on the Intervals, Min_Samples, Max_Samples and 
Sample_Method defaults above, in parser_materials.cpp we have:

     if (AllowToken(MEDIA_ID_TOKEN))
         IMediaObj = CurrentTokenData<Media>();
     else
     {
         /* as of v3.5, the default media method is now 3 */
         if (sceneData->EffectiveLanguageVersion() >= 350)
         {
             IMedia->Intervals = 1;
             IMedia->Min_Samples = 10;
             IMedia->Max_Samples = 10;
             IMedia->Sample_Method = 3;
         }
     }

---
Won't that parser override sometimes mess up the defaults for method 1 
and 2 you ask. Yes, I think it well might... I'm not going to do the 
work to prove it now, but likely media 1 & 2 users will 'always' have to 
set the intervals to 10, min and max to 1 if they want documented 
defaults for those two methods.

Bill P.


Post a reply to this message

From: Ash Holsenback
Subject: Re: Speeding up media
Date: 14 Feb 2021 07:22:17
Message: <602915f9@news.povray.org>
On 2/13/21 7:36 PM, William F Pokorny wrote:
> On 2/13/21 8:18 AM, Ash Holsenback wrote:
>> On 2/13/21 2:35 AM, Thomas de Groot wrote:
> ...
>>
>> spotted another difference with default for aa_level... 2nd paragraph 
>> after 1st note has it at 4
>>
>> while: http://wiki.povray.org/content/Reference:Media
>>
>> has it at 3... inquiring minds wanna know
>>
> 
> It looks like it is 3.

thanks for verification... thats what i found as well. just wanted 
someone to concur

> 
> media.cpp has:
> 
> Media::Media()
> {
>      Type = ISOTROPIC_SCATTERING;
> 
>      Intervals      = 10;
>      Min_Samples    = 1;
>      Max_Samples    = 1;
>      Eccentricity   = 0.0;
> 
>      Absorption.Clear();
>      Emission.Clear();
>      Extinction.Clear();
>      Scattering.Clear();
> 
>      is_constant = false;
> 
>      use_absorption = false;
>      use_emission   = false;
>      use_extinction = false;
>      use_scattering = false;
> 
>      ignore_photons = false;
> 
>      sc_ext     = 1.0;
>      Ratio      = 0.9;
>      Confidence = 0.9;
>      Variance   = 1.0 / 128.0;
> 
>      Sample_Threshold = nullptr;
> 
>      Sample_Method = 1;
>      AA_Threshold = 0.1;
>      AA_Level = 3;
>      Jitter = 0.0;
> }
> 
> Before anyone jumps on the Intervals, Min_Samples, Max_Samples and 
> Sample_Method defaults above, in parser_materials.cpp we have:
> 
>      if (AllowToken(MEDIA_ID_TOKEN))
>          IMediaObj = CurrentTokenData<Media>();
>      else
>      {
>          /* as of v3.5, the default media method is now 3 */
>          if (sceneData->EffectiveLanguageVersion() >= 350)
>          {
>              IMedia->Intervals = 1;
>              IMedia->Min_Samples = 10;
>              IMedia->Max_Samples = 10;
>              IMedia->Sample_Method = 3;
>          }
>      }
> 
> ---
> Won't that parser override sometimes mess up the defaults for method 1 
> and 2 you ask. Yes, I think it well might... I'm not going to do the 
> work to prove it now, but likely media 1 & 2 users will 'always' have to 
> set the intervals to 10, min and max to 1 if they want documented 
> defaults for those two methods.

funny you should sat that, as i was looking... several times went hmmmm 
what a tangle


Post a reply to this message

From: Ash Holsenback
Subject: Re: Speeding up media
Date: 14 Feb 2021 11:02:43
Message: <602949a3$1@news.povray.org>
On 2/13/21 7:36 PM, William F Pokorny wrote:
> On 2/13/21 8:18 AM, Ash Holsenback wrote:
>> On 2/13/21 2:35 AM, Thomas de Groot wrote:
> ...
>>
>> spotted another difference with default for aa_level... 2nd paragraph 
>> after 1st note has it at 4
>>
>> while: http://wiki.povray.org/content/Reference:Media
>>
>> has it at 3... inquiring minds wanna know
>>
> 
> It looks like it is 3.
> 
> media.cpp has:
> 
> Media::Media()
> {
>      Type = ISOTROPIC_SCATTERING;
> 
>      Intervals      = 10;
>      Min_Samples    = 1;
>      Max_Samples    = 1;
>      Eccentricity   = 0.0;
> 
>      Absorption.Clear();
>      Emission.Clear();
>      Extinction.Clear();
>      Scattering.Clear();
> 
>      is_constant = false;
> 
>      use_absorption = false;
>      use_emission   = false;
>      use_extinction = false;
>      use_scattering = false;
> 
>      ignore_photons = false;
> 
>      sc_ext     = 1.0;
>      Ratio      = 0.9;
>      Confidence = 0.9;
>      Variance   = 1.0 / 128.0;
> 
>      Sample_Threshold = nullptr;
> 
>      Sample_Method = 1;
>      AA_Threshold = 0.1;
>      AA_Level = 3;
>      Jitter = 0.0;
> }
> 
> Before anyone jumps on the Intervals, Min_Samples, Max_Samples and 
> Sample_Method defaults above, in parser_materials.cpp we have:
> 
>      if (AllowToken(MEDIA_ID_TOKEN))
>          IMediaObj = CurrentTokenData<Media>();
>      else
>      {
>          /* as of v3.5, the default media method is now 3 */
>          if (sceneData->EffectiveLanguageVersion() >= 350)
>          {
>              IMedia->Intervals = 1;
>              IMedia->Min_Samples = 10;
>              IMedia->Max_Samples = 10;
>              IMedia->Sample_Method = 3;
>          }
>      }
> 
> ---
> Won't that parser override sometimes mess up the defaults for method 1 
> and 2 you ask. Yes, I think it well might... I'm not going to do the 
> work to prove it now, but likely media 1 & 2 users will 'always' have to 
> set the intervals to 10, min and max to 1 if they want documented 
> defaults for those two methods.
> 
> Bill P.
> 
> 
another question: are variance, confidence and ratio valid in method 
3... given current narrative i'd say yes to the first two and no on the last

made some progress... here's what i have so far
http://wiki.povray.org/content/Reference:Sampling_Parameters_%26_Methods


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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