f
f
Global SectionArticlesBookstoreDictionaryDownloadsDVDsEventsForumsGalleryJob ListingsNewsNewslettersSchools
 Advanced Search
USER: PASS:  Login  Register

Subscribe
Site Links
Home > Maya > List Servers > Maya General > Web Interface Change background colorChange background colorChange background colorChange background color
Z pass
Login to add a Bookmark Reply to this post


ID: 86831 (copy to link to this post directly)
Thread: 86831
Owner: ANTOKO@terra.es
Date: 2008-07-04 09:00:43

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

 
Login to add a Bookmark Reply to this post


ID: 86834 (copy to link to this post directly)
Thread: 86831
Owner: Chris Mills
Date: 2008-07-04 22:05:39

Subject: Re: Z pass

I prefer a home-baked solution using a distance between node driving a
ramp through a setRange to control the luminance of a surfaceShader or
Lambert - all applied as a layer shaderGroup.

Let me know if you need a more precise recipe.

Chris

Lizard Lounge Graphics, LTD.
Wellington, NZ
http://lizardlounge.com

HF & VHF: ZL4CDM
Int'l: +644-977-5400 / +642-174-8770
NZ local: 04-977-5400 / 021-748-770



wrote:
> 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

 
Login to add a Bookmark Reply to this post


ID: 86835 (copy to link to this post directly)
Thread: 86831
Owner: Steve Davy
Date: 2008-07-05 12:17:34

Subject: 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

- Show quoted text -


 
Login to add a Bookmark Reply to this post


ID: 86836 (copy to link to this post directly)
Thread: 86831
Owner: Matt Estela
Date: 2008-07-05 20:35:04

Subject: Re: Z pass

In addition to Steve's tips, the plugin you use for creating your
depth-of-field is pretty important. The lens blur in AE doesn't really
cut it for cg, creating awful edges. Frischluft lenscare on the other
hand looks amazing:

http://www.frischluft.com/lenscare/lenscare.php

- Show quoted text -


 
Login to add a Bookmark Reply to this post


ID: 86839 (copy to link to this post directly)
Thread: 86831
Owner: Deke Kincaid
Date: 2008-07-06 16:22:48

Subject: Re: Z pass

Just render objects in separate layers and blur/defocus them
accordingly (luma key to create a matte for the highlights so you can
make them bloom/shine or use the specular pass). If it is an
environment with lots of depth then just use a gradient in the post
package.

DOF is so subjective to the person's feel of how they want it to look.
Unless your looking to do an extremely shallow DOF where a person's
eye is in focus but nose and ear are not, then I wouldn't bother with
a Zpass.

-deke

- Show quoted text -


 
Login to add a Bookmark Reply to this post


ID: 86840 (copy to link to this post directly)
Thread: 86831
Owner: Steve Davy
Date: 2008-07-06 18:46:55

Subject: RE: Z pass

Yep, I forgot to mention that and indeed I would also recommend Lenscare from Frischluft. It's a great plug-in, and very easy to animate.

- Show quoted text -


 
Login to add a Bookmark Reply to this post


ID: 86845 (copy to link to this post directly)
Thread: 86831
Owner: Steve Davy
Date: 2008-07-07 12:56:59

Subject: RE: Z pass

And, as a final note, of you render out 16-bit images and are comping in After Effects you need to enable 16-bit in the project settings.

AE will still let you bring in 16-bit images with the project set to 8-bit, strangely, but I assume without the project set correctly some sort of clamping occurs....

- Show quoted text -


 
Login to add a Bookmark Reply to this post


ID: 86860 (copy to link to this post directly)
Thread: 86831
Owner: ANTOKO@terra.es
Date: 2008-07-08 08:32:09

Subject: RE: Z pass

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

- Show quoted text -


 
Login to add a Bookmark Reply to this post


ID: 86864 (copy to link to this post directly)
Thread: 86831
Owner: Deke Kincaid
Date: 2008-07-08 07:19:03

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

- Show quoted text -


 
Login to add a Bookmark Reply to this post


ID: 86865 (copy to link to this post directly)
Thread: 86831
Owner: Steve Davy
Date: 2008-07-08 10:54:51

Subject: RE: Z pass

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.

> Date: Tue, 8 Jul 2008 07:19:03 -0700

- Show quoted text -


 

Sponsors

Sponsor
Digimation Model Archive

Contact Us | Advertise | Post Jobs | Post News | Post Events | Terms