pytorch3d
pytorch3d copied to clipboard
Is it possible to render the backside depth, or normal of a mesh?
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.
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.