POV-Ray : Newsgroups : povray.general : Re: additional focal blur related option in camera Server Time
31 Oct 2024 08:19:00 EDT (-0400)
  Re: additional focal blur related option in camera (Message 1 to 3 of 3)  
From: Thorsten Froehlich
Subject: Re: additional focal blur related option in camera
Date: 26 Nov 2005 13:25:41
Message: <4388a8a5$1@news.povray.org>
Raf256 wrote:
>> would end up not taking samples, which would unbalance the distribution
>> as a whole. This in turn would create some strong but unpredictable
>> (probably appearing randomly and visual as noise) bias in the samples.
>> Obviously this would make things a lot worse.
> 
> Concider checker plane y,0 with too small scale, it is very very aliased,
> and if we are unlucky then in example first 4 rays could gave identical
> result quickly fooling statistical function.

You don't fix aliasing by taking *fewer* samples, but by taking *more* 
samples.  If you are having problems with too few samples being taken, you 
have poor settings for the focal blur variance.  Taking fewer samples will 
certainly *not* improve the result.

	Thorsten


Post a reply to this message

From: Raf256
Subject: Re: additional focal blur related option in camera
Date: 26 Nov 2005 15:05:58
Message: <eorm53-a5r.ln1@raf256.com>
Thorsten Froehlich <4388a8a5$1@news.povray.org> Saturday 26 of November 2005
19:25

> You don't fix aliasing by taking *fewer* samples, but by taking *more*
> samples.  If you are having problems with too few samples being taken, you
> have poor settings for the focal blur variance.  Taking fewer samples will
> certainly *not* improve the result.

My idea was to force blur to trace at least in example 5 first rays per
pixel, even if they are identical to eachother and even if otherwise they
will be bellow threshold,

one liner:

--- megapov-1.2.1/source/render.cpp     2005-08-23 21:20:33.000000000 +0200
+++ megapov-1.2.1+rmaj/source/render.cpp        2005-11-26
16:29:12.000000000 +0100
@@ -3119,7 +3119,8 @@
     if ((V1[pRED]  < Sample_Threshold[nr-1]) && (V1[pGREEN]  <
Sample_Threshold[nr-1]) &&
         (V1[pBLUE] < Sample_Threshold[nr-1]) && (V1[pTRANSM] <
Sample_Threshold[nr-1]))
     {
-      break;
+      if (nr > Frame.Camera->Blur_Samples / 4) // raf256
+                               break;
     }
   }


of course it is better to just set Sample_Threshold for min_sample first
value to 0

So the idea is to bump up minimal rays traced without affecting rest of
adaptive system... 

I will do some testes after weekend probably



-- 


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: additional focal blur related option in camera
Date: 26 Nov 2005 16:46:58
Message: <4388d7d2@news.povray.org>
Raf256 wrote:
  > My idea was to force blur to trace at least in example 5 first rays per
> pixel, even if they are identical to eachother and even if otherwise they
> will be bellow threshold,

Actually, POV-Ray takes at least seven samples if "blur_samples" is at least 
seven...

> +      if (nr > Frame.Camera->Blur_Samples / 4) // raf256

This logic is clearly broken. It certainly does not force at least five 
samples to be taken.  The division actually has no useful effect at all.

> of course it is better to just set Sample_Threshold for min_sample first
> value to 0
> 
> So the idea is to bump up minimal rays traced without affecting rest of
> adaptive system... 

As I have been telling you, and as your change shows (well, would show if it 
was coded correctly*), you are not understanding the way the sampling and 
the threshold works at all. Your change would successfully disable the 
statistical sampling method altogether.

The only time when the focal blur sampling will produce aliasing is when 
dealing with some unfortunate sub-pixel-size scene details.  And *only* 
then.  It will not fail for a checker pattern if configured correctly (or 
using the defaults).  If nothing else, chess2.pov is a perfect example of 
focal blur handing checker patterns correctly.

As such, I repeat my strong recommendation to first familiarise yourself 
with the focal blur settings the SDL provides.  They are certainly 
sufficient for 99.9% of cases. And with POV-Ray 3.7 you will be able to use 
AA with focal blur to render the other 0.1% of cases as well.

	Thorsten

* It is also done at the wrong place, it should have been in the for-loop 
further up in the function and been "|| (nr < 5)".


Post a reply to this message

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