conquer3d 0.7.0__tar.gz → 0.7.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {conquer3d-0.7.0/conquer3d.egg-info → conquer3d-0.7.3}/PKG-INFO +145 -25
- {conquer3d-0.7.0 → conquer3d-0.7.3}/README.md +145 -25
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/_C.so +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/conversion/tmesh.py +20 -5
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/data_structure/grid.cpp +44 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/data_structure/triangle_mesh.cpp +1 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/data_structure/zcurve.cpp +8 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/chamfer.cpp +14 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/dc.cpp +22 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/dmc.cpp +22 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/flood_fill.cpp +14 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/flood_fill_cf.cpp +14 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/mc.cpp +22 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/mca.cpp +22 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/mt.cpp +22 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/mtg.cpp +22 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/ops/volint.cpp +14 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/primitive/gs.cpp +24 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/primitive/pgs.cpp +8 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/primitive/ray.cpp +19 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/primitive/triangle.cpp +83 -3
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/check.h +6 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/bvh.cu +205 -11
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/bvh.h +1 -1
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/grid.cu +59 -3
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/kdtree.cu +78 -3
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/mesh_bvh.cu +270 -7
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/mesh_bvh.h +1 -1
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/triangle_mesh.cu +599 -65
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/triangle_mesh.h +93 -15
- conquer3d-0.7.3/conquer3d/csrc/data_structure/zcurve.cu +48 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/maths/f2x2.h +57 -1
- conquer3d-0.7.3/conquer3d/csrc/maths/f3x1.h +277 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/maths/f3x3.h +60 -1
- conquer3d-0.7.3/conquer3d/csrc/maths/f3x4.h +59 -0
- conquer3d-0.7.3/conquer3d/csrc/maths/f4x1.h +171 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/maths/f4x4.h +64 -1
- conquer3d-0.7.3/conquer3d/csrc/maths/ops.h +43 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/chamfer.cu +34 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/dc.cu +169 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/dc_data.h +31 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/dmc.cu +155 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/dmc_data.h +75 -5
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/flood_fill.cu +89 -2
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/flood_fill_cf.cu +278 -9
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/flood_fill_cf.h +9 -9
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mc.cu +254 -6
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mc_data.h +41 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mca.cu +103 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mca_data.h +29 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mt.cu +253 -6
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mt_data.h +38 -5
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mtg.cu +257 -6
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mtg_data.h +31 -2
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/volint.cu +36 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/edge.h +20 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/gs.cu +37 -2
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/gs_aabb.cu +211 -4
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/pgs.cu +22 -1
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/pgs_aabb.cu +92 -2
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/triangle.h +317 -1
- conquer3d-0.7.3/conquer3d/csrc/pybind.cpp +161 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/__init__.py +2 -1
- conquer3d-0.7.3/conquer3d/data/assets/common.py +580 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/dataset/__init__.py +2 -0
- conquer3d-0.7.3/conquer3d/data/dataset/digit3dmv.py +369 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data_structure/__init__.py +1 -1
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/__init__.py +3 -0
- conquer3d-0.7.3/conquer3d/ops/dpsr.py +300 -0
- conquer3d-0.7.3/conquer3d/ops/dual_contouring.py +178 -0
- conquer3d-0.7.3/conquer3d/ops/dual_marching_cubes.py +173 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/marching_cubes_asymptotic.py +45 -67
- {conquer3d-0.7.0 → conquer3d-0.7.3/conquer3d.egg-info}/PKG-INFO +145 -25
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d.egg-info/SOURCES.txt +2 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/pyproject.toml +1 -1
- {conquer3d-0.7.0 → conquer3d-0.7.3}/setup.py +13 -8
- conquer3d-0.7.0/conquer3d/csrc/data_structure/zcurve.cu +0 -32
- conquer3d-0.7.0/conquer3d/csrc/maths/f3x1.h +0 -120
- conquer3d-0.7.0/conquer3d/csrc/maths/f3x4.h +0 -28
- conquer3d-0.7.0/conquer3d/csrc/maths/f4x1.h +0 -75
- conquer3d-0.7.0/conquer3d/csrc/maths/ops.h +0 -20
- conquer3d-0.7.0/conquer3d/csrc/pybind.cpp +0 -62
- conquer3d-0.7.0/conquer3d/data/assets/common.py +0 -196
- conquer3d-0.7.0/conquer3d/ops/dual_contouring.py +0 -219
- conquer3d-0.7.0/conquer3d/ops/dual_marching_cubes.py +0 -213
- {conquer3d-0.7.0 → conquer3d-0.7.3}/LICENSE +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/MANIFEST.in +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/_C.pyi +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/__init__.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/conversion/__init__.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/conversion/grid.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/conversion/mesh.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/creation/__init__.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/creation/triangle_creation.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/creation/triangle_creation.cpp +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/data_structure/bvh.cpp +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/data_structure/gs_bvh.cpp +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/data_structure/kdtree.cpp +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/data_structure/mesh_bvh.cpp +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/binds/data_structure/pgs_bvh.cpp +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/constants.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/creation/triangle_creation.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/grid.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/gs_bvh.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/kdtree.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/pgs_bvh.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/data_structure/zcurve.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/maths/maths.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/maths/qef.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/chamfer.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/dc.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/dmc.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/flood_fill.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mc.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mca.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mt.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/mtg.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/ops/volint.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/aabb.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/gs.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/gs_math.cuh +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/pgs.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/pgs_math.cuh +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/csrc/primitive/ray.h +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/assets/__init__.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/assets/iphigenia.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/collate/__init__.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/collate/mesh.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/collate/sparse_tensor.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/dataset/base_mesh.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/dataset/digit3d.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/dataset/mesh.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/dataset/redwood.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/transform/__init__.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/transform/base.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/transform/ops.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data/transform/vertex.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data_structure/bmesh.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data_structure/grid.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/data_structure/sort.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/io/__init__.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/io/obj.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/io/off.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/io/ply.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/delaunay_triangulation.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/diff_marching_cubes.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/diff_marching_tetrahedra_grid.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/distance.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/marching_cubes.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/marching_tetrahedra.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/marching_tetrahedra_grid.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/ops/volint.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/primitive/__init__.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/primitive/gs.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d/primitive/pgs.py +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d.egg-info/dependency_links.txt +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d.egg-info/not-zip-safe +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d.egg-info/requires.txt +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/conquer3d.egg-info/top_level.txt +0 -0
- {conquer3d-0.7.0 → conquer3d-0.7.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: conquer3d
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
4
4
|
Summary: Geometric Cuda Tool Box
|
|
5
5
|
Author-email: Do Hoang Khoi <khoido8899@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -37,18 +37,23 @@ Dynamic: license-file
|
|
|
37
37
|
|
|
38
38
|
### *High-Performance GPU-Accelerated Differentiable Geometry, Spatial Computing & Neural Rendering Toolbox*
|
|
39
39
|
|
|
40
|
+
[](https://khoidoo.github.io/conquer3d/)
|
|
40
41
|
[](https://pypi.org/project/conquer3d/)
|
|
41
42
|
[](https://hub.docker.com/r/kohido/conquer3d)
|
|
42
43
|
[](LICENSE)
|
|
43
|
-
|
|
44
|
+
|
|
45
|
+
[](https://www.python.org/)
|
|
44
46
|
[](https://developer.nvidia.com/cuda-toolkit)
|
|
47
|
+
[](https://pytorch.org/)
|
|
48
|
+
[](https://khoidoo.github.io/conquer3d/api/index.html)
|
|
45
49
|
|
|
46
50
|
<p align="center">
|
|
47
|
-
<a href="
|
|
48
|
-
<a href="
|
|
49
|
-
<a href="
|
|
51
|
+
<b><a href="https://khoidoo.github.io/conquer3d/">🌐 Website</a></b> •
|
|
52
|
+
<a href="https://khoidoo.github.io/conquer3d/documentation.html">Guide</a> •
|
|
53
|
+
<a href="https://khoidoo.github.io/conquer3d/api/index.html">API Reference</a> •
|
|
54
|
+
<a href="https://khoidoo.github.io/conquer3d/benchmarks.html">Benchmarks</a> •
|
|
50
55
|
<a href="#-installation">Installation</a> •
|
|
51
|
-
<a href="#-
|
|
56
|
+
<a href="#-features--highlights">Features</a>
|
|
52
57
|
</p>
|
|
53
58
|
|
|
54
59
|
</div>
|
|
@@ -59,18 +64,87 @@ Dynamic: license-file
|
|
|
59
64
|
|
|
60
65
|
**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.0 Billion faces/second** isosurface extraction, exact CAD sharp crease preservation, and memory-efficient spatial acceleration structures.
|
|
61
66
|
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install -U conquer3d
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
```python
|
|
74
|
+
import torch
|
|
75
|
+
from conquer3d.data_structure import create_voxel_grid
|
|
76
|
+
from conquer3d.ops import dmc
|
|
77
|
+
|
|
78
|
+
grid_vertices, voxels, _ = create_voxel_grid(
|
|
79
|
+
grid_min=[-1.0] * 3, grid_max=[1.0] * 3, res=[64, 64, 64], device="cuda"
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
sdf = (torch.norm(grid_vertices, dim=-1) - 0.6).requires_grad_(True)
|
|
83
|
+
verts, faces = dmc(grid_vertices, voxels, sdf, iso=0.0)
|
|
84
|
+
|
|
85
|
+
verts.sum().backward() # gradients flow back into the field
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 📖 Documentation
|
|
91
|
+
|
|
92
|
+
**Full documentation lives at [khoidoo.github.io/conquer3d](https://khoidoo.github.io/conquer3d/).**
|
|
93
|
+
|
|
94
|
+
| | |
|
|
95
|
+
| :--- | :--- |
|
|
96
|
+
| **[Showcase](https://khoidoo.github.io/conquer3d/)** | What the library is for, and how to start. |
|
|
97
|
+
| **[Documentation](https://khoidoo.github.io/conquer3d/documentation.html)** | Installation, core concepts, architecture, and worked pipelines. |
|
|
98
|
+
| **[API Reference](https://khoidoo.github.io/conquer3d/api/index.html)** | Every symbol, across seven tiers. |
|
|
99
|
+
| **[Benchmarks](https://khoidoo.github.io/conquer3d/benchmarks.html)** | Measured extraction throughput on real geometry. |
|
|
100
|
+
| **[About](https://khoidoo.github.io/conquer3d/about.html)** | Motivation and the research this builds on. |
|
|
101
|
+
|
|
102
|
+
The API reference does not stop at the Python surface. It descends through the pybind11 bindings and host dispatchers into the CUDA kernels themselves, the device helpers they call, and the inline math those are built from — **1018 symbols, fully documented**:
|
|
103
|
+
|
|
104
|
+
| Tier | Layer | Symbols |
|
|
105
|
+
| :--- | :--- | ---: |
|
|
106
|
+
| **T1** | Python API | 159 |
|
|
107
|
+
| **T2** | Native bindings (`conquer3d._C`) | 151 |
|
|
108
|
+
| **T3** | Host dispatchers & C++ declarations | 437 |
|
|
109
|
+
| **T4** | CUDA `__global__` kernels | 109 |
|
|
110
|
+
| **T5** | CUDA `__device__` helpers | 69 |
|
|
111
|
+
| **T6** | Inline math primitives | 65 |
|
|
112
|
+
| **T7** | `__constant__` topology tables | 28 |
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## ⚡ Benchmarks
|
|
117
|
+
|
|
118
|
+
*Empirical extraction performance on **NVIDIA GeForce RTX 4090** on the **Fandisk CAD model** at **$1024^3$ resolution** (6.86M sparse vertices, 5.15M active voxels):*
|
|
119
|
+
|
|
120
|
+
| Algorithm | Mesh Output | Extracted Vertices | Extracted Faces / Quads | Latency (ms) | Throughput | Watertight |
|
|
121
|
+
| :--- | :--- | :--- | :--- | :---: | :---: | :---: |
|
|
122
|
+
| **Dual Marching Cubes (DMC)** | Triangles | **1,716,386** | **3,432,768** | **3.44 ms** | **~1.0B faces/s** | **Yes** |
|
|
123
|
+
| **Dual Marching Cubes (DMC)** | Pure Quads | **1,716,386** | **1,716,384** | **3.22 ms** | **533M quads/s** | **Yes** |
|
|
124
|
+
| **Dual Contouring (DC + Normals)** | Triangles | 1,716,386 | 3,432,768 | **4.79 ms** | **717M faces/s** | **Yes** |
|
|
125
|
+
| **Marching Cubes Asymptotic (MCA)** | Triangles | 1,716,384 | 3,432,764 | 16.42 ms | **209M faces/s** | **Yes** |
|
|
126
|
+
|
|
62
127
|
---
|
|
63
128
|
|
|
64
129
|
## ✨ Features & Highlights
|
|
65
130
|
|
|
66
|
-
|
|
131
|
+
<details open>
|
|
132
|
+
<summary><b>🔷 1. Isosurface Extraction & Meshing</b></summary>
|
|
133
|
+
<br>
|
|
134
|
+
|
|
67
135
|
- **Dual Marching Cubes (`dmc`)**: High-throughput manifold surface extraction with pure quad $(Q, 4)$ or triangle $(F, 3)$ outputs (~1.0B faces/s).
|
|
68
136
|
- **Dual Contouring (`dc`)**: Sharp CAD crease and mechanical corner preservation via GPU Quadratic Error Function (QEF) solving.
|
|
69
137
|
- **Marching Cubes Asymptotic (`mca`)**: Decider-enhanced Marching Cubes resolving topological face ambiguities on-the-fly.
|
|
138
|
+
- **Differentiable Poisson Surface Reconstruction (`dpsr`, `DPSR`)**: Differentiable spectral Fourier Poisson indicator field solving directly from oriented point clouds.
|
|
70
139
|
- **Differentiable Marching Cubes (`diff_marching_cubes`)**: PyTorch autograd gradient backpropagation through levelsets into SDF and color fields.
|
|
71
140
|
- **Marching Tetrahedra (`marching_tetrahedra`, `marching_tetrahedra_grid`)**: Consistent isosurface extraction across unstructured meshes and regular cubic tetrahedral grids.
|
|
72
141
|
|
|
73
|
-
|
|
142
|
+
</details>
|
|
143
|
+
|
|
144
|
+
<details>
|
|
145
|
+
<summary><b>🚀 2. Hardware-Accelerated Spatial Acceleration</b></summary>
|
|
146
|
+
<br>
|
|
147
|
+
|
|
74
148
|
- **Triangle Mesh BVH (`MeshBVH`)**: GPU Bounding Volume Hierarchy for fast ray intersections, point projections, and signed distance queries.
|
|
75
149
|
- **Gaussian Splatting BVHs (`GSBVH`, `PGSBVH`)**: Spatial hierarchies specialized for 3D Gaussian Splatting and Periodic Gaussian Splatting.
|
|
76
150
|
- **Radix Linear BVH (`BVH`)**: High-throughput parallel bounding volume hierarchy for generic 3D primitives.
|
|
@@ -78,45 +152,59 @@ Dynamic: license-file
|
|
|
78
152
|
- **Morton Z-Curve Sorting (`z_curve_sort`)**: 64-bit Radix-sorted space-filling curve indexing for maximizing GPU cache locality.
|
|
79
153
|
- **Volumetric 3D Flood Fill**: Fast GPU bitmask ray-boundary flood fill for sign evaluation across complex geometries.
|
|
80
154
|
|
|
81
|
-
|
|
155
|
+
</details>
|
|
156
|
+
|
|
157
|
+
<details>
|
|
158
|
+
<summary><b>🌐 3. Volumetric Grids & Surface Conversions</b></summary>
|
|
159
|
+
<br>
|
|
160
|
+
|
|
82
161
|
- **Narrow-Band Sparse Voxel Grids (`create_voxel_grid_from_tmesh`)**: Direct surface-confined voxelization bypassing dense 3D memory.
|
|
83
162
|
- **Multi-Mode Normal Field Generation**: On-the-fly extraction of exact CAD face normals (`mode=0`), smooth vertex normals (`mode=1`), or SDF gradients (`mode=2`).
|
|
84
163
|
- **Mesh-to-Grid Pipelines (`tmesh2voxel`, `tmesh2sparse`)**: One-line conversion from 3D meshes to dense or sparse Signed Distance Fields.
|
|
85
164
|
- **Depth-Map Surface Carving (`get_active_voxel_ids_from_depth`)**: Multi-view RGB-D depth image backprojection into active voxel grids.
|
|
86
165
|
- **Sparse & Occupancy Conversions (`sparse_coo2dense_occ`, `dense_occ2sparse_coo`)**: Seamless conversion between sparse coordinate tensors and dense binary occupancy volumes.
|
|
87
166
|
|
|
88
|
-
|
|
167
|
+
</details>
|
|
168
|
+
|
|
169
|
+
<details>
|
|
170
|
+
<summary><b>🎨 4. Radiance Fields & Differentiable Primitives</b></summary>
|
|
171
|
+
<br>
|
|
172
|
+
|
|
89
173
|
- **3D Gaussian Splatting Primitives (`compute_gs_covi`, `compute_gs_aabb`)**: GPU-accelerated covariance matrices, Mahalanobis distances, and tight AABB computation.
|
|
90
174
|
- **Periodic Gaussian Splatting (`solve_pgs_cluster_tangency_radius`)**: Spatial frequency-aware radiance field query operators.
|
|
91
175
|
- **Geometric Primitive Structures (`Ray`, `Triangle`, `AABB`, `Edge`)**: Vectorized GPU ray tracing and collision primitives.
|
|
92
176
|
|
|
93
|
-
|
|
177
|
+
</details>
|
|
178
|
+
|
|
179
|
+
<details>
|
|
180
|
+
<summary><b>📐 5. Geometric Distances & Volume Integrals</b></summary>
|
|
181
|
+
<br>
|
|
182
|
+
|
|
94
183
|
- **Exact Chamfer Distances (`chamfer_distance`, `one_sided_chamfer_distance`)**: Point-to-point and point-to-mesh geometric error evaluation.
|
|
95
184
|
- **Exact Hausdorff Distances (`hausdorff_distance`, `one_sided_hausdorff_distance`)**: Maximum deviation metrics for surface fidelity assessment.
|
|
96
185
|
- **Single-View Volume Integrals (`single_view_volume_integral`)**: Analytical divergence-theorem ray volume integration.
|
|
97
186
|
|
|
98
|
-
|
|
187
|
+
</details>
|
|
188
|
+
|
|
189
|
+
<details>
|
|
190
|
+
<summary><b>📦 6. 3D Data Loading, Augmentation & Collation</b></summary>
|
|
191
|
+
<br>
|
|
192
|
+
|
|
99
193
|
- **Benchmark 3D Datasets (`Digit3D`, `PointDigit3D`, `RedWood`, `MeshDataset`)**: Ready-to-use PyTorch dataset abstractions.
|
|
100
194
|
- **Standard Benchmark 3D Assets (`conquer3d.data.assets`)**: One-click download & caching for Stanford Bunny, Armadillo, Dragon, Lucy, Happy Buddha, Spot, Cow, Teapot, Suzanne, Fandisk, Iphigenia, and more.
|
|
101
195
|
- **Geometric Data Augmentations (`Rotation`, `Scale`, `RandomRotation`, `RandomScale`, `Sequence`, `MeshSequence`)**: Composable spatial transformation pipelines.
|
|
102
196
|
- **Custom PyTorch Batch Collation (`bmesh_collate_fn`, `sparse_collate_fn`)**: Efficient handling of variable-sized meshes and sparse tensors in DataLoaders.
|
|
103
197
|
|
|
104
|
-
|
|
105
|
-
- **Procedural Mesh Generators (`create_sphere`, `create_tetrahedra`)**: Parametric geometric shape creation utilities.
|
|
106
|
-
- **High-Performance Mesh I/O (`read_obj`, `write_obj`, `read_off`)**: Native loading and saving for vertices, faces, and vertex colors.
|
|
198
|
+
</details>
|
|
107
199
|
|
|
108
|
-
|
|
200
|
+
<details>
|
|
201
|
+
<summary><b>🛠️ 7. Procedural Generation & File I/O</b></summary>
|
|
202
|
+
<br>
|
|
109
203
|
|
|
110
|
-
|
|
204
|
+
- **Procedural Mesh Generators (`create_sphere`, `create_tetrahedra`)**: Parametric geometric shape creation utilities.
|
|
205
|
+
- **High-Performance Mesh I/O (`read_obj`, `write_obj`, `read_off`)**: Native loading and saving for vertices, faces, and vertex colors.
|
|
111
206
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
| Algorithm | Mesh Output | Extracted Vertices | Extracted Faces / Quads | Latency (ms) | Throughput | Watertight |
|
|
115
|
-
| :--- | :--- | :--- | :--- | :---: | :---: | :---: |
|
|
116
|
-
| **Dual Marching Cubes (DMC)** | Triangles | **1,716,386** | **3,432,768** | **3.44 ms** | **~1.0B faces/s** | **Yes** |
|
|
117
|
-
| **Dual Marching Cubes (DMC)** | Pure Quads | **1,716,386** | **1,716,384** | **3.22 ms** | **533M quads/s** | **Yes** |
|
|
118
|
-
| **Dual Contouring (DC + Normals)** | Triangles | 1,716,386 | 3,432,768 | **4.79 ms** | **717M faces/s** | **Yes** |
|
|
119
|
-
| **Marching Cubes Asymptotic (MCA)** | Triangles | 1,716,384 | 3,432,764 | 16.42 ms | **209M faces/s** | **Yes** |
|
|
207
|
+
</details>
|
|
120
208
|
|
|
121
209
|
---
|
|
122
210
|
|
|
@@ -189,6 +277,10 @@ query_ids, closest_tri_ids, projected_pts, sdfs = tmesh.query_points(
|
|
|
189
277
|
)
|
|
190
278
|
```
|
|
191
279
|
|
|
280
|
+
> [!TIP]
|
|
281
|
+
> More worked pipelines, the core concepts behind them, and the full operator reference are on the
|
|
282
|
+
> **[documentation site](https://khoidoo.github.io/conquer3d/documentation.html)**.
|
|
283
|
+
|
|
192
284
|
---
|
|
193
285
|
|
|
194
286
|
## 📦 Installation
|
|
@@ -198,6 +290,8 @@ query_ids, closest_tri_ids, projected_pts, sdfs = tmesh.query_points(
|
|
|
198
290
|
pip install -U conquer3d
|
|
199
291
|
```
|
|
200
292
|
|
|
293
|
+
Prebuilt CUDA wheels are attached to each release for **Python 3.10–3.14** against **PyTorch 2.8 and 2.11** (CUDA 12.8).
|
|
294
|
+
|
|
201
295
|
### 2. Docker (Recommended for instant GPU / CUDA environment)
|
|
202
296
|
```bash
|
|
203
297
|
# Pull and run the pre-built image
|
|
@@ -228,16 +322,42 @@ cd conquer3d
|
|
|
228
322
|
pip install -e . --no-build-isolation
|
|
229
323
|
```
|
|
230
324
|
|
|
325
|
+
> [!NOTE]
|
|
326
|
+
> Importing `conquer3d` loads the compiled `_C` extension at module scope, so a CUDA-capable device
|
|
327
|
+
> and a matching PyTorch build are required.
|
|
328
|
+
|
|
231
329
|
---
|
|
232
330
|
|
|
233
331
|
## 📚 Acknowledgements & References
|
|
332
|
+
|
|
234
333
|
For further theoretical background, GPU collision detection guides, and related literature, please visit:
|
|
334
|
+
|
|
235
335
|
- **[Research Papers](acknowledgement/REFERENCE.md)**: Computational geometry, differential topology, and acceleration structure foundations.
|
|
236
336
|
- **[Blog Posts](acknowledgement/BLOG_POST.md)**: GPU spatial traversal, parallel BVH construction, and CUDA optimization guides.
|
|
237
337
|
- **[Related Repositories](acknowledgement/REPOSITORY.md)**: Open-source geometric deep learning ecosystem.
|
|
238
338
|
- **[Books](acknowledgement/BOOK.md)**: Core computational geometry references.
|
|
239
339
|
|
|
340
|
+
A rendered bibliography is also available on the **[About page](https://khoidoo.github.io/conquer3d/about.html)**.
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## 📝 Citation
|
|
345
|
+
|
|
346
|
+
```bibtex
|
|
347
|
+
@software{conquer3d,
|
|
348
|
+
title = {Conquer3D: GPU-Accelerated Differentiable Geometry and Spatial Computing},
|
|
349
|
+
author = {Do, Hoang Khoi},
|
|
350
|
+
year = {2025},
|
|
351
|
+
url = {https://github.com/KhoiDOO/conquer3d}
|
|
352
|
+
}
|
|
353
|
+
```
|
|
354
|
+
|
|
240
355
|
---
|
|
241
356
|
|
|
242
357
|
## 📄 License
|
|
358
|
+
|
|
243
359
|
Conquer3D is licensed under the [MIT License](LICENSE).
|
|
360
|
+
|
|
361
|
+
<div align="center">
|
|
362
|
+
<sub>Built with CUDA and PyTorch · <a href="https://khoidoo.github.io/conquer3d/">khoidoo.github.io/conquer3d</a></sub>
|
|
363
|
+
</div>
|
|
@@ -4,18 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
### *High-Performance GPU-Accelerated Differentiable Geometry, Spatial Computing & Neural Rendering Toolbox*
|
|
6
6
|
|
|
7
|
+
[](https://khoidoo.github.io/conquer3d/)
|
|
7
8
|
[](https://pypi.org/project/conquer3d/)
|
|
8
9
|
[](https://hub.docker.com/r/kohido/conquer3d)
|
|
9
10
|
[](LICENSE)
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
[](https://www.python.org/)
|
|
11
13
|
[](https://developer.nvidia.com/cuda-toolkit)
|
|
14
|
+
[](https://pytorch.org/)
|
|
15
|
+
[](https://khoidoo.github.io/conquer3d/api/index.html)
|
|
12
16
|
|
|
13
17
|
<p align="center">
|
|
14
|
-
<a href="
|
|
15
|
-
<a href="
|
|
16
|
-
<a href="
|
|
18
|
+
<b><a href="https://khoidoo.github.io/conquer3d/">🌐 Website</a></b> •
|
|
19
|
+
<a href="https://khoidoo.github.io/conquer3d/documentation.html">Guide</a> •
|
|
20
|
+
<a href="https://khoidoo.github.io/conquer3d/api/index.html">API Reference</a> •
|
|
21
|
+
<a href="https://khoidoo.github.io/conquer3d/benchmarks.html">Benchmarks</a> •
|
|
17
22
|
<a href="#-installation">Installation</a> •
|
|
18
|
-
<a href="#-
|
|
23
|
+
<a href="#-features--highlights">Features</a>
|
|
19
24
|
</p>
|
|
20
25
|
|
|
21
26
|
</div>
|
|
@@ -26,18 +31,87 @@
|
|
|
26
31
|
|
|
27
32
|
**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.0 Billion faces/second** isosurface extraction, exact CAD sharp crease preservation, and memory-efficient spatial acceleration structures.
|
|
28
33
|
|
|
34
|
+
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.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install -U conquer3d
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
import torch
|
|
42
|
+
from conquer3d.data_structure import create_voxel_grid
|
|
43
|
+
from conquer3d.ops import dmc
|
|
44
|
+
|
|
45
|
+
grid_vertices, voxels, _ = create_voxel_grid(
|
|
46
|
+
grid_min=[-1.0] * 3, grid_max=[1.0] * 3, res=[64, 64, 64], device="cuda"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
sdf = (torch.norm(grid_vertices, dim=-1) - 0.6).requires_grad_(True)
|
|
50
|
+
verts, faces = dmc(grid_vertices, voxels, sdf, iso=0.0)
|
|
51
|
+
|
|
52
|
+
verts.sum().backward() # gradients flow back into the field
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## 📖 Documentation
|
|
58
|
+
|
|
59
|
+
**Full documentation lives at [khoidoo.github.io/conquer3d](https://khoidoo.github.io/conquer3d/).**
|
|
60
|
+
|
|
61
|
+
| | |
|
|
62
|
+
| :--- | :--- |
|
|
63
|
+
| **[Showcase](https://khoidoo.github.io/conquer3d/)** | What the library is for, and how to start. |
|
|
64
|
+
| **[Documentation](https://khoidoo.github.io/conquer3d/documentation.html)** | Installation, core concepts, architecture, and worked pipelines. |
|
|
65
|
+
| **[API Reference](https://khoidoo.github.io/conquer3d/api/index.html)** | Every symbol, across seven tiers. |
|
|
66
|
+
| **[Benchmarks](https://khoidoo.github.io/conquer3d/benchmarks.html)** | Measured extraction throughput on real geometry. |
|
|
67
|
+
| **[About](https://khoidoo.github.io/conquer3d/about.html)** | Motivation and the research this builds on. |
|
|
68
|
+
|
|
69
|
+
The API reference does not stop at the Python surface. It descends through the pybind11 bindings and host dispatchers into the CUDA kernels themselves, the device helpers they call, and the inline math those are built from — **1018 symbols, fully documented**:
|
|
70
|
+
|
|
71
|
+
| Tier | Layer | Symbols |
|
|
72
|
+
| :--- | :--- | ---: |
|
|
73
|
+
| **T1** | Python API | 159 |
|
|
74
|
+
| **T2** | Native bindings (`conquer3d._C`) | 151 |
|
|
75
|
+
| **T3** | Host dispatchers & C++ declarations | 437 |
|
|
76
|
+
| **T4** | CUDA `__global__` kernels | 109 |
|
|
77
|
+
| **T5** | CUDA `__device__` helpers | 69 |
|
|
78
|
+
| **T6** | Inline math primitives | 65 |
|
|
79
|
+
| **T7** | `__constant__` topology tables | 28 |
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## ⚡ Benchmarks
|
|
84
|
+
|
|
85
|
+
*Empirical extraction performance on **NVIDIA GeForce RTX 4090** on the **Fandisk CAD model** at **$1024^3$ resolution** (6.86M sparse vertices, 5.15M active voxels):*
|
|
86
|
+
|
|
87
|
+
| Algorithm | Mesh Output | Extracted Vertices | Extracted Faces / Quads | Latency (ms) | Throughput | Watertight |
|
|
88
|
+
| :--- | :--- | :--- | :--- | :---: | :---: | :---: |
|
|
89
|
+
| **Dual Marching Cubes (DMC)** | Triangles | **1,716,386** | **3,432,768** | **3.44 ms** | **~1.0B faces/s** | **Yes** |
|
|
90
|
+
| **Dual Marching Cubes (DMC)** | Pure Quads | **1,716,386** | **1,716,384** | **3.22 ms** | **533M quads/s** | **Yes** |
|
|
91
|
+
| **Dual Contouring (DC + Normals)** | Triangles | 1,716,386 | 3,432,768 | **4.79 ms** | **717M faces/s** | **Yes** |
|
|
92
|
+
| **Marching Cubes Asymptotic (MCA)** | Triangles | 1,716,384 | 3,432,764 | 16.42 ms | **209M faces/s** | **Yes** |
|
|
93
|
+
|
|
29
94
|
---
|
|
30
95
|
|
|
31
96
|
## ✨ Features & Highlights
|
|
32
97
|
|
|
33
|
-
|
|
98
|
+
<details open>
|
|
99
|
+
<summary><b>🔷 1. Isosurface Extraction & Meshing</b></summary>
|
|
100
|
+
<br>
|
|
101
|
+
|
|
34
102
|
- **Dual Marching Cubes (`dmc`)**: High-throughput manifold surface extraction with pure quad $(Q, 4)$ or triangle $(F, 3)$ outputs (~1.0B faces/s).
|
|
35
103
|
- **Dual Contouring (`dc`)**: Sharp CAD crease and mechanical corner preservation via GPU Quadratic Error Function (QEF) solving.
|
|
36
104
|
- **Marching Cubes Asymptotic (`mca`)**: Decider-enhanced Marching Cubes resolving topological face ambiguities on-the-fly.
|
|
105
|
+
- **Differentiable Poisson Surface Reconstruction (`dpsr`, `DPSR`)**: Differentiable spectral Fourier Poisson indicator field solving directly from oriented point clouds.
|
|
37
106
|
- **Differentiable Marching Cubes (`diff_marching_cubes`)**: PyTorch autograd gradient backpropagation through levelsets into SDF and color fields.
|
|
38
107
|
- **Marching Tetrahedra (`marching_tetrahedra`, `marching_tetrahedra_grid`)**: Consistent isosurface extraction across unstructured meshes and regular cubic tetrahedral grids.
|
|
39
108
|
|
|
40
|
-
|
|
109
|
+
</details>
|
|
110
|
+
|
|
111
|
+
<details>
|
|
112
|
+
<summary><b>🚀 2. Hardware-Accelerated Spatial Acceleration</b></summary>
|
|
113
|
+
<br>
|
|
114
|
+
|
|
41
115
|
- **Triangle Mesh BVH (`MeshBVH`)**: GPU Bounding Volume Hierarchy for fast ray intersections, point projections, and signed distance queries.
|
|
42
116
|
- **Gaussian Splatting BVHs (`GSBVH`, `PGSBVH`)**: Spatial hierarchies specialized for 3D Gaussian Splatting and Periodic Gaussian Splatting.
|
|
43
117
|
- **Radix Linear BVH (`BVH`)**: High-throughput parallel bounding volume hierarchy for generic 3D primitives.
|
|
@@ -45,45 +119,59 @@
|
|
|
45
119
|
- **Morton Z-Curve Sorting (`z_curve_sort`)**: 64-bit Radix-sorted space-filling curve indexing for maximizing GPU cache locality.
|
|
46
120
|
- **Volumetric 3D Flood Fill**: Fast GPU bitmask ray-boundary flood fill for sign evaluation across complex geometries.
|
|
47
121
|
|
|
48
|
-
|
|
122
|
+
</details>
|
|
123
|
+
|
|
124
|
+
<details>
|
|
125
|
+
<summary><b>🌐 3. Volumetric Grids & Surface Conversions</b></summary>
|
|
126
|
+
<br>
|
|
127
|
+
|
|
49
128
|
- **Narrow-Band Sparse Voxel Grids (`create_voxel_grid_from_tmesh`)**: Direct surface-confined voxelization bypassing dense 3D memory.
|
|
50
129
|
- **Multi-Mode Normal Field Generation**: On-the-fly extraction of exact CAD face normals (`mode=0`), smooth vertex normals (`mode=1`), or SDF gradients (`mode=2`).
|
|
51
130
|
- **Mesh-to-Grid Pipelines (`tmesh2voxel`, `tmesh2sparse`)**: One-line conversion from 3D meshes to dense or sparse Signed Distance Fields.
|
|
52
131
|
- **Depth-Map Surface Carving (`get_active_voxel_ids_from_depth`)**: Multi-view RGB-D depth image backprojection into active voxel grids.
|
|
53
132
|
- **Sparse & Occupancy Conversions (`sparse_coo2dense_occ`, `dense_occ2sparse_coo`)**: Seamless conversion between sparse coordinate tensors and dense binary occupancy volumes.
|
|
54
133
|
|
|
55
|
-
|
|
134
|
+
</details>
|
|
135
|
+
|
|
136
|
+
<details>
|
|
137
|
+
<summary><b>🎨 4. Radiance Fields & Differentiable Primitives</b></summary>
|
|
138
|
+
<br>
|
|
139
|
+
|
|
56
140
|
- **3D Gaussian Splatting Primitives (`compute_gs_covi`, `compute_gs_aabb`)**: GPU-accelerated covariance matrices, Mahalanobis distances, and tight AABB computation.
|
|
57
141
|
- **Periodic Gaussian Splatting (`solve_pgs_cluster_tangency_radius`)**: Spatial frequency-aware radiance field query operators.
|
|
58
142
|
- **Geometric Primitive Structures (`Ray`, `Triangle`, `AABB`, `Edge`)**: Vectorized GPU ray tracing and collision primitives.
|
|
59
143
|
|
|
60
|
-
|
|
144
|
+
</details>
|
|
145
|
+
|
|
146
|
+
<details>
|
|
147
|
+
<summary><b>📐 5. Geometric Distances & Volume Integrals</b></summary>
|
|
148
|
+
<br>
|
|
149
|
+
|
|
61
150
|
- **Exact Chamfer Distances (`chamfer_distance`, `one_sided_chamfer_distance`)**: Point-to-point and point-to-mesh geometric error evaluation.
|
|
62
151
|
- **Exact Hausdorff Distances (`hausdorff_distance`, `one_sided_hausdorff_distance`)**: Maximum deviation metrics for surface fidelity assessment.
|
|
63
152
|
- **Single-View Volume Integrals (`single_view_volume_integral`)**: Analytical divergence-theorem ray volume integration.
|
|
64
153
|
|
|
65
|
-
|
|
154
|
+
</details>
|
|
155
|
+
|
|
156
|
+
<details>
|
|
157
|
+
<summary><b>📦 6. 3D Data Loading, Augmentation & Collation</b></summary>
|
|
158
|
+
<br>
|
|
159
|
+
|
|
66
160
|
- **Benchmark 3D Datasets (`Digit3D`, `PointDigit3D`, `RedWood`, `MeshDataset`)**: Ready-to-use PyTorch dataset abstractions.
|
|
67
161
|
- **Standard Benchmark 3D Assets (`conquer3d.data.assets`)**: One-click download & caching for Stanford Bunny, Armadillo, Dragon, Lucy, Happy Buddha, Spot, Cow, Teapot, Suzanne, Fandisk, Iphigenia, and more.
|
|
68
162
|
- **Geometric Data Augmentations (`Rotation`, `Scale`, `RandomRotation`, `RandomScale`, `Sequence`, `MeshSequence`)**: Composable spatial transformation pipelines.
|
|
69
163
|
- **Custom PyTorch Batch Collation (`bmesh_collate_fn`, `sparse_collate_fn`)**: Efficient handling of variable-sized meshes and sparse tensors in DataLoaders.
|
|
70
164
|
|
|
71
|
-
|
|
72
|
-
- **Procedural Mesh Generators (`create_sphere`, `create_tetrahedra`)**: Parametric geometric shape creation utilities.
|
|
73
|
-
- **High-Performance Mesh I/O (`read_obj`, `write_obj`, `read_off`)**: Native loading and saving for vertices, faces, and vertex colors.
|
|
165
|
+
</details>
|
|
74
166
|
|
|
75
|
-
|
|
167
|
+
<details>
|
|
168
|
+
<summary><b>🛠️ 7. Procedural Generation & File I/O</b></summary>
|
|
169
|
+
<br>
|
|
76
170
|
|
|
77
|
-
|
|
171
|
+
- **Procedural Mesh Generators (`create_sphere`, `create_tetrahedra`)**: Parametric geometric shape creation utilities.
|
|
172
|
+
- **High-Performance Mesh I/O (`read_obj`, `write_obj`, `read_off`)**: Native loading and saving for vertices, faces, and vertex colors.
|
|
78
173
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
| Algorithm | Mesh Output | Extracted Vertices | Extracted Faces / Quads | Latency (ms) | Throughput | Watertight |
|
|
82
|
-
| :--- | :--- | :--- | :--- | :---: | :---: | :---: |
|
|
83
|
-
| **Dual Marching Cubes (DMC)** | Triangles | **1,716,386** | **3,432,768** | **3.44 ms** | **~1.0B faces/s** | **Yes** |
|
|
84
|
-
| **Dual Marching Cubes (DMC)** | Pure Quads | **1,716,386** | **1,716,384** | **3.22 ms** | **533M quads/s** | **Yes** |
|
|
85
|
-
| **Dual Contouring (DC + Normals)** | Triangles | 1,716,386 | 3,432,768 | **4.79 ms** | **717M faces/s** | **Yes** |
|
|
86
|
-
| **Marching Cubes Asymptotic (MCA)** | Triangles | 1,716,384 | 3,432,764 | 16.42 ms | **209M faces/s** | **Yes** |
|
|
174
|
+
</details>
|
|
87
175
|
|
|
88
176
|
---
|
|
89
177
|
|
|
@@ -156,6 +244,10 @@ query_ids, closest_tri_ids, projected_pts, sdfs = tmesh.query_points(
|
|
|
156
244
|
)
|
|
157
245
|
```
|
|
158
246
|
|
|
247
|
+
> [!TIP]
|
|
248
|
+
> More worked pipelines, the core concepts behind them, and the full operator reference are on the
|
|
249
|
+
> **[documentation site](https://khoidoo.github.io/conquer3d/documentation.html)**.
|
|
250
|
+
|
|
159
251
|
---
|
|
160
252
|
|
|
161
253
|
## 📦 Installation
|
|
@@ -165,6 +257,8 @@ query_ids, closest_tri_ids, projected_pts, sdfs = tmesh.query_points(
|
|
|
165
257
|
pip install -U conquer3d
|
|
166
258
|
```
|
|
167
259
|
|
|
260
|
+
Prebuilt CUDA wheels are attached to each release for **Python 3.10–3.14** against **PyTorch 2.8 and 2.11** (CUDA 12.8).
|
|
261
|
+
|
|
168
262
|
### 2. Docker (Recommended for instant GPU / CUDA environment)
|
|
169
263
|
```bash
|
|
170
264
|
# Pull and run the pre-built image
|
|
@@ -195,16 +289,42 @@ cd conquer3d
|
|
|
195
289
|
pip install -e . --no-build-isolation
|
|
196
290
|
```
|
|
197
291
|
|
|
292
|
+
> [!NOTE]
|
|
293
|
+
> Importing `conquer3d` loads the compiled `_C` extension at module scope, so a CUDA-capable device
|
|
294
|
+
> and a matching PyTorch build are required.
|
|
295
|
+
|
|
198
296
|
---
|
|
199
297
|
|
|
200
298
|
## 📚 Acknowledgements & References
|
|
299
|
+
|
|
201
300
|
For further theoretical background, GPU collision detection guides, and related literature, please visit:
|
|
301
|
+
|
|
202
302
|
- **[Research Papers](acknowledgement/REFERENCE.md)**: Computational geometry, differential topology, and acceleration structure foundations.
|
|
203
303
|
- **[Blog Posts](acknowledgement/BLOG_POST.md)**: GPU spatial traversal, parallel BVH construction, and CUDA optimization guides.
|
|
204
304
|
- **[Related Repositories](acknowledgement/REPOSITORY.md)**: Open-source geometric deep learning ecosystem.
|
|
205
305
|
- **[Books](acknowledgement/BOOK.md)**: Core computational geometry references.
|
|
206
306
|
|
|
307
|
+
A rendered bibliography is also available on the **[About page](https://khoidoo.github.io/conquer3d/about.html)**.
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## 📝 Citation
|
|
312
|
+
|
|
313
|
+
```bibtex
|
|
314
|
+
@software{conquer3d,
|
|
315
|
+
title = {Conquer3D: GPU-Accelerated Differentiable Geometry and Spatial Computing},
|
|
316
|
+
author = {Do, Hoang Khoi},
|
|
317
|
+
year = {2025},
|
|
318
|
+
url = {https://github.com/KhoiDOO/conquer3d}
|
|
319
|
+
}
|
|
320
|
+
```
|
|
321
|
+
|
|
207
322
|
---
|
|
208
323
|
|
|
209
324
|
## 📄 License
|
|
210
|
-
|
|
325
|
+
|
|
326
|
+
Conquer3D is licensed under the [MIT License](LICENSE).
|
|
327
|
+
|
|
328
|
+
<div align="center">
|
|
329
|
+
<sub>Built with CUDA and PyTorch · <a href="https://khoidoo.github.io/conquer3d/">khoidoo.github.io/conquer3d</a></sub>
|
|
330
|
+
</div>
|
|
Binary file
|
|
@@ -97,15 +97,17 @@ def tmesh2sparse(
|
|
|
97
97
|
pad: int = 0,
|
|
98
98
|
return_normals: bool = False,
|
|
99
99
|
normal_mode: int = 0,
|
|
100
|
-
drop_empty_vertex_voxels: bool = False
|
|
100
|
+
drop_empty_vertex_voxels: bool = False,
|
|
101
|
+
return_sdf: bool = True
|
|
101
102
|
) -> Union[
|
|
103
|
+
Tuple[torch.Tensor, torch.Tensor],
|
|
102
104
|
Tuple[torch.Tensor, torch.Tensor, torch.Tensor],
|
|
103
105
|
Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]
|
|
104
106
|
]:
|
|
105
107
|
"""Computes Signed Distance Fields on sparse voxel grids strictly near the surface.
|
|
106
108
|
|
|
107
109
|
Completely bypasses dense $O(R^3)$ volume allocation by querying the mesh BVH,
|
|
108
|
-
re-indexing sparse active vertices, and evaluating SDF solely on active points.
|
|
110
|
+
re-indexing sparse active vertices, and optionally evaluating SDF solely on active points.
|
|
109
111
|
|
|
110
112
|
Args:
|
|
111
113
|
tm (TriangleMesh): Input TriangleMesh GPU object.
|
|
@@ -126,11 +128,19 @@ def tmesh2sparse(
|
|
|
126
128
|
return_normals (bool, optional): If True, returns surface normal vectors. Defaults to False.
|
|
127
129
|
normal_mode (int, optional): Normal mode (0: face normals, 1: vertex normals, 2: displacement vector).
|
|
128
130
|
drop_empty_vertex_voxels (bool, optional): If True, drops voxels containing no mesh vertices inside their bounding box. Defaults to False.
|
|
131
|
+
return_sdf (bool, optional): If True, queries and returns the Signed Distance Field on sparse grid vertices.
|
|
132
|
+
If False, skips SDF evaluation entirely. Defaults to True.
|
|
129
133
|
|
|
130
134
|
Returns:
|
|
131
|
-
Union[
|
|
132
|
-
|
|
133
|
-
|
|
135
|
+
Union[
|
|
136
|
+
Tuple[torch.Tensor, torch.Tensor],
|
|
137
|
+
Tuple[torch.Tensor, torch.Tensor, torch.Tensor],
|
|
138
|
+
Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]
|
|
139
|
+
]:
|
|
140
|
+
- If `return_sdf=True` and `return_normals=False`: `(sparse_grid_vertices, active_voxels, sdfs)`
|
|
141
|
+
- If `return_sdf=True` and `return_normals=True`: `(sparse_grid_vertices, active_voxels, sdfs, grid_normals)`
|
|
142
|
+
- If `return_sdf=False` and `return_normals=False`: `(sparse_grid_vertices, active_voxels)`
|
|
143
|
+
- If `return_sdf=False` and `return_normals=True`: `(sparse_grid_vertices, active_voxels, grid_normals)`
|
|
134
144
|
"""
|
|
135
145
|
if grid_min is None:
|
|
136
146
|
grid_min = [-1.0, -1.0, -1.0]
|
|
@@ -155,6 +165,11 @@ def tmesh2sparse(
|
|
|
155
165
|
)
|
|
156
166
|
|
|
157
167
|
num_points = grid_vertices.shape[0]
|
|
168
|
+
if not return_sdf:
|
|
169
|
+
if return_normals:
|
|
170
|
+
return grid_vertices, active_voxels.to(torch.int64), grid_normals
|
|
171
|
+
return grid_vertices, active_voxels.to(torch.int64)
|
|
172
|
+
|
|
158
173
|
if num_points == 0:
|
|
159
174
|
sdfs = torch.empty(0, dtype=torch.float32, device=device)
|
|
160
175
|
if return_normals:
|