[Bf-committers] Re: DOF camera parameters.

GSR - FR bf-committers@blender.org
Thu, 10 Jun 2004 18:15:16 +0200

matt@mke3.net (2004-06-10 at 2158.43 +1000):
> This would be great for a filtered approach - in my experience in using 
> post filters on the Z depth for DOF, they often have the typical, 
> cheap-CG 'gaussian blur' feel, which looks horribly fake with muddy, 
> blurred out highlights (no bokeh effect - 
> http://homepages.ihug.com.au/~parsog/Guy/bokeh.html ).

Think what would you get from gaussian blur of a clipped version:

  *  ** <- "White" and 1, anything bigger goes here
  |  || <- [1]
  |* ||
  ||*|| <- "Black" and 0, anything smaller goes here

Or from a non clipped version:

     *  <- Sample above "white"
  *  |* <- "White"
  |  ||
  |* ||
  ||||| <- "Black"
  ----- <- True zero

The paper you posted is about handling the clipping after it has been
done, thus faking "values over 1" support (white will be [1], and
things above it will be bigger than 1):

"In the last image the conversion between sRGB and linear is through
the to_byte_compressed function as described in the paper. This makes
the brighter values in the file turn into values greater than 1 (and
thus they blur out into bright circles)."

If blender provided the unclipped data, plain gaussian should work, no
need of fix afterwards. Of course, that algorithm is nice when you can
not get the info. But using it, just cos the data have been happily
chopped, is a bit suboptimal.

BTW, someone pointed me to an ATI doc about doing zblur with better
results than previous methods, for example avoiding unwanted bleeding.