Skip to main content

⚡ Conquer3D

High-Performance GPU-Accelerated Differentiable Geometry, Spatial Computing & Neural Rendering Toolbox

Documentation PyPI Version Docker Image License

Python Version CUDA PyTorch API Coverage

🌐 Website • Guide • API Reference • Benchmarks • Results • Installation


[!NOTE] The API documentation and the documentation website were written with Claude. The library itself — every CUDA kernel, data structure and operator — is the author's own work.


🌟 Overview

Conquer3D is an ultra-fast, GPU-native computational geometry and differentiable spatial computing library engineered in PyTorch and CUDA. Designed from the ground up for 3D computer vision, generative AI, neural surface reconstruction, and differentiable rendering, Conquer3D delivers up to ~1.3 Billion faces/second isosurface extraction, exact CAD sharp crease preservation, and memory-efficient spatial acceleration structures.

Every operator consumes and produces PyTorch tensors in place — no host round-trip, no format conversion — so meshing a field is an operation inside a training step rather than a preprocessing stage around it.

pip install -U conquer3d
import torch
from conquer3d.data_structure import create_voxel_grid
from conquer3d.ops import dmc

grid_vertices, voxels, _ = create_voxel_grid(
    grid_min=[-1.0] * 3, grid_max=[1.0] * 3, res=[64, 64, 64], device="cuda"
)

sdf = (torch.norm(grid_vertices, dim=-1) - 0.6).requires_grad_(True)
verts, faces = dmc(grid_vertices, voxels, sdf, iso=0.0)

verts.sum().backward()          # gradients flow back into the field

🔬 Qualitative Results

Every figure below is real library output on the bundled benchmark assets, regenerated by docs/_figures/make_figures.py — nothing is mocked or hand-drawn. More, at full size, on the showcase.

Isosurface extraction

Five extractors on one signed distance field

One signed distance field on a 64³ narrow-band grid of 19,329 cells, meshed by five extractors, with the source mesh on the left. The lower row crops the crease where Marching Cubes and Dual Contouring disagree most.

Sharp features from Hermite data

Dual methods with and without Hermite data

Dual Contouring and Dual Marching Cubes run twice each: once with normals interpolated from the grid, once with exact Hermite data from compute_hermite_from_mesh, which ray-casts all 25,832 sign-crossing edges for the true intersection and face normal. The crease is reconstructed rather than rounded.

Detail is a resolution dial

Resolution ladder from 64 to 2048 cubed

Dual Marching Cubes on the Armadillo at seven grid resolutions from 64³ to 2048³. Face count runs from 12,076 to 13,294,500, with Chamfer and Hausdorff distance to the source measured at every step.

From mesh to surface, step by step

Sparse grid construction and extraction

The input mesh, the narrow-band cells allocated around it (7,863 of a possible 64,000 at 40³), the signed distance shown as a cutaway, the 2,646 bipolar cells, and the extracted surface. No dense volume is ever held.

Six ways to decide inside

Six sign determination modes

One axial slice signed by each of the six sign modes and contoured at zero — ray parity, pseudonormal, winding number, flood fill, hybrid consensus, and coarse-fine fill.

Ray queries against the hierarchies

Ray-triangle and ray-voxel queries

MeshBVH.get_ray_intersection returns the triangles a ray pierces; BVH.query_ray returns the narrow-band cells it crosses. Five rays from five origins, each drawn as far as its own first hit.


⚡ Benchmarks

RTX 4090, torch 2.8.0+cu128, CUDA 12.8. Fandisk at $1024^3$ (5.15M active cells). CUDA events around the operator alone, median of 7 runs after 2 warm-ups.

Algorithm Output Vertices Faces Latency Throughput
Dual Marching Cubes Triangles 1,716,384 3,432,764 2.62 ms 1,311M faces/s
DMC (pure quads) Quads 1,716,384 1,716,382 2.51 ms 684M quads/s
MC Asymptotic Triangles 1,716,382 3,432,760 2.71 ms 1,267M faces/s
Dual Contouring Triangles 1,716,384 3,432,764 3.88 ms 884M faces/s
Marching Cubes Triangles 1,716,382 3,432,760 7.90 ms 434M faces/s
Marching Tetrahedra Triangles 6,113,918 12,227,832 44.90 ms 272M faces/s

Sign-mode costs, distance-operator throughput, pipeline breakdown and memory scaling are on the benchmarks page.


📦 Installation

pip install -U conquer3d

Building from source, the full feature list, worked pipelines and the 1,020-symbol API reference are on the documentation site.


📄 License

Conquer3D is licensed under the MIT License.

Built with CUDA and PyTorch · khoidoo.github.io/conquer3d

Release files for conquer3d 0.7.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for conquer3d 0.7.7
File Size Uploaded
conquer3d-0.7.7.tar.gz 7.8 MB Details

Release files / conquer3d-0.7.7.tar.gz

Download URL conquer3d-0.7.7.tar.gz
Size 7.8 MB
Tags Source
SHA-256 checksum
How to use checksums
661b739739f8d69be20ed836302d02d040aad4ac75de7ae43e69fe66ca4e9e52
BLAKE2b-256 checksum
How to use checksums
17bd39456c31b10471baff96a791ad32059093a616af774208cd015854df907d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.14

Release history Release notifications | RSS feed

0.8.7

1 release file

0.8.6

1 release file

0.8.5

1 release file

0.8.4

1 release file

0.8.2

1 release file

0.8.0

1 release file

0.7.9

1 release file

0.7.8

1 release file

This release

0.7.7 This release

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.0

1 release file

0.6.9

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.0

1 release file

0.5.9

1 release file

0.5.8

1 release file

0.5.7

1 release file

0.5.6

1 release file

0.5.5

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.9

1 release file

0.4.8

1 release file

0.4.7

1 release file

0.4.6

1 release file

0.4.5

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.9

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.9

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page