question

Sabine Füreder avatar image
Sabine Füreder asked ·

How do I get a correct z-depth pass using cutout opacity in the standard surface shader?

When I use a standard surface shader with a matte plugged into cutout opacity, I get a z-depth pass where that opacity is ignored. Therefore the z-depth pass is not usable for post DOF as the areas behind the object will not be blurred. Is it possible to get a correct z-depth pass with cutout opacity? Or does anybody know a workaround for that?

aovdisplacementstandard surfaceopacityz-depth
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Dade Orgeron avatar image
Dade Orgeron answered ·

As far as I know, the z-depth AOV only considers geometry attributes and not material attributes. So unfortunately opacity won't carry over.

Depending on how complicated your scene is, you could try setting up multiple Takes (foreground, mid-ground, background) and composite them all back together again in your preferred compositor. You could rebuild a complete z-depth pass by compositing the z-depth AOVs of each separate Take by using the alphas of the beauty passes (or custom masks... whichever you prefer) to cut each z-depth layer out.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Bhuwan Sharma avatar image
Bhuwan Sharma answered ·

@Sabine Füreder You can go with Deep exr workflow or create a sampler info node and connect point camera to a surface shader's color input and you get the camera info

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.