pytorch3d/docs/notes/visualization.md
Alex Naumann d2bbd0cdb7 Fix link to render textured meshes example (#818)
Summary:
Great work! :)
Just found a link in the examples that is not working. This will fix it.

Best,
Alex

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/818

Reviewed By: nikhilaravi

Differential Revision: D30637532

Pulled By: patricklabatut

fbshipit-source-id: ed6c52375d1e760cb0fb2c0a66648dfeb0c6ed46
2021-08-30 13:11:53 -07:00

1.5 KiB

hide_title, sidebar_label
hide_title sidebar_label
true Plotly Visualization

Overview

PyTorch3D provides a modular differentiable renderer, but for instances where we want interactive plots or are not concerned with the differentiability of the rendering process, we provide functions to render meshes and pointclouds in plotly. These plotly figures allow you to rotate and zoom the rendered images and support plotting batched data as multiple traces in a singular plot or divided into individual subplots.

Examples

These rendering functions accept plotly x,y, and z axis arguments as kwargs, allowing us to customize the plots. Here are two plots with colored axes, a Pointclouds plot, a batched Meshes plot in subplots, and a batched Meshes plot with multiple traces. Refer to the render textured meshes and render colored pointclouds tutorials for code examples.

Saving plots to images

If you want to save these plotly plots, you will need to install a separate library such as Kaleido.

Install Kaleido

$ pip install Kaleido

Export a figure as a .png image. The image will be saved in the current working directory.

fig = ...
fig.write_image("image_name.png")