pytorch3d icon indicating copy to clipboard operation
pytorch3d copied to clipboard

Is it possible to render the backside depth, or normal of a mesh?

Open SangHunHan92 opened this issue 3 years ago • 1 comments

Thanks to various reasons on github, we succeeded in rendering the front depth and normal. (https://github.com/facebookresearch/pytorch3d/issues/35)

But I couldn't find a way to get the values corresponding to the back side of the mesh in pytorch3d.

Is there any way to get the back depth and color(normal) values when rendering? For example, rendering the depth and color of the last hit with ray casting.

SangHunHan92 avatar Sep 01 '22 08:09 SangHunHan92

Two approaches:

(a) Make a camera object which reverses the depth from what you need, and rasterize with that.

(b) write a custom hard shader which returns the furthest face's color instead of the nearest. The rasterizer only returns a fixed number of faces for each pixel, so T=to get information about the furthest faces, you will need to know an upper bound for the maximum number of faces a ray might intersect.

bottler avatar Sep 05 '22 15:09 bottler