[Bf-committers] Multisample Z-buffer

Joe Eagar joeedh at gmail.com
Sun Jan 21 00:12:06 CET 2007


Reuben Martin wrote:
> I asked this question in the forums, without getting much of a response, so I 
> thought I would ask it here.
>
> We all know that you can't anti-alias some of the render output, most noteably 
> the z-buffer.
>
> Right now the trick is to have the Z-combine node do the anti-aliasing for us. 
> In the documentation Ton writes: "Note that Z values are still aliased, only 
> 1 sample per pixel for Z is delivered to the compositor, so the masks can 
> have small artifacts."
>
> My question is this: would it be possible to add a rendering option so that 
> elements such as the z-buffer are rendered at a higher resolution in order to 
> provide more than 1 sample per pixel? For instace you could have an option to 
> render these elements at a scale factor of 2, 3, 4.... and get 4, 9 ,16... 
> z-buffer samples per pixel respectively. My thinking is that maybe this would 
> result in less artifacts and more precision. (Which would be especially 
> helpful when doing DOF in post) Is this thinking correct?
>
>
>   
The problem here is that AA isn't just rendering pixels of an image 
5,8,11,6 times bigger then resampling down; you actually render each 
pixel offset by a jitter value.  Really simple down sampling doesn't 
work nearly as well, especially on near-vertical lines.

Another solution is to accumulate an AA-afied zbuffer in a new pass as 
vlaks are rendered.  This would work much better then the 
antialias_tagbuf function we're using now, which doesn't really work 
good enough.  Still, I'm not sure this is the answer; the best method, 
imho, would likely be to write a better anti aliasing function that 
could AA the resulting mask from zcombine.  Such a function could also 
be used for matte nodes.

Joe



More information about the Bf-committers mailing list