Announcement

Collapse
No announcement yet.

Zdepth Distance Autoguess

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Zdepth Distance Autoguess

    Maybe there is a better way to do this already, but currently for getting the zdepth min and max values, I'm creating a sphere and putting it around the camera. I increase the radius until I can start seeing objects and note the radius as zdepth min. Then do the same for zdepth max. This can be a little tedious for multiple shots or animation. And often I just forget to do it.

    It would be great if there were an "autoguess" feature similar to what we have for autoguessing the vertical tilt shift in the vrayphysical camera. One less thing to think about.

    In the meantime, is there a better/faster way than the sphere method?

  • #2
    How are you using the z-depth? If you write it out to an .exr file, in programs like Nuke you don't need to guess anything in advance since the full z-depth information is preserved and you can remap it to any range you want.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      Hi Vlado,

      Thanks for the quick response. We're using zdepth in Photoshop for DOF and atmosphere effects. We're in the process of switching from 16bit tiffs + Frischluft Lenscare to open exrs via exr-io + DOF Pro in order to take advantage of cryptomattes and since Lenscare seems no longer to be supported in new versions of Adobe.

      Strangely, DOF Pro requires the zdepth pass to be an 8bit bmp (it will accept no other file type). Is it possible to import the zdepth pass in Photoshop with all the floating point data and then remap the range as you suggested to do in Nuke? Does that require any different settings on the V-Ray side?

      Thanks!

      Comment


      • #4
        We usually have 3 zdepth passes as we also do our post work inside photoshop. So, for a basic exterior shot, we have 3 zdepth passes: ZDepth 50m, ZDepth 100m, and ZDepth 500m. These usually give us maximum flexibility. If we are dealing with an aerial shot we use larger values.
        pixel bender @ panoptikon

        Comment


        • #5
          Originally posted by garipodelu View Post
          We usually have 3 zdepth passes as we also do our post work inside photoshop. So, for a basic exterior shot, we have 3 zdepth passes: ZDepth 50m, ZDepth 100m, and ZDepth 500m. These usually give us maximum flexibility. If we are dealing with an aerial shot we use larger values.
          Ah that's a clever idea. And since I'd be bringing it in as floating point and saving it down to 8bit anyway, it wouldn't matter so much that it wouldn't be exactly the full range of black to white. I'm sure there's enough info there to give me 256 values even if the range in the 500m pass, for example, is really narrow.

          Comment


          • #6
            Originally posted by staddon View Post
            I'd be bringing it in as floating point and saving it down to 8bit anyway
            If you keep the data elements (z, point positions, and so on) in 32bpc fp while doing the compositing, you're keeping their full latitude, so there's no need to fiddle.
            If you can ensure you don't degrade it to 8bpc before their usefulness is exhausted, you should be fine regardless of how the Z channel looks (data passes can -and often do- have non-visible values. They aren't meant for human vision consumption.)
            Lele
            Trouble Stirrer in RnD @ Chaos
            ----------------------
            emanuele.lecchi@chaos.com

            Disclaimer:
            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

            Comment


            • #7
              Originally posted by ^Lele^ View Post
              If you keep the data elements (z, point positions, and so on) in 32bpc fp while doing the compositing, you're keeping their full latitude, so there's no need to fiddle.
              If you can ensure you don't degrade it to 8bpc before their usefulness is exhausted, you should be fine regardless of how the Z channel looks (data passes can -and often do- have non-visible values. They aren't meant for human vision consumption.)
              So regardless of what min and max values I set in the render element, all the floating point data will be there unaltered in photoshop? If so, do you know of a resource/tutorial that explains how I can retune the range for visual consumption (8bit bmp)? I tried throwing an exposure adjustment layer on there which works with the beauty pass, but it just made the zdepth completely white or black rather than revealing different parts of the range. On the beauty pass, simple exposure will reveal more detail in the shadows or in the overexposed areas which makes sense to me, but for some reason, it doesn't work the same way with the zdepth. Is this because I set min and max values in the render element? Should it just be 0, 0 or is there a checkbox somewhere?

              Thanks!

              Comment


              • #8
                Indeed, Z is naturally *negative* in values, so there's no way to multiply that into visibility with positive numbers (i.e. exposure).
                It needs to be inverted first (i.e. multiply by -1), and then re-ranged.
                You can also, of course, make the right adjustments to the render element itself, by ticking the "invert" checkbox.
                This is essentially how the render element gets created by default.

                Attached Files
                Lele
                Trouble Stirrer in RnD @ Chaos
                ----------------------
                emanuele.lecchi@chaos.com

                Disclaimer:
                The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                Comment


                • #9
                  Originally posted by ^Lele^ View Post
                  Indeed, Z is naturally *negative* in values, so there's no way to multiply that into visibility with positive numbers (i.e. exposure).
                  It needs to be inverted first (i.e. multiply by -1), and then re-ranged.
                  You can also, of course, make the right adjustments to the render element itself, by ticking the "invert" checkbox.
                  This is essentially how the render element gets created by default.
                  Ohhh interesting. I'll give that a try.

                  Comment

                  Working...
                  X