Author Topic: It's time to talk about Depth Passes  (Read 12414 times)

0 Members and 1 Guest are viewing this topic.

Offline justindustrial

It's time to talk about Depth Passes
« on: December 11, 2013, 08:33:16 am »
This is a new feature in KS that I am happy to see, however there is literally no documentation of it in the manual, nothing in the tutorials section, and nothing in quick tips.

In fact, the only time I've seen it mentioned was in December's webinar, which is not yet available online.

I have had the chance to experiment with the depth pass option, however the outputs have been undesirable, with minimal (and I mean barely detectable) variations in depth, especially in those macro shots where having a depth pass is most important.

My question then, is how to leverage the depth pass feature, how to manage depth contrast in the output EXRs, and how to make depth passes WORK.



Offline Speedster

Re: It's time to talk about Depth Passes
« Reply #1 on: December 11, 2013, 08:45:55 am »
And perhaps even more important- what the heck IS a Depth Pass, and why?  For the "CG Dummies" among us!
Bill G

Offline justindustrial

Re: It's time to talk about Depth Passes
« Reply #2 on: December 11, 2013, 08:55:21 am »

The depth pass outputs a separate image containing only monochromatic information about how far away an object is from the camera. Objects that are close will be shaded lighter, and as the distance increases the objects get darker. There's a tutorial for Maya / Photoshop here:

that will explain in more detail. It is a useful tool for getting Depth of Field without waiting days for KS to render.


Online DriesV

  • Administrator
  • Hero Member
  • *****
  • Posts: 2477
  • Total likes: 4
  • Product Specialist at Luxion
Re: It's time to talk about Depth Passes
« Reply #3 on: December 11, 2013, 10:10:22 am »
For Photoshop:
Depth pass is output as EXR. You need to lower the exposure to get the desired white-gray-black falloff. This will yield a usable depth pass for simulated DOF.
Then you need to put the depth pass on a alpha channel or use it as on opacity layer on your render. Both options will give you the ability to apply a Lens blur filter. In the Lens blur window you can pick any point in your image that will be in focus.

That being said, pretty much always I still prefer realtime rendering with DOF enabled in KeyShot (somehow advanced rendering with DOF is really slow...). For me using a depth pass for DOF often gives undesirable results, especially on object contours with high 'distance contrast' (e.g. a car in the front against a building in the distance...) and with reflections/refractions (e.g. a mirror reflection being out of focus, when it really should be in focus...). Depth passes work best for non-macro shots with mild DOF.
These contour/edge issues are inherent to flat depth passes. Deep image compositing provides an elegant solutions for this (among many other things!). It seems to have become the standard in high-end entertainment.

« Last Edit: December 11, 2013, 10:46:56 am by DriesV »

Offline Chad Holton

Re: It's time to talk about Depth Passes
« Reply #4 on: December 11, 2013, 12:25:10 pm »
Here's a diamond ring VR I did using the depth pass:
I wanted the area closest to the camera to stay in focus.

Used the depth pass straight out of KeyShot and composited with Blender. What I like about using the depth pass, other than it speeding up render times, is that you can render the image along with a depth pass, apply DOF how you want and still have the original rendering in case you need to change up the DOF later or not use it at all (no need to re-render if you don't want DOF or whatever). This probably isn't a big deal with a single image but with animation, it could save you a huge amount of rendering time. You can even use the depth pass to fade the DOF in and out for animations, among other things.

I'd say the reason it's not mentioned much (in the manual and such) is that it's used with compositing software. Since there are multiple compositing softwares, they will have their own tutorials on how to use it. YouTube comes in handy here.  ;)

Offline eddiemg

Re: It's time to talk about Depth Passes
« Reply #5 on: December 20, 2013, 02:43:24 pm »
I've done a lot of tinkering on the KS depth pass.

As some people have said, KS outputs an EXR with an unusable exposure. You have to adjust the exposure manually in Photoshop or Aftereffects in order to start seeing your grays. Then the EXR will be usable. However, you must use a background object in KS as opposed to the natural environment, or else KS inverts the background to the foreground and give you strange edges. I notified them about this issue, and they said they will work on it for future versions. The only work around is to use a background object like a sweep or plane to let KS register that object as part of the depth map.

The quality of your blur filter/plug-in has a pretty big impact on the quality of your DOF effect. In After Effects, the native blur plug-ins will NOT do a good job. I switched to Frischluft Lenscare, $200, and the blur improved DRAMATICALLY: I got great edges and a great looking DOF in both Macro and Micro views.

So if you combine Keyshot --with a background sweep object -- manual exposure adjust in your composite software, and a high quality blur filter, you can get pretty great results.

« Last Edit: December 20, 2013, 02:49:30 pm by eddiemg »