pytorch3d icon indicating copy to clipboard operation
pytorch3d copied to clipboard

How to render mesh wireframe

Open shirgur opened this issue 3 years ago • 4 comments

❓ How to render mesh wireframe

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

Thanks

shirgur avatar Jun 28 '21 13:06 shirgur

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?

bottler avatar Jun 28 '21 13:06 bottler

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

shirgur avatar Jun 28 '21 13:06 shirgur

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.

bottler avatar Jun 30 '21 11:06 bottler

Is there any update on this?

Tandon-A avatar Oct 28 '23 17:10 Tandon-A