Is there a trick to rendering a depth pass in a scene that contains a volume? I’d like to add some fog in comp, but as you can see from my minimalist demo, the Z values for the volume are all over the place. I enabled the Z output by checking “Shading Depth (Pz)” under the default /out/mantra_ipr > Image > Extra Image Planes tab.
Typically when we are dealing with volumes we would want to use deep data to have controls in post, you can also extract depth from deep render for volumes in nuke with deepexpression.
near and far variable are just userknobs for defining near and far value.
Thanks for the responses! It turns out that I was able to get what I expected from my depth map by manually setting-up the Pz output using the “Extra Image Planes” list instead of the “Shading Depth (Pz)” checkbox, setting Sample Filter to “Closest Surface” and “Pixel Filter” to “Object With Most Coverage (minimum Z value)”. However, as you alluded, the comp results are unsatisfactory, producing unusable fringing. C’est la vie, I thought I might be able to get away with it.
The lack of fog rendering in Mantra is pretty frustrating.
you can render fog. Add another volume. Or do you mean cheap depth cue fog? You can do that in a fog shader, but I don't know how well it plays with volumes.
I meant depth cue fog - I’d like to create some haze, ideally with some distance-based desaturation. I’ve seen throwaway references to fog shaders here and there, but haven’t figured out how to use them - can you point me to any resources?
As followup, for my purposes it's “good enough” to add a distance-based haze effect in the material for the ground plane - of course, this would be darned inconvenient if you had to do it for multiple materials …