GPU-accelerated iso-surface extraction for PyTorch
isoext is a high-performance library for extracting surfaces from scalar fields using CUDA.
- Marching Cubes — Fast triangular mesh extraction (about 5 ms for a 512³ grid on an RTX 5090)
- Dual Contouring — Triangle meshes with sharp feature preservation
- Flexible Grids — Dense uniform grids and memory-efficient sparse grids
- Interactive Viewer — View meshes in the browser, built on viser
- SDF Utilities — SDF primitives and CSG operations
Requires PyTorch with CUDA support; building from source needs CUDA 12.4+.
pip install isoextimport isoext
from isoext import viewer
grid = isoext.UniformGrid([256, 256, 256])
grid.set_values(grid.get_points().norm(dim=-1) - 0.8) # Sphere
vertices, faces = isoext.marching_cubes(grid)
server = viewer.show(vertices, faces) # opens the mesh in the browser
isoext.write_obj("sphere.obj", vertices, faces)See the full documentation for guides on grids, extraction methods, and the API reference.
MIT License. See LICENSE for details.