POV-Ray : Newsgroups : povray.advanced-users : Speeding up media Server Time
9 Oct 2026 02:47:41 EDT (-0400)
  Speeding up media (Message 1 to 32 of 32)  
From: Mike Horvath
Subject: Speeding up media
Date: 5 Feb 2021 05:59:14
Message: <601d2502$1@news.povray.org>
I have a planetary atmosphere with both scattering and absorption 
interior media. It renders very slowly. Any tips on speeding it up? Thanks.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Speeding up media
Date: 5 Feb 2021 05:59:53
Message: <601d2529$1@news.povray.org>
On 2/5/2021 5:59 AM, Mike Horvath wrote:
> I have a planetary atmosphere with both scattering and absorption 
> interior media. It renders very slowly. Any tips on speeding it up? Thanks.
> 
> 
> Mike


Here is the media:


// atmosphere
#declare RWorld_Atmos_Color_Scatter	= <0.1, 0.3, 1.0>;
#declare RWorld_Atmos_Color_Absorb	= <0.9, 0.7, 0.0>;		// should be the 
inverse of RWorld_Atmos_Color_Scatter
#declare RWorld_Atmosphere_Object = difference
{
	cylinder {<0,+RWorld_Ring_Width/2,0>,		<0,-RWorld_Ring_Width/2,0>,	 
RWorld_Ring_Radius - 1}	//
	cylinder {<0,+RWorld_Ring_Width/2 + 1,0>,	<0,-RWorld_Ring_Width/2 - 
1,0>,	RWorld_Ring_Radius - RWorld_Atmosphere_Height}
	bounded_by
	{
		cylinder {<0,+RWorld_Ring_Width/2,0>,		<0,-RWorld_Ring_Width/2,0>,	 
RWorld_Ring_Radius - 1}
	}
	hollow
	material
	{
		texture
		{
			pigment {rgbt 1}
		}
		interior
		{
			media
			{
				scattering
				{
					4, RWorld_Atmos_Color_Scatter
				}
				density
				{
					// Reverse: It starts at 1.0 at the origin and decreases to a 
minimum value of 0.0 as it approaches a distance of 1 unit from the Y axis.
					function {1-f_cylindrical(x,y,z)}
					density_map
					{
						[0 rgb 0/10]
						[1-RWorld_Atmosphere_Height/RWorld_Ring_Radius rgb 0/10]
						[1 rgb 1/10]
					}
					scale RWorld_Ring_Radius
				}
			}
			media
			{
				absorption RWorld_Atmos_Color_Absorb
				density
				{
					function {1-f_cylindrical(x,y,z)}
					density_map
					{
						[0 rgb 0/10]
						[1-RWorld_Atmosphere_Height/RWorld_Ring_Radius rgb 0/10]
						[1 rgb 1/10]
					}
					scale RWorld_Ring_Radius
				}
			}
		}
	}
}


Post a reply to this message

From: Bald Eagle
Subject: Re: Speeding up media
Date: 5 Feb 2021 07:00:00
Message: <web.601d3280df5181b61f9dae300@news.povray.org>
Mike Horvath <mik### [at] gmailcom> wrote:
> I have a planetary atmosphere with both scattering and absorption
> interior media. It renders very slowly. Any tips on speeding it up? Thanks.
>
>
> Mike

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


Post a reply to this message

From: jr
Subject: Re: Speeding up media
Date: 5 Feb 2021 09:55:09
Message: <web.601d5bbedf5181b679819d980@news.povray.org>
hi,

Mike Horvath <mik### [at] gmailcom> wrote:
> On 2/5/2021 5:59 AM, Mike Horvath wrote:
> > I have a planetary atmosphere with both scattering and absorption
> > interior media. It renders very slowly. Any tips on speeding it up? Thanks.
>
> Here is the media: ...

tweaking the code may gain you some, but, perhaps, you can cheat and clip the
sphere/planet just behind the horizon, saving ~40%.


>       [0 rgb 0/10]

confused why you don't write just '[0 rgb 0]'.


regards, jr.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Speeding up media
Date: 6 Feb 2021 02:41:24
Message: <601e4824$1@news.povray.org>
Op 05/02/2021 om 11:59 schreef Mike Horvath:
> On 2/5/2021 5:59 AM, Mike Horvath wrote:
>> I have a planetary atmosphere with both scattering and absorption 
>> interior media. It renders very slowly. Any tips on speeding it up? 
>> Thanks.
>>
>>
>> Mike
> 
> 
> Here is the media:
> 

