Experimental glTF reading

Summary: Experimental data loader for taking the default scene from a GLB file and converting it to a single mesh in PyTorch3D.

Reviewed By: nikhilaravi

Differential Revision: D25900167

fbshipit-source-id: bff22ac00298b83a0bd071ae5c8923561e1d81d7
This commit is contained in:
Jeremy Reizenstein
2021-05-26 04:52:46 -07:00
committed by Facebook GitHub Bot
parent 0e85652f07
commit ed6983ea84
9 changed files with 771 additions and 3 deletions

View File

@@ -22,3 +22,13 @@ and to save a pointcloud you might do
pcl = Pointclouds(...)
IO().save_point_cloud(pcl, "output_pointcloud.obj")
```
For meshes, this supports OBJ, PLY and OFF files.
For pointclouds, this supports PLY files.
In addition, there is experimental support for loading meshes from
[glTF 2 assets](https://github.com/KhronosGroup/glTF/tree/master/specification/2.0)
stored either in a GLB container file or a glTF JSON file with embedded binary data.
This must be enabled explicitly, as described in
`pytorch3d/io/experimental_gltf_io.ply`.