This is an old revision of the document!
This is a fairly popular use case, for which I had promised to write a tutorial many years ago..
I constructed the example from this 3D model on Sketchfab and a sphere,
combined using the blender
3D modeller (https://www.blender.org):
In blender
I selected the “heart” sphere, deleted it, and saved the puppet as an .obj
file (File → Export → Wavefront (.obj), then select Z as the up axis). Next, Edit → Undo, and the same step to save the sphere to an .obj
file.
The resulting files: puppet.obj and heart.obj
The goal is to voxelize them such that after merging they end up in the same spot relative to each other.
For this we need to determine the smallest bounding box that contains both models. Since in our example the “heart” is inside the body, we can use the bounding box of the puppet.
binvox
determines a model's bounding box and prints it to the terminal: