facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.7k stars 1.3k forks source link

Mesh gets cut while rendering #1714

Closed abhimanyuchadha96 closed 5 months ago

abhimanyuchadha96 commented 8 months ago

If you do not know the root cause of the problem / bug, and wish someone to help you, please post according to this template:

🐛 Bugs / Unexpected behaviors

As seen in the images below, the mesh gets cut while getting rendered from different angles.

GLB file in viewer:-

Rendered Image from PyTorch3D:-

NOTE: Please look at the existing list of Issues tagged with the label 'bug`. Only open a new issue if this bug has not already been reported. If an issue already exists, please comment there instead..

Instructions To Reproduce the Issue:

R, T = look_at_view_transform(elev=50, dist=230, azim=180) Tried other options like at = ((1, 1, 1),)but the results were the same.

All other camera parameters are default taken from https://colab.research.google.com/github/facebookresearch/pytorch3d/blob/stable/docs/tutorials/render_textured_meshes.ipynb#scrollTo=CDQKebNNfBMI

bottler commented 8 months ago

Can you try playing with the znear and zfar inputs to the init of the FoVPerspectiveCameras ? Things too near or too far from the camera are deliberately ignored, but you can change what is "too near/far".