Page 2 of 2

Re: Problem with Z-Depth output

Posted: Sun Apr 05, 2020 10:18 am
by B.Y.O.B.
Dade wrote: Sat Apr 04, 2020 10:43 pm Depth value will be INF if nothing is hit and, in this case, the above code will obliterate all depth values

The above code should check for INF values and ignore them in order to compute the max value.
For the DEPTH AOV, the above function is called with normalize = false, so there is no normalization performed.

Re: Problem with Z-Depth output

Posted: Sun Apr 05, 2020 11:20 am
by CodeHD
B.Y.O.B. wrote: Sat Apr 04, 2020 10:04 pm It is a Blender API method: https://docs.blender.org/api/current/bp ... e.add_pass
But it's not important to your problem.
You probably want to look at the LuxCore code where the depth AOV output is computed.

Or maybe this?
https://github.com/LuxCoreRender/LuxCor ... r.cpp#L166
It is used in the addon here: https://github.com/LuxCoreRender/BlendL ... nal.py#L25
Ah ok, I didn't think as far anymore at night that Blender API could be involved too :roll:

I already yesterday tried to track it through the LuxCore code, and ended up with the Intersect() method in trianlge.h, where the actual computation of ray distance seem ston be done. However, changing stuff and compiling to test this changed nothing to the render or the depth AOV, so not sure what happened there.