POV-Ray : Newsgroups : povray.binaries.images : Stochastic render rig focal blur FIXED : Stochastic render rig focal blur FIXED Server Time
1 Aug 2024 10:12:41 EDT (-0400)
  Stochastic render rig focal blur FIXED  
From: Edouard Poor
Date: 21 Aug 2008 06:55:01
Message: <web.48ad486a8ff8017fdbf7248f0@news.povray.org>
I'd had a version of depth of field blur in my stochastic render rig for some
time, but there was something not quite right with it.

After some time, and reading Paul Bourke's website
(http://local.wasp.uwa.edu.au/~pbourke/modelling_rendering/povcameras/ and
http://local.wasp.uwa.edu.au/~pbourke/projection/stereorender/ helped the most)
I realised that I had made the classic blunder, and was moving the camera to
achieve focal blur, which gave me a focal point, and not a focal plane.

The correct solution, as Paul and others have pointed out, is to use a shear
operation (which POV-Ray supports via a transform { matrix <...> } line in the
camera { ... } declaration.

If you are looking down the z axis, then all you need is

camera {
    transform { matrix <1, 0, 0,  0, 1, 0,   rx, ry, 1,   0, 0, 0> }
    ...
}

where rx and ry are the amount of shearing that occurs, and therefore the amount
of depth of field blur.

If you are not looking along the z axis, then you need to transform the camera
so it is along the z axis, do the shear, then transform it back.

The results are exactly what I was after to start with, but had gotten wrong - a
nice clear focal plane, passing through the look_at point, and parallel to the
image plane.

Cheers,
Edouard.


Post a reply to this message


Attachments:
Download 'dof-shear-fixed.jpg' (153 KB)

Preview of image 'dof-shear-fixed.jpg'
dof-shear-fixed.jpg


 

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