TurbulenceFD Depth Pass

September 03rd 2014 08:00:59am

UPDATE: 4/17/2020 – Adjusted code to grab active camera. Works with C4D R14 – R20 (not tested on R21, but should work)

Creating a depth pass for a smoke simulation should be a simple task you might think. In most cases with professional softwares it can be, but not all softwares support this feature. In this particular case it is the Fire and Smoke simulation plugin TurbulenceFD(TFD). I am a huge fan of this plugin and have been able to get some really great results from it. You can see some of those experiments over on my Vimeo channel.

Recently I was creating some stock footage of smoke plumes for in-house use and had the need for a depth pass as well. Remembering back to an old post on the Jawset forums I made asking about TFD depth passes and being told it wasn’t available, I set out to find a work around. The science behind why a true depth pass cannot be created for volumes makes sense to me, but it would be nice to at least get something for the base fluid object as if it was a solid form. Most of the issues pertain to transparency.

To overcome this limitation you need to use Deep outputs. What is Deep? Basically it’s kind of like a Z-Depth pass, but on steroids. Deep images carry information slices on the Z axis of everything in your scene. Kinda like a massive
Photoshop layered file. Each layer being a slice of depth data for your scene. It’s combined into one huge file though.

Essentially the limitation is on C4D’s end I believe (no facts to back that up), because it cannot export Deep Pass files. There is a nice visual explanation of Deep Opacity maps here. So I needed to find another way to cheat it. I started messing around with placing my smoke in fog volumes, messed with custom proximity shaders, and then one day simply tried an area light. I know, it sounds so obvious now in hindsight. This is what happens when you work on multiple things simultaneously for long periods of time, your mind goes down rabbit holes and gets stuck on a path sometimes. So after fiddling about with the area light, I was starting to get some results.

Shortly there after I was starting on a Python script to help make it a one click application.

Checkout more:
Null Swapper After Effects Script
Fix Broken X-Particles Cache
Free Function Friday Ep.6 – collectAllPrecomps
After Effects ExtendScript Training: Ep. 19 Part 1
Houdini Mardini Wave