Anti-aliasing basically blurs edge pixels slightly. But if you blur the edge pixels in a depth pass, it means you get intermediate shades of gray between foreground and background objects. This obviously distorts the correct depth that will be read from these pixels, and this contributes to the nasty jaggies you often see in depth of field around the edges of objects, especially where the FG object is significantly nearer the cam than the BG object...
I've never FULLY understood this myself though, since if the RGB is anti aliased then the depth still doesn't match correctly even if it's not antialiased.
Perhaps this is just the best that can be done with current techniques.
> From:
> To:
> Subject: Re: Z pass
>
> 8 bit zpass only has 256 levels of grey which bands pretty fast. So
> you want to create 16 or 32 bit one. If your using the built in zpass
> that the renderer creates then it is float by nature though it is
> numerical data not raster. It is just a byproduct of the renderer
> which is why it is aliased because it is distance from camera numbers
> which represents where in space an object is.
>
> -deke
>
> On Mon, Jul 7, 2008 at 23:32, wrote:
> > It seems reasonable, but i wonder where does the advantage of applying
> > a non antialiased z pass to an antialiased RGB?
> >
> > And why do you use a 16 bit image? Sorry, pretty newbie on this ;))
> >
> > ----Mensaje original----
> > De:
> > Recibido: 05/07/2008 21:17
> > Para: > > Asunto: RE: Z pass
> >
> > Yes, many tutorials and many schools of thought! There are some purist
> > compers out there who sniff at using a grayscale depth pass (saying
> > it's not "real" depth), then people like me who do it all the time and
> > are happy with the results. To some extent the post package you use
> > influences how you do it as well. It would be helpful to know how
> > you're generating your Z pass and DOF, but here goes.
> >
> > I never use Maya's Z-depth channel as it's a pain in the butt to work
> > with and extract etc. There are several other ways to create a
> > grayscale depth pass including using a depth shader or environment fog.
> >
> > I generally prefer to use a depth shader in Mental Ray. The most
> > important thing to remember is that you need to use a 16-bit file
> > format, which greatly increases the number of gray values in your image
> > (the source of some depth problems using 8-bit images). My personal
> > preference is to use uncompressed TIFs, with the framebuffer in MR set
> > to RGBA (Short) 4x16 Bit.
> >
> > I also render out the depth pass with samples set to 0 so there is no
> > antialiasing, and at double resolution, shrinking it back down in post.
> > This last step may be overkill in some situations but since depth
> > generally renders very quickly it can be worth it. If you are using
> > After Effects you'll have to resize the image sequence in a pre-comp
> > before having it read for depth info.
> >
> > All of these techniques generally seem to work pretty well, but if
> > anyone has anything to add I'm always on the lookout for better
> > solutions....
> >
> > HTH
> >
> >> Date: Fri, 4 Jul 2008 09:00:43 +0200
> >> From:
> >> To:
> >> Subject: Z pass
> >>
> >> Hi:
> >> I wonder how to create a decent DOF effect in postpro avoiding the
> > ugly edge effect produced by the antialiasing in the Zpass edges. What
> > would be the good way? rendering the RGB and Z passes without
> > antialiasing? Is there any tut on this?
> >>
> >> Thanks
> >>
> >> Antonio
> >> TERRA
> >>
> >> -->
> >>
> >>
> >>
> >> Looking for Maya jobs?:
http://www.highendcareers.com