Closed kyrollosyanny closed 1 year ago
Hi @kyrollosyanny
I think this is a duplicate of https://github.com/mitsuba-renderer/mitsuba3/issues/491, could you take a look at the conversation there?
Hi @njroussel,
Thank you for your response and the very helpful pointer. I have a couple of questions to clarify:
Best,
depth
integrator and aov
integrator will return values that are "missing" the near_clip
distance.The way to reason about this is that the distance/depth is computed from where the ray is spawned. You can actually see this in the perspective
implementation: https://github.com/mitsuba-renderer/mitsuba3/blob/master/src/sensors/perspective.cpp#L226-L232
That makes sense. Thanks a lot for the help and very fast responses :)
Summary
Im using the
Depth integrator
to get the depth buffer of a scene (i.e. distance from camera to the objects in the scene). I noticed that the values returned by the depth buffer are always off by the value of the near_clipping plane. Im wondering why that is? For example, in the simple example below, I place a cube scaled by 0.025 at z=0.6 m from the camera. The depth value returned is 0.475. Now adding, 0.025 (half the size of the cube to that), we get that the cube is centered at 0.5 when it should be centered at 0.6. Interestingly enough, the value of the near clip plane here is 0.1. This generalizes when I change the value of the near clipping planeSystem configuration
System information:
Mitsuba version: .3
Description
Steps to reproduce