Author Topic: Depth Pass issues  (Read 971 times)

0 Members and 1 Guest are viewing this topic.

Offline Pizushi

  • Newbie
  • *
  • Posts: 2
Depth Pass issues
« on: August 01, 2018, 06:15:31 am »
Hey guys!

I'm working on a project that requires me to render a material. To do so I need all passes. But I have some problems with depth pass. It should be on the black background and my model should be whited out. When the depth pass saves it saves an image with completely white background and white model on it, so I can see my model only when I change the exposure in Photoshop.
It should be the same as in the third attachment.

Thanks in advance for your help.

Offline mattjgerard

  • Hero Member
  • *****
  • Posts: 1448
Re: Depth Pass issues
« Reply #1 on: August 01, 2018, 06:40:07 am »
Depth passes took me a while to understand how to use. I'm not sure what you mean when you say you need to render a material, that's what keyshot does, it renders materials wrapped around 3D objects. If you mean you need to export a flat version of your material, then a depth pass won't do much for you. The depth pass describes the distance of objects and points in the scene in relation to the camera using a 32 bit floating greyscale image. This 32 bit image won't display properly as we would expect, so you will need to use the advice from Dries that steered me in the right direction-

"The depth pass is not actually an image. It is a floating point EXR file in which each pixel's "color" defines the distance to the camera.

The easiest way to convert this into a usable state for Photoshop is to do:
Image > Adjustments > HDR Toning > Method: Equalize Histogram

Dries"

This will get you a visible greyscale image that you can use with various filters in PS to add depth of field based blurs.

Hope that helps. here are a couple  of  other links to read about depth passes-

https://www.keyshot.com/forum/index.php?topic=7174.msg34752#msg34752

https://www.keyshot.com/forum/index.php?topic=15450.msg75018#msg75018

Offline Pizushi

  • Newbie
  • *
  • Posts: 2
Re: Depth Pass issues
« Reply #2 on: August 01, 2018, 08:20:02 am »
Depth passes took me a while to understand how to use. I'm not sure what you mean when you say you need to render a material, that's what keyshot does, it renders materials wrapped around 3D objects. If you mean you need to export a flat version of your material, then a depth pass won't do much for you. The depth pass describes the distance of objects and points in the scene in relation to the camera using a 32 bit floating greyscale image. This 32 bit image won't display properly as we would expect, so you will need to use the advice from Dries that steered me in the right direction-

"The depth pass is not actually an image. It is a floating point EXR file in which each pixel's "color" defines the distance to the camera.

The easiest way to convert this into a usable state for Photoshop is to do:
Image > Adjustments > HDR Toning > Method: Equalize Histogram

Dries"

This will get you a visible greyscale image that you can use with various filters in PS to add depth of field based blurs.

Hope that helps. here are a couple  of  other links to read about depth passes-

https://www.keyshot.com/forum/index.php?topic=7174.msg34752#msg34752

https://www.keyshot.com/forum/index.php?topic=15450.msg75018#msg75018

I need depth pass to highlight the material(attachment 1). But the problem is to make a depth pass with black background and whited out model(attachment 2). When I save a depth it has completely white background and white model(attachment 3). Is there any way render a model with its depth in a such way that it will have black background and white model?

Offline mattjgerard

  • Hero Member
  • *****
  • Posts: 1448
Re: Depth Pass issues
« Reply #3 on: August 01, 2018, 08:54:48 am »
A depth pass won't give you a completly black and white image,  it is a greyscale gradient based on how far away the object is from the camera. A depth pass isn't traditionally used to highlight areas of a material, as it doesn't read any attributes of the material itself, it is only concerned with the geometry. Passes like specular, lighting, etc will provide infromation about the material and how it is interacting with light.

You need to run Image > Adjustments > HDR Toning > Method: Equalize Histogram to be able to see what the depth pass is doing.

Looking at the "Ready Material 1.png" image you posted, it looks like you are asking for an image mask of some sort, and this can be done in a number of ways. The "Include alpha" checkbox in the render output settings will give you transparency that will seperate your geometry from the background. You can also create a black and white mask from the clown layer with a little work.

So, to answer your question, no there is not a way to get the depth pass to render out a black background and white forground like your attachment. But depending on what you are trying to accomplish in the end, there is probably a way to achieve what you need to. Just need to understand a little more about what your end goal is with that layer. Please take a look at the links and this youtube quick tip-