[Bf-committers] DOF with skewed z-buffer
reuben.m at gmail.com
Fri May 12 18:39:36 CEST 2006
On 5/12/06, Ton Roosendaal <ton at blender.org> wrote:
> > Well, I'm not thinking about anything that's a spot-on accurate
> > representation of the real world physics, just an approximation of the
> > effect. Currently in blender most of the depth-of-field is done in
> > post by using the zbuffer to determin what parts of the picture get
> > blurred and how much. It's not technically correct at all, but it's
> > convincing enough to pass as a depth of field for animation work.
> > My thinking was that if you could tilt the z axis used in calculating
> > the zbuffer, the resulting depth of field simulation would have it's
> > focus plan tilted as well.
> The current renderer stores Z values as the actual (blender unit)
> distance from the camera. Using the pixel (x,y) coordinate and this Z
> value you can already do quite some tricks, also for 'tilted' blur
That's a good idea. I could probably just use values from an x,y
gradient to modify the z-buffer values. That way I could quickly
change the "tilt" direction by changing the direction of the gradient,
and also have nonlinear interpolation in the gradients.
> Best result you still get by separating a render in a couple of layers,
> especially to render foreground and background separately. Blurrring
> these layers each first, and then combining it gives quite satisfying
More information about the Bf-committers