facebookresearch / pytorch3d

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

Rendering Point Clouds #209

Closed NicoBux closed 4 years ago

NicoBux commented 4 years ago

Hi,

Does PyTorch3D support differentiable rendering of point clouds? That is, .ply or .obj files with only vertices data and no faces.

Thank you!

gkioxari commented 4 years ago

Yes, we support rendering pointclouds. Check out this tutorial https://github.com/facebookresearch/pytorch3d/blob/master/docs/tutorials/render_colored_points.ipynb

And yes you can store data with pointclouds in .ply format by only providing verts https://github.com/facebookresearch/pytorch3d/blob/ae68a54f67a940d1e7b158b257df126817b94992/pytorch3d/io/ply_io.py#L768

NicoBux commented 4 years ago

Great thank you! I'm not sure how I missed that tutorial, it's exactly what I needed. Although, I'm not sure why load_ply() enforces the presence of faces in the .ply. Since mine doesn't have any, I had to load it with Open3D and manually create the Pointcloud object (similar to the above tutorial).

Anyways, thanks for the prompt response and well-documented library. That definitely helps separate it from the rest