I am studying/testing your media, but need a little time...

-- 
Thomas


Post a reply to this message

From: Mike Horvath
Subject: Re: Speeding up media
Date: 6 Feb 2021 22:41:29
Message: <601f6169$1@news.povray.org>
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.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Speeding up media
Date: 6 Feb 2021 22:43:00
Message: <601f61c4$1@news.povray.org>
On 2/5/2021 9:52 AM, jr wrote:
> hi,
> 
> Mike Horvath <mik### [at] gmailcom> wrote:
>> On 2/5/2021 5:59 AM, Mike Horvath wrote:
>>> I have a planetary atmosphere with both scattering and absorption
>>> interior media. It renders very slowly. Any tips on speeding it up? Thanks.
>>
>> Here is the media: ...
> 
> tweaking the code may gain you some, but, perhaps, you can cheat and clip the
> sphere/planet just behind the horizon, saving ~40%.
> 
> 

It's actually a cylinder or ring, so it reflects upon itself on the insides.


>>        [0 rgb 0/10]
> 
> confused why you don't write just '[0 rgb 0]'.
> 
> 
> regards, jr.
> 
> 

I use fractions a lot and like to keep the source code tidy.


Mike


Post a reply to this message

From: Thomas de Groot
Subject: Re: Speeding up media
Date: 7 Feb 2021 02:23:31
Message: <601f9573$1@news.povray.org>
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.

-- 
Thomas


Post a reply to this message

From: Alain Martel
Subject: Re: Speeding up media
Date: 8 Feb 2021 10:16:10
Message: <602155ba$1@news.povray.org>
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.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Speeding up media
Date: 9 Feb 2021 02:30:23
Message: <60223a0f@news.povray.org>
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.

-- 
Thomas


Post a reply to this message

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

From: Alain Martel
Subject: Re: Speeding up media
Date: 14 Feb 2021 12:32:56
Message: <60295ec8$1@news.povray.org>
Le 2021-02-14 à 11:02, Ash Holsenback a écrit :

> 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

The confidense and ratio are to adjust the samples numbers between the 
various intervals and are not used.
As for variance, it also seems to be method 1 and 2 specific. It don't 
seems to have any effect when using method 3.


Post a reply to this message

From: Ash Holsenback
Subject: Re: Speeding up media
Date: 14 Feb 2021 14:33:04
Message: <60297af0$1@news.povray.org>
On 2/14/21 12:32 PM, Alain Martel wrote:
> Le 2021-02-14 à 11:02, Ash Holsenback a écrit :
> 
>> 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
> 
> The confidense and ratio are to adjust the samples numbers between the 
> various intervals and are not used.
> As for variance, it also seems to be method 1 and 2 specific. It don't 
> seems to have any effect when using method 3.

are you sure about that... given that the narrative after Sampling 
Method 3: uses the term variance, then later on in the narrative in 
Sampling method 1: last paragraph ( above the note ) links variance and 
confidence together... did i make a bad leap? the role of ratio is a 
couple of paragraphs up... please expand on this a bit ;-)


Post a reply to this message

From: Ash Holsenback
Subject: Re: Speeding up media
Date: 14 Feb 2021 14:38:42
Message: <60297c42@news.povray.org>
On 2/14/21 2:33 PM, Ash Holsenback wrote:
> On 2/14/21 12:32 PM, Alain Martel wrote:
>> Le 2021-02-14 à 11:02, Ash Holsenback a écrit :
>>
>>> 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
>>
>> The confidense and ratio are to adjust the samples numbers between the 
>> various intervals and are not used.
>> As for variance, it also seems to be method 1 and 2 specific. It don't 
>> seems to have any effect when using method 3.
> 
> are you sure about that... given that the narrative after Sampling 
> Method 3: uses the term variance, then later on in the narrative in 
> Sampling method 1: last paragraph ( above the note ) links variance and 
> confidence together... did i make a bad leap? the role of ratio is a 
> couple of paragraphs up... please expand on this a bit ;-)

