I’m trying to get two z depth pass images of two different cloud objects, to combine them in the compositor, because there is no other way to mix two volumetric material domains.(or is there a way to render them correctly, without fancy domainoverlapping black holes?)
My problem is, I only get the z pass of the cloud domain and not of the actual volume in it. I also tried something with the Mist pass, but then I’ll get a image without depth, so the volumetric object shape is completely grey.
The z-buffer does not account for transparency, it assumes all objects are opaque, so what you get is the domain wall. You can’t actually store volumetric data unless you’re using a deep image format (which Blender current doesn’t support). You have two possible options of what you can store. You can either show the absolute distance to any geometry for that pixel, which the z-pass does, or you can show the average coverage*distance of the cloud, which the mist pass does.
I’m not entirely sure what you mean by “then i’ll get an image without depth”?
with the “image without depth” I mean that the Mist pass just gave me a silhouette of my volumetric obj in a single grey color. So there are no color variations between the pixels, wich I could use for calculating depth. It simply looks like a mask.
So is there a solution for using two cloud domains in one scene, while the domains are interleaved?
Ah, ok. That what’s I thought you meant. That isn’t possible with a 2D pass, because it only stores one value per pixel. It has no choice but to store a mask. As far as interleaving volumes in post, that requires something called deep compositing:
This is actually one of the common example cases when extolling the virtues of deep compositing. You can google it for lots more info, if you want.
When you are combining a volume with a solid object, you’d usually render a holdout mask to get around the interleaving issues. As far as I can tell, you can’t render volume holdouts with BI. (setting the domain transparency to mask or putting it on a mask layer doesn’t work). So for 2 volumes, you need to either render them together or live with one being completely over the other one.