Difference of two Z-depth Water Depth Falloff

Hi all,

I found, somewhere, a small tidbit of information I wish I had found years earlier on creating fake volumetric mist. The method was to use the difference of the Z-depth of a scene without an arbitrary height control plane, and a scene with the control plane. I was able to replicate this in the compositor using render layers, and it came out to be a 360 degree renderable effect for large water scenes (think, Riven in 1997).



Excuse the sky colors on the third image, its a result of bad linear workflow and an overlay node…

The refractive effect of the water is also compositor based (thanks to a displace node).

I’d upload the blend, but it’s fairly large so here’s the node setup which should suffice.

The first render layer is the scene sans water. The second render layer is the scene with the water (with a shadeless mat to increase render time). The mask is then used to mix an RGB color of choice onto the first render layer, and a third render layer, containing only the reflective water (it casts no shadows and is not transparent, which is important) is overlayed onto the scene.

Cheers,
John

Really cool technique. Thanks for sharing

Awesome. Thx ZapperJet

I added a series of catwalks to test objects with the effect. What I learned is that because the Z-buffer doesn’t include alphas, you have to separate objects with alphas to another render layer and use Z-masking to let the water plane render under the catwalk. Confusing yes, but after that its simply about setting objects that don’t intersect the water onto another render layer, and keep objects that do in the first layer.

I’m thinking that in reality water might receive shadows which I have not done here. Yet more nodes to correct that…

Cheers,
John

Zdepth? Indeed the second render is impressive. Its from the top. Convincing !

Interesting technique and nice results!

Actually, I came up with another method for combining the water with transparent objects that does not require separating their layers.

Here is a blend with the process. Pay close attention to the render layers used and their masking properties.
https://sites.google.com/site/zapperstempuploads/water_depth_example.blend?attredirects=0&d=1

Cheers,
John

You’ve definitely got the Riven look dude!

Wow, cool… it gives a real nice depth effect.