Depth map

Any idea on how to render a scene to a depth map?

Comments

  • Yes! In the render panel, there's an advanced setting tab. Inside of that, there's a tab for Canvases. Check that on and you can add passes. One of the option is a depth pass. 

    I assume since you're asking about depth passes, you're familiar with working with 32-bit .exr or .hdr files. One oddity of the Iray render engine is that the passes come out massively overexposed. You'll need to adjust the exporure somewhere around -10 to -12 levels before you see anything. I start with an exposure layer which I use the black and white pickers to get close, then toss a levels layer on to make sure I'm using the whole range. Then I bring it down to 16-bits to use with photoshop's lens blur.

    One word of caution: the depth pass isn't anti-aliased and can create visible artifacts because of that, especially around things with a lot of variation in transparency, like hair. And, of course, transparency doesn't work, since Iray creates a depth map that treats transparent surfaces as opaque.

    Screen Shot 2018-02-21 at 12.29.28 PM.png
    540 x 308 - 56K
  • itsikwitsikw Posts: 42

    Thank you aararibel for your reply. It looks potentially very helpful. Though not familiar at all with either .exr or .hdr files, I will certainly experiment with this.

  • I'd like to add a thank you to aaráribel for posting that answer.  I was trying to use a depth map for a render yesterday to control the lens blur in Photoshop.  After trying a couple of times with what appeared to be a completely white image, I assumed that it was a bug in DS, gave up trying and faked it with a transparency map and gradient fill.  The information on overexposure is very helpful - enough so that I'm going to have a try with yesterday's render.  I can already see the difference that fixing the exposure does.

  • You're both welcome. I'm a huge fan of render passes. I recommend setting up a beauty pass, too, so you can have lots of control over your final render—32 bits per channel are so much better than 8!

  • rsharp_3144816rsharp_3144816 Posts: 99
    edited February 2018

    Deleted; solved issue.

    Post edited by rsharp_3144816 on
  • mindsongmindsong Posts: 1,693
    edited February 2018

    FWIW, I also believe you can use IRAY to generate depth passes that will still be aligned perfectly with 3DL renders that you might be post-processing. Just render and save your 3DL scene, swap renderers to IRAY, and follow the instructions above. Of course, moving the camera mucks up any chance of alignment, etc.

    There's also an AoA volume camera product for DS/3DL that can be used for this, and a render-passes toolbox (draagonstorm or zev0) that might have that function available for 3DL.

    cheers,

    --ms

    Post edited by mindsong on
  • Oso3DOso3D Posts: 14,888

    The big problem with 3dl and iray combinations is displacement, which doesn’t work the same in both engines.

     

  • mindsongmindsong Posts: 1,693
    Oso3D said:

    The big problem with 3dl and iray combinations is displacement, which doesn’t work the same in both engines.

    thanks for that subtlety (sp?). knowing that will likely save a good amount of confusion/frustration in certain cases!

    --ms

  • I can't understand this at alllll.

    " start with an exposure layer which I use the black and white pickers to get close, then toss a levels layer on to make sure I'm using the whole range. Then I bring it down to 16-bits to use with photoshop's lens blur."
     

    What does any of this mean????? How do you" toss on layers"... where? How? Not in DAZ, right? And what is the 16 bit thing?

    All I want to do is render a depth map but I cannot understand what anyone is saying :( I also just want to do a motion blur in photoshop and I was gonna use a depth map to do it.

    "I assumed that it was a bug in DS, gave up trying and faked it with a transparency map and gradient fill. "

    ...what? I don't understand this either... faked it where? In DAZ or in DS? How can you fake it with a transparency map? Can someone explain this to me as if you're explaining it to a newbie?

     

     

  • JonnyRayJonnyRay Posts: 1,744

    All of the work layering images generated using canvases is done post rendering in other tools like Photoshop or GIMP. If you want to take the plunge, I highly recommend @Sickleyield 's excellent Canvas System Tutorial - Daz Studio - Iray video as a starting off point.

  • itsikwitsikw Posts: 42

    I came back to the issue of depthmaps and tried the Iray canvases as aararibel suggested. After some tweaking with exposure and levels, I succeeded to derive the attached images. Both are renders of Genesis face. One is Depth canvas, and the other is Distance canvas. Both look rather similar. Can anybody explain to me what is the difference between these canvases?

    Distance.JPG
    502 x 500 - 19K
    Depth.JPG
    501 x 504 - 19K
  • prixatprixat Posts: 1,585

    The Depth map is more common in most 3d software, also known as z-depth. It's the distance of objects from the Z plane.

    The Distance map has the distances measured to a single point in the middle of the camera.

  • Hi all,

    I just wanted to share a utility that we will be releasing soon...
    Depth Map Maker renders a depth map (Z-Depth) using OpenGL (no Iray needed). It also includes the ability to create black-to-white, white-to-black and depth based on a specific object in you scene. It requires no Photoshop editing to fix the exposure and levels. As you can see in the example renders, it also renders anti-aliasing although it does not render opacity or displacement.

    In this example render, you can also see that it is much faster. This example was rendered on a PC with 2 x Nvidia 1080TI GPU cards.
     

    IrayDepthCanvas.jpg
    1000 x 1300 - 175K
    DepthMapMaker.jpg
    1000 x 1300 - 174K
  • Sven DullahSven Dullah Posts: 7,621
    edited September 2023

    Interesting! So how do you control the visibility distance? Is falloff linear or based on inversed square root? Adjustable? Can it render large environments? Any particular reason why I should not continue using RSL simple fog cameras that also render in seconds, including 3DLmotion blur, pixel filters, DoF, opacity etc?

    Post edited by Sven Dullah on
Sign In or Register to comment.