Announcement

Collapse
No announcement yet.

Z-depth Nuke/V-Ray is not computed the same way

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

  • Z-depth Nuke/V-Ray is not computed the same way

    It seems z-depth is not calculated the same way in V-Ray (for Maya) vs Nuke.

    V-Ray generated z depth below:


    The Maya setup:



    Problem: The same setup in Nuke as above would render a plane with one solid gray color tone.


    Explanation from The Foundry's devs:
    ScanlineRender works as OpenGL and for a flat polygon respects the point of
    view when calculating depth, as you've mentioned.

    It's possible that V-Ray might have an option to change the Z-depth generation
    which could help.

    Another possibility could be to generate at shading time the Z-buffer
    compatible with Nuke, in an AOV channel.

    The following formula should do the job:

    aov.z = 1 / P.z

    Where P is the sample point in the camera coordinate.
    Now, my question – Would it be possible to implement a slightliy different z depth render element in V-Ray that would generate a z depth which would match a Nuke 3D comp?
    Right now, we are unable to have geometry in Nuke's 3D space to line up with a z-sliced V-Ray render.
    Best Regards,
    Fredrik

  • #2
    Could it be that Vray and Nuke have different value for the near depth and far depth?
    Change your value ( in Vray) and you can get a your plane to be with one solid colour.
    Portfolio: http://www.cgifocus.co.uk

    Comment


    • #3
      You can use the VRayExtraTex texture coupled with the "camera point" output of a samplerInfo texture to get the Nuke-style z coordinate, which you can then transform in Nuke as needed.

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

      Comment


      • #4
        Thanks Vlado, I knew you kept a card up your sleeve on this one!
        Best Regards,
        Fredrik

        Comment

        Working...
        X