Chaos Corona Forum

Chaos Corona for Cinema 4D => [C4D] General Discussion => Topic started by: fla on 2018-02-08, 15:16:31

Title: Z-depth & glass
Post by: fla on 2018-02-08, 15:16:31
Hey guys!

I'm doing some test renderings and preparations for final rendering of arch viz.
I'm planning to do DOF in post aftereffects by rendering a Z-depth pass.

So I'm having some trouble with setting up Z-depth so the black&white gradient would continue going inside the building and not stopping where the glass is.
I know I can re-render only the Z-depth map with the glass elements turned off, but I prefer doing it in one pass.

Is there a setting I'm missing?

Thanks,
matej
Title: Re: Z-depth & glass
Post by: TomG on 2018-02-08, 16:51:25
You can turn off the glass object's visibility in masks in the glass material (see attached). Notes

- It will exclude the object from all masks, not just the Z-Depth (but not from render passes like Reflection etc.)
- Refractions will not be calculated for the Z-Depth (perfectly fine for windows and anything with Thin enabled)

Title: Re: Z-depth & glass
Post by: fla on 2018-02-08, 18:02:21
Thank you @TomG !
Title: Re: Z-depth & glass
Post by: Marvey on 2018-02-08, 19:08:20
i had the same question few months ago for a work i was doing, didn“t knew about that, nice, thanks!!
Title: Re: Z-depth & glass
Post by: TomG on 2018-02-08, 19:14:06
Most welcome!
Title: Re: Z-depth & glass
Post by: LC3D on 2018-05-27, 13:11:15
Is there a way to have the zdepth render "see through" the glass and still maintain the glass as a channel in the CMasking Masks?
such that i can control DOF in post for an animation?
Title: Re: Z-depth & glass
Post by: fabio81 on 2021-03-09, 17:04:41
can you? there's a way?
Title: Re: Z-depth & glass
Post by: edub on 2021-03-13, 05:50:35
there used to be a way:
https://forum.corona-renderer.com/index.php?topic=32251.0