VRayZDepth: Spherical projection

Hey!
Have a strange problem. I have a workaround but maybe it is a bug…

Scenesetup:
Interior scene (bath); physical camera with 27mm focal lengt (FOV: 67deg), nothing special.

Set up VRayZDepth (use cameraboundaries) to comp a DOF in post, but in the saved EXR the gradient of the depth is not planar as it should - it has a spherical projection/orientation to the world (?) space. The saved EXR G-Buffer-Channel (Depth) to compare the images seems correct. See attached image (left side VRayZDepth, right side G-Buffer-Channel). While using the VRayZDepth in comp I have a curved sharpness level (see the second screenshot attached)

Basically it is not a big deal but a bit strange and i’m not sure if the problem is the software or sitting in front of it.. :wink:


Hey,
If no answer then it is probably obvious that the problem sits in front of the computer :slight_smile: Does anyone have a hint?!

Cheers!

Hi,

The following behavior is expected. V-Ray ZDepth is measuring the distance from the camera itself. In scanline for example, it is measuring the distance from the camera plane.
There is a workaround for this. You can use VRaySamplerInfo render element. Set the type to point and coordinate system to Camera. Then you have to set a value of -1.0 for the point multiplier. This is not available using the UI, but you can set using MAXscript..
maxscript. ((maxOps.GetCurRenderElementMgr()).getrenderelement 0).point_multiplier=-1.0 ( when the 0 is the render element index ).
Save the render element as EXR and open it in a compositing software like Nuke. You have to use the blue channel and maybe some negative gain is required.

http://ftp.chaosgroup.com/support/screenshots/2019-02-21\_15-51-06.gif

Best Regards,
Martin Minev
Chaos Group Support