Skip to content

Release v0.5.7

Choose a tag to compare

@KhoiDOO KhoiDOO released this 18 Aug 22:08
· 388 commits to main since this release
2b7d464

Features

  • GPU Quadratic Error Function (QEF) Solver (maths::solve_qef): High-performance GPU SVD and Jacobi $3 \times 3$ symmetric eigensolver in qef.h with mass-centroid origin shift and truncated singular mode regularization.
  • Differentiable Dual Contouring (conquer3d.ops.dual_contouring / dc): Fast 4-pass CUDA pipeline extracting explicit surface meshes from sparse/dense voxel grids and scalar fields with analytical backpropagation into SDF values and vertex color features.
  • Pure Quad & Triangle Meshing: Supports direct $(Q, 4)$ quadrilateral mesh generation with quad_split=False and optimal Delaunay max-min angle splitting into $(F, 3)$ triangles with quad_split=True.
  • Topological Quadrant Indexing & 1-Voxel Padding: Deterministic compile-time Cartesian quadrant slotting and 1-voxel narrow-band dilation (pad=1 in create_voxel_grid_from_tmesh) guaranteeing 100% closed, hole-free 2-manifold surfaces ($\chi=2$) at resolutions up to $1024^3$.

Refactors & Build

  • Modular Data Constants (dc_data.h): Separated voxel edge connections (dc_edge_corners), UVW offset tables (dc_corner_uvw), and quadrant mappings (dc_edge_quadrant) into dedicated header dc_data.h.
  • Grid Structure Dilation: Enhanced create_voxel_grid_from_tmesh with vectorized multi-voxel dilation support in both C++ backend and Python API.
  • Documentation & PyPI Release: Bumped version to 0.5.7, updated feature highlights in README.md, published conquer3d-0.5.7.tar.gz to PyPI, and resolved GitHub Issue #10.

Examples

import torch
from conquer3d.data_structure import create_voxel_grid
from conquer3d.ops import dual_contouring, dc

# 1. Create voxel grid
grid_vertices, voxels, _ = create_voxel_grid(
    grid_min=[-1.0, -1.0, -1.0],
    grid_max=[1.0, 1.0, 1.0],
    res=[64, 64, 64],
    device="cuda"
)

# 2. Evaluate scalar SDF and colors
sdf = (torch.norm(grid_vertices, dim=-1) - 0.6).requires_grad_(True)
colors = torch.rand((grid_vertices.shape[0], 3), device="cuda", requires_grad=True)

# 3. Extract Triangle Mesh with QEF sharp feature alignment
verts_tri, faces_tri, out_colors = dc(
    grid_vertices, voxels, sdf, colors=colors, iso=0.0, quad_split=True
)
print(f"Triangles: {verts_tri.shape[0]:,} vertices, {faces_tri.shape[0]:,} faces")

# 4. Extract Pure Quadrilateral Mesh
verts_quad, faces_quad = dc(
    grid_vertices, voxels, sdf, iso=0.0, quad_split=False
)
print(f"Quads: {verts_quad.shape[0]:,} vertices, {faces_quad.shape[0]:,} quads")

# 5. Differentiable Autograd Backward Pass
loss = verts_tri.sum() + out_colors.sum()
loss.backward()
print(f"SDF Gradient Norm: {sdf.grad.norm().item():.4f}")