POV-Ray : Newsgroups : povray.unofficial.patches : focal_blur post_process request Server Time
6 Oct 2024 11:33:08 EDT (-0400)
  focal_blur post_process request (Message 11 to 16 of 16)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Nathan Kopp
Subject: Re: focal_blur post_process request
Date: 17 Jun 2001 13:28:50
Message: <3b2ce8d2@news.povray.org>
"Tony[B]" <ben### [at] catholicorg> wrote...
> Hi. I was wondering if for the next version of MegaPOV, someone could make
> the post-processed focal blur more like the real focal blur. You know,
where
> you can specify a point in 3D space you want it to consider the center and
> then blur out from there, not from the camera. Can it be done? Is it
already
> possible and I have to go hide my head in the sand out of embarrassment
from
> not having seen it before? Thanks in advance.

It's possible... but you have to do a little bit of (simple) math and live
with the fact that it is an estimate (based on an ad-hoc algorithm... not
really based on reality).

The following untested code should be close to what you want:

#declare CamLoc = <camera location goes here>;
#declare FocalPt = <focal point goes here>;
#declare Depth = <depth of focal range>;

#declare DistToCtr = vlength(CamLoc-FocalPt);
#declare DistToStart = DistToCtr - Depth/2;

global_settings{
post_process{
focal_blur{ DistToStart, Depth, 5, true }
}}

-Nathan


Post a reply to this message

From: Tony[B]
Subject: Re: focal_blur post_process request
Date: 17 Jun 2001 15:03:13
Message: <3b2cfef1$1@news.povray.org>
What about the rest of the parameters?


Post a reply to this message

From: Tony[B]
Subject: Re: focal_blur post_process request
Date: 17 Jun 2001 15:04:30
Message: <3b2cff3e@news.povray.org>
Thanks, Nathan. I'll be trying it out later.


Post a reply to this message

From: Warp
Subject: Re: focal_blur post_process request
Date: 17 Jun 2001 15:09:02
Message: <3b2d004e@news.povray.org>
Tony[B] <ben### [at] catholicorg> wrote:
: What about the rest of the parameters?

  focal_point? aperture? Should be clear.
  confidence? Doesn't seem to have any effect when variance=0 (or at least
I don't notice any difference).

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Ron Parker
Subject: Re: focal_blur post_process request
Date: 17 Jun 2001 23:16:27
Message: <slrn9iqski.2k1.ron.parker@fwi.com>
On 17 Jun 2001 15:09:02 -0400, Warp wrote:
>Tony[B] <ben### [at] catholicorg> wrote:
>: What about the rest of the parameters?
>
>  focal_point? aperture? Should be clear.
>  confidence? Doesn't seem to have any effect when variance=0 (or at least
>I don't notice any difference).

True.  Though setting variance to 0 might cause it to be slower than 
setting variance to a suitably low number and confidence suitably high; 
at least then POV can bail out when it actually attains that low variance 
and high confidence.  When variance is zero, you require it to use the
maximum number of samples for each pixel.

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions


Post a reply to this message

From: Warp
Subject: Re: focal_blur post_process request
Date: 18 Jun 2001 06:26:52
Message: <3b2dd76c@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote:
: True.  Though setting variance to 0 might cause it to be slower than 
: setting variance to a suitably low number and confidence suitably high; 
: at least then POV can bail out when it actually attains that low variance 
: and high confidence.  When variance is zero, you require it to use the
: maximum number of samples for each pixel.

  I have came to the conclusion that variance 0 is the only way of making
it work. For some reason if you set variance to anything higher than 0,
no matter how small, you'll get graininess. (Of course there might be some
exceptions with certain scenes, but that's what I have noticed with most
scenes.)

  It seems to be a "fact" that the human eye forgives more easily random
noise than sharp color transitions, and montecarlo sampling is (I think)
based mainly on this principle. However, random noise has always bothered
me and I have never liked it; I almost prefer the sharp color transitions.

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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