menpo3d - Tools for manipulating meshes
A library inside the Menpo Project that makes manipulating 3D mesh data a simple task. In particular, this project provides the ability to import, visualize and rasterize 3D meshes. Although 3D meshes can be created within the main Menpo project, this package adds the real functionality for working with 3D data.
Here in the Menpo team, we are firm believers in making installation as simple as possible. Unfortunately, we are a complex project that relies on satisfying a number of complex 3rd party library dependencies. The default Python packing environment does not make this an easy task. Therefore, we evangelise the use of the conda ecosystem, provided by Anaconda. In order to make things as simple as possible, we suggest that you use conda too! To try and persuade you, go to the Menpo website to find installation instructions for all major platforms.
Visualizing 3D objects
menpo3d adds support for viewing 3D objects through Mayavi, which is based on VTK. One of the main reasons menpo3d is a seperate project to the menpo core library is to isolate the more complex dependencies that this brings to the project. 3D visualization is not yet supported in the browser, so we rely on platform-specific viewing mechanisms like QT or WX.
In order to view 3D items you will need to first use the
IPython magic command to set up QT for rendering (you do this instead of
%matplotlib inline which is what is needed for rendering directly
in Jupyter/Ipython notebooks). As a complete example, to view a
mesh in IPython you would run something like:
import menpo3d mesh = menpo3d.io.import_builtin_asset('james.obj')
%matplotlib qt mesh.view()