one more thing... would it be accurate to say that most if not all those 
media related keywords work for all three methods, however some of their 
roles have changed.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Speeding up media
Date: 15 Feb 2021 02:37:16
Message: <602a24ac@news.povray.org>
Op 14/02/2021 om 20:38 schreef Ash Holsenback:
> On 2/14/21 2:33 PM, Ash Holsenback wrote:
>> On 2/14/21 12:32 PM, Alain Martel wrote:
>>> Le 2021-02-14 à 11:02, Ash Holsenback a écrit :
>>>
>>>> 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 
>>>>
>>>
>>> The confidense and ratio are to adjust the samples numbers between 
>>> the various intervals and are not used.
>>> As for variance, it also seems to be method 1 and 2 specific. It 
>>> don't seems to have any effect when using method 3.
>>
>> are you sure about that... given that the narrative after Sampling 
>> Method 3: uses the term variance, then later on in the narrative in 
>> Sampling method 1: last paragraph ( above the note ) links variance 
>> and confidence together... did i make a bad leap? the role of ratio is 
>> a couple of paragraphs up... please expand on this a bit ;-)
> 
> one more thing... would it be accurate to say that most if not all those 
> media related keywords work for all three methods, however some of their 
> roles have changed.

Give that man a beer!

Much better assuredly.

Pending more learned answers on your last question, I would be wary to 
affirm this. The point being probably - if those are silently ignored by 
method 3 as Alain states - that people will wring themselves into hoops 
only to see some 'improvements' to their media, without any results 
obviously. If, on the other hand, those are /not/ ignored, we need to be 
dead sure about it. What does the code say, Mr Pokorny?

-- 
Thomas


Post a reply to this message

From: William F Pokorny
Subject: Re: Speeding up media
Date: 15 Feb 2021 06:00:30
Message: <602a544e$1@news.povray.org>
On 2/15/21 2:37 AM, Thomas de Groot wrote:
> Op 14/02/2021 om 20:38 schreef Ash Holsenback:
>> On 2/14/21 2:33 PM, Ash Holsenback wrote:
>>> On 2/14/21 12:32 PM, Alain Martel wrote:
>>>> Le 2021-02-14 à 11:02, Ash Holsenback a écrit :
...
> Give that man a beer!
> 
> Much better assuredly.
> 
> Pending more learned answers on your last question, I would be wary to 
> affirm this. The point being probably - if those are silently ignored by 
> method 3 as Alain states - that people will wring themselves into hoops 
> only to see some 'improvements' to their media, without any results 
> obviously. If, on the other hand, those are /not/ ignored, we need to be 
> dead sure about it. What does the code say, Mr Pokorny?
> 

Generally, I recommend we make the recommendation to use only media 3 
more strongly. Using the other methods with the current code base is 
potentially confusing given they won't get some of the normal defaults 
due how the flip to method 3 was done in the parsing phase.

I agree with Alain. The keywords: confidence, variance and ratio are 
used only with methods 1 and 2 (a). The use of the variance word in the 
method 3 wording is I suppose correct, but unfortunate. Another sample 
is taken between two existing, if the difference between the two end 
samples is > the aa_threshold.

(a) For the purposes of documentation see (a1) and ignore the rest of 
this footnote. Someone can set the intervals in method 3 to more than 1 
and if they do ratio does come into play with a lit and un-lit intervals 
scheme internally which 'probably' doesn't have much of an end effect 
for method 3, but... Always true, sometimes, almost never, never? Not 
sure... When using multiple medias with mixed sampling types, I know of 
some bleed through in the keyword settings between methods.

(a1) It would be good to somewhere add a note along the lines of: When 
using multiple medias, it's strongly recommend all use the same sampling 
method. With the current code there is some keyword setting bleed 
between methods.

Aside: The sentence about monte carlo.... only applies to methods 1 and 2.

Aside: FWIW. In povr I plan to at least make it appear methods 1 & 2 and 
their keywords do not exist at all (and I'll pull jitter from media 3). 
Ideally, I'll replace the whole of the current implementation with a new 
media 3 like one. There are standing issue with media 3 too with respect 
to speed, accuracy of result and when and if adaptive sampling actually 
kicks in. But, it's media - which is fuzzy. Most remaining issues don't 
matter much to an end result as I recall - so long as we sample enough 
that things look good. ;-)

Bill P.


Post a reply to this message

