Skip to content

Data Processing

Rana Hanocka edited this page Sep 25, 2020 · 4 revisions

Converting to .obj format

If you have 3D objects in a different file format, they can easily be converted using Meshlab. Meshlab supports all the standard file formats (.off, .obj, .ply, .stl, .3ds, .collada and probably more). You can use Meshlab from the command line, for example:

meshlabserver -i /path/to/model.off -o /path/to/model.obj

Simplifying to the same number of faces

I suggest simplifying all your meshes to roughly the same number of faces. It is sort of like resizing images to the same size before training an image CNN, it will make the network faster and require less parameters. The script which will simplify meshes to a target number of faces using Blender 2.8 from the command line: blender_process.py. It can be run, for example:

/opt/blender/blender --background --python blender_process.py /path/to/input_mesh.obj num_faces /path/to/outputmesh.obj

where num_faces is the target number of faces.

Non-manifold inputs

MeshCNN supports manifold triangle meshes. I highly recommend using the following software: Manifold to make your meshes Manifold. It takes a "bad" triangle mesh as input (e.g., polygon soups, etc) and outputs a manifold watertight mesh

Clone this wiki locally