Depth map with cycles engine
hansongfang opened this issue · 2 comments
Thank you for sharing the code! I have an issue with the depth map generation. It seems that the depth map rendered with cycles engine in blender 2.79 is not the z-value, which is the orthogonal distance. https://blender.stackexchange.com/questions/87504/blender-cycles-z-coordinate-vs-camera-centered-z-coordinate-orthogonal-distan
Will this depth map behavior affects the GenRe results? I think that the depth map used by GenRe rendered by Mitsuba is keeping the z-value.
Hi, thank you for your interest!
Just to clarify: Are you having any issues with our code base, or are you looking to get some clarifications?
In developing our code base we tested multiple cases where we successfully matched GenRe's Mitsuba data one-to-one. To our knowledge, in the GenRe implementation there is specifically a back-projection step that makes use of the per-pixel depth values treating them as rays from the camera origin (this function), which are denoted as zs
in the diagram in the link you shared rather than the zc
.
In testing our code base we also used GenRe's backprojection code to take the Blender depth maps, backproject them and overlay them on top of the mesh to make sure that they match. Below is an example of an image, corresponding ground truth depth and normals, and a mesh derived from the backprojected depth shown from multiple views:
Please don't hesitate to ask if you have further questions!
Thank you so much for correcting me! I previously do not realize that GenRe's back-projection step is using the sight ray's length. Your answer solves my question. 😄