From: Ash Holsenback
Subject: Re: Speeding up media
Date: 15 Feb 2021 12:39:57
Message: <602ab1ed$1@news.povray.org>
On 2/15/21 6:00 AM, William F Pokorny wrote:
> On 2/15/21 2:37 AM, Thomas de Groot wrote:
>> Op 14/02/2021 om 20:38 schreef Ash Holsenback:
>>> On 2/14/21 2:33 PM, Ash Holsenback wrote:
>>>> On 2/14/21 12:32 PM, Alain Martel wrote:
>>>>> Le 2021-02-14 à 11:02, Ash Holsenback a écrit :
> ...
>> Give that man a beer!
>>
>> Much better assuredly.
>>
>> Pending more learned answers on your last question, I would be wary to 
>> affirm this. The point being probably - if those are silently ignored 
>> by method 3 as Alain states - that people will wring themselves into 
>> hoops only to see some 'improvements' to their media, without any 
>> results obviously. If, on the other hand, those are /not/ ignored, we 
>> need to be dead sure about it. What does the code say, Mr Pokorny?
>>
> 
> Generally, I recommend we make the recommendation to use only media 3 
> more strongly. Using the other methods with the current code base is 
> potentially confusing given they won't get some of the normal defaults 
> due how the flip to method 3 was done in the parsing phase.
> 
> I agree with Alain. The keywords: confidence, variance and ratio are 
> used only with methods 1 and 2 (a). The use of the variance word in the 
> method 3 wording is I suppose correct, but unfortunate. Another sample 
> is taken between two existing, if the difference between the two end 
> samples is > the aa_threshold.
> 
> (a) For the purposes of documentation see (a1) and ignore the rest of 
> this footnote. Someone can set the intervals in method 3 to more than 1 
> and if they do ratio does come into play with a lit and un-lit intervals 
> scheme internally which 'probably' doesn't have much of an end effect 
> for method 3, but... Always true, sometimes, almost never, never? Not 
> sure... When using multiple medias with mixed sampling types, I know of 
> some bleed through in the keyword settings between methods.
> 
> (a1) It would be good to somewhere add a note along the lines of: When 
> using multiple medias, it's strongly recommend all use the same sampling 
> method. With the current code there is some keyword setting bleed 
> between methods.
> 
> Aside: The sentence about monte carlo.... only applies to methods 1 and 2.
> 
> Aside: FWIW. In povr I plan to at least make it appear methods 1 & 2 and 
> their keywords do not exist at all (and I'll pull jitter from media 3). 
> Ideally, I'll replace the whole of the current implementation with a new 
> media 3 like one. There are standing issue with media 3 too with respect 
> to speed, accuracy of result and when and if adaptive sampling actually 
> kicks in. But, it's media - which is fuzzy. Most remaining issues don't 
> matter much to an end result as I recall - so long as we sample enough 
> that things look good. ;-)
> 
> Bill P.
> 
> 

thanks /everyone/ for guidance and support... please review
http://wiki.povray.org/content/Reference:Sampling_Parameters_%26_Methods


Post a reply to this message

From: Alain Martel
Subject: Re: Speeding up media
Date: 15 Feb 2021 18:58:20
Message: <602b0a9c$1@news.povray.org>
Le 2021-02-15 à 06:00, William F Pokorny a écrit :

> (a) For the purposes of documentation see (a1) and ignore the rest of 
> this footnote. Someone can set the intervals in method 3 to more than 1 
> and if they do ratio does come into play with a lit and un-lit intervals 
> scheme internally which 'probably' doesn't have much of an end effect 
> for method 3, but... Always true, sometimes, almost never, never? Not 
> sure... When using multiple medias with mixed sampling types, I know of 
> some bleed through in the keyword settings between methods.
> 
> Bill P.
> 
> 

