A tool for creating vertex mesh masks written in Python
video.mp4
python mesh_masking.py <path to mesh> <path to mask> <-im to store the mask as vertex indices sequence>
example:
python mesh_masking.py meshes/mesh.obj masks/nose.npy
To save the result, quit the application by closing the window or pressing q
.
This tool uses Pyvista and PyvistaQt to interactively mark vertices of a 3D mesh as masked or not. Vertex masks are useful for many applications where only a subset of a mesh is relevant.
The controls are displayed in the console when launching the application.
Key | Action |
---|---|
Space | Mark the area under the cursor as masked |
Left control | Unmask the area under the cursor if masked |
Numpad Plus | Increase selection area size |
Numpad Minus | Decrease selection area size |
The mesh is colored in real-time to ease the process.
Color | Meaning |
---|---|
blue | Default |
red | masked |
green | Under the cursor |
- python 3.7+
- pyvista
- pyvistaqt
- trimesh
- numpy
- click