Voxel Model → 3D Mesh

VoxelMap can transform a voxel model from Goxel (exported .txt) into a 3D mesh.

First, download the model file:

wget https://raw.githubusercontent.com/andrewrgarcia/voxelmap/main/model_files/skull.txt

Loading the Voxel Model

from voxelmap import Model

model = Model()
model.load("skull.txt")

# basic voxel view (Matplotlib)
model.set_color(1, "white")
model.draw("custom")

➡ Produces a solid voxel rendering of the skull.

Convert to Mesh

from voxelmap.mesh import MarchingMesh, MeshView

MarchingMesh(model.array, out_file="skull.obj")
MeshView("skull.obj", mode="wireframe", wireframe_color="white")

➡ Produces a 3D mesh view (requires [mesh]).

Skull mesh preview