POV-Ray : Newsgroups : povray.unofficial.patches : focal_blur post_process request : Re: focal_blur post_process request Server Time
6 Oct 2024 13:15:14 EDT (-0400)
  Re: focal_blur post_process request  
From: Nathan Kopp
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

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