facebookresearch / pytorch3d

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

How to render mesh wireframe #732

Open shirgur opened 3 years ago

shirgur commented 3 years ago

❓ How to render mesh wireframe

Is there a way to render the mesh's wireframe?

Thanks

bottler commented 3 years ago

Do you want a differentiable rendering or just a visualization / forward pass? Do you want to only see the wireframe without the mesh, or both the mesh and the wireframe together?

shirgur commented 3 years ago

In my case, there's no need for it to be differentiable, only for visualization (with and without the mesh)

I find it very easy to use PyTorch3D for training AND visualization, and I hope not to use other packages for visualization only

bottler commented 3 years ago

Plotly has a facility for viewing a wireframe, and we already have encapsulated it in PyTorch3D for visualizing a PyTorch3D mesh. I think it would be quite easy to add a connection in plotly_vis for showing a mesh as a wireframe. Perhaps the easiest thing would be to add a new class Wireframe in plotly_vis which contains nothing but a single Meshes member, and this new class would be added to the things accepted by the two plotting functions, and the response to it is showing the wireframe. You might be able to do this yourself.

There may be tricks to make the PyTorch3D renderer show some of the wireframe, but this would not be an easy choice if you want to see hidden surfaces, i.e. edges which are behind faces.

Tandon-A commented 8 months ago

Is there any update on this?