Problem with Z-Depth output

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Problem with Z-Depth output

Post 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.
CodeHD
Donor
Donor
Posts: 437
Joined: Tue Dec 11, 2018 12:38 pm
Location: Germany

Re: Problem with Z-Depth output

Post 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.
Post Reply