Announcement

Collapse
No announcement yet.

Issues getting Depth render output with Nuke zDefocus

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

  • Issues getting Depth render output with Nuke zDefocus

    Hi V-Ray community!

    I am currently pulling my hair out over trying to find a clear and concise explanation online for outputting the V-Ray Depth render element from Modo correctly into Nuke's ZDefocus node.

    Nothing I have done so far has seemed to work, always resulting in haloing or noticeable speckling spots around the object's edges... Research on these (and other) forums has made me aware of how many variables there seems to be.

    Within V-Ray:

    1 - Aliasing: I've disabled the AA filter in the V-Ray main renderer (which is what I am using to render - not RT). But even with an unfiltered Depth pass I still get haloing or speckles around the edge of the object.
    2 - Unfiltered fragment method is set to "Closest to camera" based on another post I've seen in this forum.
    3 - I've tried putting in a large environment sphere to prevent the BG from being empty behind the object that I want to defocus.

    Within Nuke:

    4 - ZDefocus node math is set to Depth.


    Examples in the images below.

    How is everyone else managing to do this?

    Any advice would be greatly appreciated as nothing I have found online has worked yet.

    Thanks again.

    - Jeff

  • #2
    Hey, Jeff,

    Thank you for the feedback. This option is not implemented yet, and we're working on it.

    Click image for larger version

Name:	image_52661.png
Views:	780
Size:	31.7 KB
ID:	1047517



    You can try with Object ID RE and use "Shuffle" node for a cut right before to use zDefocuse node.

    Click image for larger version  Name:	modo_2019-09-09_11-24-26.png Views:	1 Size:	91.5 KB ID:	1047515
    Last edited by boyan; 09-09-2019, 01:33 AM.
    Boyan Nalchadjiiski | QA Engineer @ Chaos |
    E-mail: boyan.nalchadjiiski@chaos.com

    Comment


    • #3
      Hi Boyan,

      Thank you very much for your quick reply. My understanding of what you've posted above is that it's a workaround for creating the depth pass without any AA applied... Does that mean that the images I've posted above still look like that's the problem?

      Thank you very much for your time.

      -Jeff

      Comment


      • #4
        Originally posted by jeffkrigstein View Post

        Does that mean that the images I've posted above still look like that's the problem?
        Hi, Jeff,

        I think if you work with unpremultiply edges (object ID + Shuffle node, meaning to work with no AA) should fix these halo edges when you apply the Zdefocus but the best way is to try it. This one should work.

        Cheers,


        Last edited by boyan; 09-09-2019, 07:50 AM.
        Boyan Nalchadjiiski | QA Engineer @ Chaos |
        E-mail: boyan.nalchadjiiski@chaos.com

        Comment


        • #5
          Firt of all, this is a pretty common problem when doing 2D depth of field. Looking at your screen-shot it's hard to know if your objects and bg is in the same render or if they are composited together. I'll assume that they are composited together.

          Check your depth channel and see what the values are outside the edge of your object. You probably have very different values (NaN/Inf/0/very high values). You can try changing those to better match the value of your object. Use an expression node in Nuke (on the depth channel):

          # Depth is Inf, replace with 100.
          isinf(z) ? 100 : z

          # Replace very high values with 100.
          if z > 100 ? 100 : z

          # Depth is 0, replace with 100.
          if z == 0 ? 100 : z

          This will help a lot when applying the dof. Also, you can try edge extending the depth channel a bit, which basically does the same.


          Comment


          • #6
            Thank you very much, Boyan and simonbjork for taking the time to reply. I will try what you've both suggested and see if that gives me any better results. Fingers crossed!

            -Jeff

            Comment

            Working...
            X