This probably explain why using several intervals bog down method 3 so 
much. It tries to compute ratios and variances when it's not needed.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Speeding up media
Date: 16 Feb 2021 02:36:33
Message: <602b7601$1@news.povray.org>
Op 15/02/2021 om 18:39 schreef Ash Holsenback:
> On 2/15/21 6:00 AM, William F Pokorny wrote:
>> On 2/15/21 2:37 AM, Thomas de Groot wrote:
>>> Op 14/02/2021 om 20:38 schreef Ash Holsenback:
>>>> On 2/14/21 2:33 PM, Ash Holsenback wrote:
>>>>> On 2/14/21 12:32 PM, Alain Martel wrote:
>>>>>> Le 2021-02-14 à 11:02, Ash Holsenback a écrit :
>> ...
>>> Give that man a beer!
>>>
>>> Much better assuredly.
>>>
>>> Pending more learned answers on your last question, I would be wary 
>>> to affirm this. The point being probably - if those are silently 
>>> ignored by method 3 as Alain states - that people will wring 
>>> themselves into hoops only to see some 'improvements' to their media, 
>>> without any results obviously. If, on the other hand, those are /not/ 
>>> ignored, we need to be dead sure about it. What does the code say, Mr 
>>> Pokorny?
>>>
>>
>> Generally, I recommend we make the recommendation to use only media 3 
>> more strongly. Using the other methods with the current code base is 
>> potentially confusing given they won't get some of the normal defaults 
>> due how the flip to method 3 was done in the parsing phase.
>>
>> I agree with Alain. The keywords: confidence, variance and ratio are 
>> used only with methods 1 and 2 (a). The use of the variance word in 
>> the method 3 wording is I suppose correct, but unfortunate. Another 
>> sample is taken between two existing, if the difference between the 
>> two end samples is > the aa_threshold.
>>
>> (a) For the purposes of documentation see (a1) and ignore the rest of 
>> this footnote. Someone can set the intervals in method 3 to more than 
>> 1 and if they do ratio does come into play with a lit and un-lit 
>> intervals scheme internally which 'probably' doesn't have much of an 
>> end effect for method 3, but... Always true, sometimes, almost never, 
>> never? Not sure... When using multiple medias with mixed sampling 
>> types, I know of some bleed through in the keyword settings between 
>> methods.
>>
>> (a1) It would be good to somewhere add a note along the lines of: When 
>> using multiple medias, it's strongly recommend all use the same 
>> sampling method. With the current code there is some keyword setting 
>> bleed between methods.
>>
>> Aside: The sentence about monte carlo.... only applies to methods 1 
>> and 2.
>>
>> Aside: FWIW. In povr I plan to at least make it appear methods 1 & 2 
>> and their keywords do not exist at all (and I'll pull jitter from 
>> media 3). Ideally, I'll replace the whole of the current 
>> implementation with a new media 3 like one. There are standing issue 
>> with media 3 too with respect to speed, accuracy of result and when 
>> and if adaptive sampling actually kicks in. But, it's media - which is 
>> fuzzy. Most remaining issues don't matter much to an end result as I 
>> recall - so long as we sample enough that things look good. ;-)
>>
>> Bill P.
>>
>>
> 
> thanks /everyone/ for guidance and support... please review
> http://wiki.povray.org/content/Reference:Sampling_Parameters_%26_Methods

Yes. Add that note (a1) from Bill. That is important indeed. One trivial 
thing I want to suggest: Add an empty line between Methods. It would 
increase the readability even more.

[Maybe Alain will not have to repeat indefinitely anymore about method 
3, intervals 1, and single samples.... ;-) ]

-- 
Thomas


Post a reply to this message

From: William F Pokorny
Subject: Re: Speeding up media
Date: 17 Feb 2021 08:23:18
Message: <602d18c6$1@news.povray.org>
On 2/15/21 6:58 PM, Alain Martel wrote:
> Le 2021-02-15 à 06:00, William F Pokorny a écrit :
> 
>> (a) For the purposes of documentation see (a1) and ignore the rest of 
>> this footnote. Someone can set the intervals in method 3 to more than 
>> 1 and if they do ratio does come into play with a lit and un-lit 
>> intervals scheme internally which 'probably' doesn't have much of an 
>> end effect for method 3, but... Always true, sometimes, almost never, 
>> never? Not sure... When using multiple medias with mixed sampling 
>> types, I know of some bleed through in the keyword settings between 
>> methods.
>>
>> Bill P.
>>
>>
> 
> This probably explain why using several intervals bog down method 3 so 
> much. It tries to compute ratios and variances when it's not needed.

Only ratios(a) I believe, but yes, expect this a part of the typical 
slow down (always? sometimes not?). I don't understand all the whys.

The most obvious reason is the number of interval acts as a multiplier 
for the starting number of samples with method 3 and this is 10.

