POV-Ray : Newsgroups : povray.general : +am2 performance question Server Time
27 Nov 2024 16:32:49 EST (-0500)
  +am2 performance question (Message 1 to 6 of 6)  
From: Jan Dvorak
Subject: +am2 performance question
Date: 26 May 2008 03:00:45
Message: <483a601d$1@news.povray.org>
Hello,
when using +am2 (recursive antialiasing), are the corner samples shared 
between their respective pixels, that is, is +am2 as fast as +am1 or is 
it four times slower if no antialiasing takes place? Are the edge 
samples reused?

-- 
You know you've been raytracing too long when...
you start thinking up your own "You know you've been raytracing too long 
when..." sigs (I did).
		-Johnny D
Johnny D


Post a reply to this message

From: Warp
Subject: Re: +am2 performance question
Date: 26 May 2008 04:17:36
Message: <483a7220@news.povray.org>
Jan Dvorak <jan### [at] centrumcz> wrote:
> Hello,
> when using +am2 (recursive antialiasing), are the corner samples shared 
> between their respective pixels, that is, is +am2 as fast as +am1 or is 
> it four times slower if no antialiasing takes place? Are the edge 
> samples reused?

  I actually don't know the exact details of the antialiasing algorithm
used, but I have the impression that no samples are shared between pixels
in either method. This is because antialiasing can be jittered, and if
that's the case, most samples wouldn't be at pixel edges and thus difficult
to share. (I have to admit, though, that I can think of variations where
samples can be jittered *and* shared between pixels. However, I don't know
exactly what POV-Ray is doing.)

-- 
                                                          - Warp


Post a reply to this message

From: John VanSickle
Subject: Re: +am2 performance question
Date: 26 May 2008 07:16:31
Message: <483a9c0f@news.povray.org>
Warp wrote:
> Jan Dvorak <jan### [at] centrumcz> wrote:
>> Hello,
>> when using +am2 (recursive antialiasing), are the corner samples shared 
>> between their respective pixels, that is, is +am2 as fast as +am1 or is 
>> it four times slower if no antialiasing takes place? Are the edge 
>> samples reused?
> 
>   I actually don't know the exact details of the antialiasing algorithm
> used, but I have the impression that no samples are shared between pixels
> in either method. This is because antialiasing can be jittered, and if
> that's the case, most samples wouldn't be at pixel edges and thus difficult
> to share. (I have to admit, though, that I can think of variations where
> samples can be jittered *and* shared between pixels. However, I don't know
> exactly what POV-Ray is doing.)

I don't see a problem with jittering a shared sample.  Samples can be 
assigned to a particular place in the pixel, and this assignment used to 
determine any sharing between pixels (or sub-pixels, since this is 
adaptive); when the sample is actually traced, it can be jittered at 
that time.

Regards,
John


Post a reply to this message

From: Warp
Subject: Re: +am2 performance question
Date: 26 May 2008 08:15:02
Message: <483aa9c6@news.povray.org>
John VanSickle <evi### [at] hotmailcom> wrote:
> > (I have to admit, though, that I can think of variations where
> > samples can be jittered *and* shared between pixels. However, I don't know
> > exactly what POV-Ray is doing.)

> I don't see a problem with jittering a shared sample.  Samples can be 
> assigned to a particular place in the pixel, and this assignment used to 
> determine any sharing between pixels (or sub-pixels, since this is 
> adaptive); when the sample is actually traced, it can be jittered at 
> that time.

  Which is what I said. :)

  Maybe if POV-Ray doesn't currently share antialiasing samples between
pixel someone could take a look how difficult it would be to make a patch
to do exactly that.

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: +am2 performance question
Date: 26 May 2008 12:37:48
Message: <483ae75c@news.povray.org>
Warp nous illumina en ce 2008-05-26 04:17 -->
> Jan Dvorak <jan### [at] centrumcz> wrote:
>> Hello,
>> when using +am2 (recursive antialiasing), are the corner samples shared 
>> between their respective pixels, that is, is +am2 as fast as +am1 or is 
>> it four times slower if no antialiasing takes place? Are the edge 
>> samples reused?
> 
>   I actually don't know the exact details of the antialiasing algorithm
> used, but I have the impression that no samples are shared between pixels
> in either method. This is because antialiasing can be jittered, and if
> that's the case, most samples wouldn't be at pixel edges and thus difficult
> to share. (I have to admit, though, that I can think of variations where
> samples can be jittered *and* shared between pixels. However, I don't know
> exactly what POV-Ray is doing.)
> 
Acording to the documentation, there is a saving and reuse between adjacent 
pixels and subpixels:
"The advantage of this method is the reduced number of rays that have to be 
traced. Samples that are common among adjacent pixels and sub-pixels are stored 
and reused to avoid re-tracing of rays. The recursive character of this method 
makes the super-sampling concentrate on those parts of the pixel that are more 
likely to need super-sampling."

According to this, the first pixel traced takes 4 times as long (the 4 corners 
need to be evaluated). Those of the first line and column take twice as long 
(two corners have already been evaluated and saved), but the rest only take the 
same amount of time as non-antialiased if the differences are under the treshold 
value (3 of the corners comes from the previous line and the preceding pixel of 
the current line).

-- 
Alain
-------------------------------------------------
WARNING: The consumption of alcohol may make you think you are whispering when 
you are not.


Post a reply to this message

From: John VanSickle
Subject: Re: +am2 performance question
Date: 28 May 2008 07:26:27
Message: <483d4163@news.povray.org>
Warp wrote:
> John VanSickle <evi### [at] hotmailcom> wrote:
>>> (I have to admit, though, that I can think of variations where
>>> samples can be jittered *and* shared between pixels. However, I don't know
>>> exactly what POV-Ray is doing.)
> 
>> I don't see a problem with jittering a shared sample.  Samples can be 
>> assigned to a particular place in the pixel, and this assignment used to 
>> determine any sharing between pixels (or sub-pixels, since this is 
>> adaptive); when the sample is actually traced, it can be jittered at 
>> that time.
> 
>   Which is what I said. :)
> 
>   Maybe if POV-Ray doesn't currently share antialiasing samples between
> pixel someone could take a look how difficult it would be to make a patch
> to do exactly that.

 From the docs:  "Samples that are common among adjacent pixels and 
sub-pixels are stored and reused to avoid re-tracing of rays."

Regards,
John


Post a reply to this message

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