(a) and the underlying light interval stuff. This code is tied to light 
types. My guess is it's aimed at speeding up (or better resolving 
perhaps?) spotlights and cylindrical lighting when using media(a1). 
Maybe it all more or less works - but I have doubts about how well 
beyond the simplest test set ups. I'd like to pull all the lit/unlit 
interval code out too.

Bill P.


Post a reply to this message

From: Alain Martel
Subject: Re: Speeding up media
Date: 17 Feb 2021 11:40:01
Message: <602d46e1$1@news.povray.org>
Le 2021-02-17 à 08:23, William F Pokorny a écrit :
> On 2/15/21 6:58 PM, Alain Martel wrote:
>> Le 2021-02-15 à 06:00, William F Pokorny a écrit :
>>
>>> (a) For the purposes of documentation see (a1) and ignore the rest of 
>>> this footnote. Someone can set the intervals in method 3 to more than 
>>> 1 and if they do ratio does come into play with a lit and un-lit 
>>> intervals scheme internally which 'probably' doesn't have much of an 
>>> end effect for method 3, but... Always true, sometimes, almost never, 
>>> never? Not sure... When using multiple medias with mixed sampling 
>>> types, I know of some bleed through in the keyword settings between 
>>> methods.
>>>
>>> Bill P.
>>>
>>>
>>
>> This probably explain why using several intervals bog down method 3 so 
>> much. It tries to compute ratios and variances when it's not needed.
> 
> Only ratios(a) I believe, but yes, expect this a part of the typical 
> slow down (always? sometimes not?). I don't understand all the whys.
> 
> The most obvious reason is the number of interval acts as a multiplier 
> for the starting number of samples with method 3 and this is 10.
> 
> (a) and the underlying light interval stuff. This code is tied to light 
> types. My guess is it's aimed at speeding up (or better resolving 
> perhaps?) spotlights and cylindrical lighting when using media(a1). 
> Maybe it all more or less works - but I have doubts about how well 
> beyond the simplest test set ups. I'd like to pull all the lit/unlit 
> interval code out too.
> 
> Bill P.

In my testings, intervals 5 samples 10 run MUCH slower than samples 100 
and default intervals 1.


Post a reply to this message

From: William F Pokorny
Subject: Re: Speeding up media
Date: 17 Feb 2021 14:22:53
Message: <602d6d0d$1@news.povray.org>
On 2/17/21 11:40 AM, Alain Martel wrote:
> Le 2021-02-17 à 08:23, William F Pokorny a écrit :
...
> 
> In my testings, intervals 5 samples 10 run MUCH slower than samples 100 
> and default intervals 1.
> 

OK. I'm sure you see what you see. If a small scene, post it and I'll 
add it to my media test scenes. It will get run, but it's unlikely I'll 
dig into it. The intervals > 1 cases are not something we should be using.

Using the recent media scene posted by Bald Eagle I see:

intervals, samples

Constant media
---------------
1, 100 : 46.27user 0.05system 0:12.60elapsed  (51.00)
5,  10 : 29.46user 0.07system 0:08.38elapsed  (9.36)
10, 10 : 51.06user 0.04system 0:13.81elapsed  (10.10)

Non-Constant media which in fact is constant:
( density { function { 1 } }  // Fools the POV-Ray constant test.
---------------
1, 100 : 140.91user 0.10system 0:36.46elapsed  (101.00)
5,  10 :  80.60user 0.07system 0:21.24elapsed  (11.00)
10, 10 : 151.94user 0.08system 0:39.21elapsed  (11.00)

Bald Eagles original gradient x density media
---------------
1, 100 : 132.72user 0.08system 0:34.38elapsed  (101.00)
5,  10 :  76.09user 0.09system 0:20.12elapsed  (11.00)
10, 10 : 143.69user 0.07system 0:37.18elapsed  (11.00)

Intervals > 1 being slower but not too MUCH slower.

Bill P.


Post a reply to this message

From: Mike Horvath
Subject: Re: Speeding up media
Date: 22 Feb 2021 14:00:04
Message: <6033ff34$1@news.povray.org>
On 2/7/2021 2:23 AM, Thomas de Groot wrote:
> 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.
> 


I am inside the cylinder, but the cylinder is clipped by another smaller 
cylinder to create a shell.



Mike


Post a reply to this message

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