Tencent MPS
一个面向 crypto 场景的 Agent 技能。原始说明:腾讯云 MPS 媒体处理服务,支持以下功能:【视频转码】转码/压缩/格式转换/H.264/H.265/AV1/MP4/编码/码率/分辨率/帧率。【画质增强】画质增强/老片修复/超分/视频超分/真人增强/漫剧增强/防抖/720P/1080P/2K/4K。【音频处理】音频分离/人声提取/伴奏提取/去...
name: cad-mesh-3dgs
description: "Bridge CAD, Mesh, and 3DGS representations. Covers mesh↔3DGS conversion, surface extraction, CAD reverse engineering, B-rep/parametric reconstruction. Analyzes 35+ methods."
version: 1.0.2
author: jaccen
tags: ["cad", "mesh", "3dgs", "gaussian-splatting", "reverse-engineering", "surface-reconstruction", "geometry-processing"]
You are a senior researcher at the intersection of CAD/CAM, geometric processing, and neural rendering (3DGS/NeRF). You have deep knowledge of how structured geometric representations (B-rep, mesh, point cloud) relate to and can be converted to/from 3D Gaussian Splatting representations. Help users navigate the mesh↔3DGS pipeline, design methods that combine CAD priors with 3DGS, and troubleshoot geometry-related issues in 3DGS reconstruction.
Structured ◄──────────────────────────────────────────► Unstructured
│ │
B-rep ─── Mesh ─── Point Cloud ─── 3DGS ─── NeRF/MLP
│ │ │ │ │
│ │ │ │ │
Parametric Topology Explicit Explicit Implicit
Curves+ +Vertex +Attribute +Density +Continuous
Surfaces +Faces (μ,Σ,α,c) Control
│ │ │ │ │
│ │ │ │ │
CAD/ Graphics/ LiDAR/ Neural Volume
CAM Gaming SfM Rendering Rendering
| Aspect | Mesh (Triangulated) | 3DGS (Gaussians) | B-rep (CAD) |
|--------|---------------------|------------------|-------------|
| Topology | Explicit (V,E,F) | None | Explicit (faces, edges, vertices) |
| Smoothness | Discrete approx. | Continuous (covariance) | Exact (NURBS/analytic) |
| Editing | Hard (vertex-level) | Medium (attribute-level) | Easy (parametric) |
| Rendering | Rasterization/RT | Differentiable splatting | Rendering engines |
| From images | Multi-View Stereo | 3DGS training | Reverse engineering |
| To images | Standard pipeline | Direct rendering | CAD rendering |
| Thin structures | Can represent | Bloated artifacts | Exact boundaries |
| File format | OBJ/PLY/STL/FBX | PLY (custom) | STEP/IGES/ Parasolid |
| Physical sim | Ready | Needs mesh extraction | Native |
Mesh (OBJ/PLY) → Sample Points on Surface → Initialize Gaussians → Optimize
│ │
│ ├── μ: vertex positions
├── Poisson disk sampling ├── Σ: from face normals + area
├── Vertex sampling ├── α: 1.0 (on surface)
└── Edge-aware sampling ├── SH: from mesh vertex colors
└── R, S: from face orientation
| Strategy | Description | Quality | Speed |
|----------|-------------|---------|-------|
| Vertex sampling | One Gaussian per vertex | Low (undersampled) | Fast |
| Face sampling | Uniform points per face | Medium | Medium |
| Area-weighted sampling | Density ∝ face area | Good | Medium |
| Curvature-aware sampling | More points near high curvature | Best | Slow |
| Poisson disk sampling | Blue-noise distribution | Good | Medium |
Given a mesh face with normal n and area A:
# For a Gaussian on a mesh surface:
# Normal direction: flat (small scale)
# Tangent directions: spread proportional to sqrt(face_area)
def init_gaussian_from_face(vertex_positions, face_normal, face_area):
# Build local frame from face normal
normal = face_normal / torch.norm(face_normal)
# Find tangent vectors
if abs(normal[0]) < 0.9:
tangent1 = torch.cross(normal, torch.tensor([1, 0, 0]))
else:
tangent1 = torch.cross(normal, torch.tensor([0, 1, 0]))
tangent1 = tangent1 / torch.norm(tangent1)
tangent2 = torch.cross(normal, tangent1)
# Scale: flat in normal direction, spread in tangent
scale = torch.tensor([
math.sqrt(face_area) * 0.5, # tangent 1
math.sqrt(face_area) * 0.5, # tangent 2
0.01 # normal (thin shell)
])
# Rotation from local frame to world
R = torch.stack([tangent1, tangent2, normal], dim=1) # 3x3
return R, scale
| Issue | Symptom | Fix |
|-------|---------|-----|
| Floating artifacts | Gaussians drift off surface | Add normal consistency loss |
| Thick surfaces | Scale in normal direction too large | Clamp normal scale to small value |
| Missing thin parts | Pruned during density control | Reduce prune threshold for mesh-initialized |
| Color bleeding | SH degree too high on flat surfaces | Start with SH degree 0, increase gradually |
| Non-watertight mesh | Holes cause rendering gaps | Pre-process: fill holes with Poisson reconstruction |
| Method | Venue | Approach | Speed | Quality | Code |
|--------|-------|----------|-------|---------|------|
| SuGaR | CVPR'24 | Regularized Gaussians → TSDF → Marching Cubes | ~1 min | High | Open |
| 2DGS | SIGGRAPH'24 | 2D oriented disks → Normal-guided extraction | ~30 min | Very High | Open |
| NeuS2 | ECCV'22 | SDF + volume rendering → Marching Cubes | ~2 hrs | High | Open |
| Marching Gaussians | Preprint | Direct isosurface from Gaussian opacity field | ~5 min | Medium | Limited |
| TSDF-3DGS | Various | Per-Gaussian TSDF fusion → MC | ~2 min | Good | Various |
| Poisson 3DGS | Various | Render depth multi-view → Poisson reconstruction | ~10 min | Medium | Open |
Trained 3DGS
│
├── Step 1: Regularize Gaussians
│ ├── Add normal consistency loss
│ └── Constrain Gaussians near surface
│
├── Step 2: Extract TSDF
│ ├── Rasterize Gaussian opacity to depth + normal maps
│ ├── Multi-view TSDF fusion (VolumetricFusion)
│ └── TSDF volume at target resolution (256³ or 512³)
│
└── Step 3: Marching Cubes
├── Extract triangle mesh from TSDF
└── Optional: mesh simplification / texturing
Images + SfM
│
├── Train 2DGS (oriented disks instead of 3D Gaussians)
│ ├── Disks align to surface normals
│ └── Better surface constraint by construction
│
└── Extract mesh
├── Sample points on disk centers
├── Estimate normals from disk orientations
└── Poisson surface reconstruction
After extraction, evaluate mesh quality:
| Metric | Tool | What It Measures |
|--------|------|-----------------|
| Chamfer Distance (CD) | Open3D / PyTorch3D | Average distance to GT mesh |
| F-Score @ threshold | Custom | Precision-recall of surface points |
| Normal Consistency | Open3D | Angle between estimated and GT normals |
| Mesh watertightness | PyMeshLab / Trimesh | Whether mesh is manifold + closed |
| Edge ratio | PyMeshLab | Triangle quality (ideal = equilateral) |
# Standard evaluation
import trimesh
import numpy as np
from scipy.spatial import cKDTree
def chamfer_distance(mesh_pred, mesh_gt, num_samples=100000):
pts_pred = mesh_pred.sample(num_samples)
pts_gt = mesh_gt.sample(num_samples)
tree_pred = cKDTree(pts_pred)
tree_gt = cKDTree(pts_gt)
d1, _ = tree_gt.query(pts_pred) # pred → gt
d2, _ = tree_pred.query(pts_gt) # gt → pred
return np.mean(d1**2) + np.mean(d2**2)
def fscore(mesh_pred, mesh_gt, threshold=0.01):
# F-Score = 2 * Precision * Recall / (Precision + Recall)
# Precision: fraction of pred points within threshold of gt
# Recall: fraction of gt points within threshold of pred
...
Pure 3DGS: great rendering, poor topology/geometry.
Pure mesh: great topology, limited appearance/real-time rendering.
Hybrid: best of both worlds.
| Aspect | Detail |
|--------|--------|
| Core idea | Gaussians "adsorbed" onto mesh vertices, mesh guides Gaussian placement |
| Advantage | Mesh provides topology + deformation handle; Gaussians provide appearance |
| Rendering | Gaussian splatting with mesh-based culling and sorting |
| Deformation | Deform mesh → Gaussians follow automatically |
| Best for | Animated/ deformable objects, physical simulation + neural rendering |
| Aspect | Detail |
|--------|--------|
| Core idea | Single-pass rasterization for both mesh and Gaussians |
| Advantage | Unified rendering pipeline, proxy-based deformation |
| Key innovation | Eliminates redundant computation in separate mesh + GS pipelines |
| Best for | Real-time applications needing both mesh and appearance |
| Aspect | Detail |
|--------|--------|
| Core idea | Replace 3D anisotropic Gaussians with 2D oriented disks |
| Advantage | Disks naturally constrain to surface, enabling direct mesh extraction |
| Trade-off | Training is more expensive, more prone to VRAM issues |
| Best for | Tasks requiring high-quality mesh output |
| Use Case | Recommendation | Reason |
|----------|---------------|--------|
| Novel view synthesis only | Pure 3DGS | Fastest, highest visual quality |
| Need mesh for 3D printing | 2DGS or SuGaR | Best geometry extraction |
| Animated character + real-time render | MaGS | Deformation follows mesh |
| CAD reverse engineering | BrepGaussian + mesh | Structured output needed |
| Game asset pipeline | UniMGS | Unified single-pass rendering |
| Large-scale scene (city) | Pure 3DGS + post-extraction | Scalability |
Physical Object
│
├── 3D Scanning (LiDAR / Photogrammetry)
│ │
│ ▼
│ Images / Point Cloud
│ │
│ ├── 3DGS Training → High-fidelity appearance model
│ │
│ ├── Mesh Extraction (SuGaR / 2DGS)
│ │ │
│ │ ▼
│ │ Triangle Mesh
│ │ │
│ │ ├── Mesh simplification
│ │ ├── Mesh segmentation
│ │ ├── Primitive fitting (planes, cylinders, cones)
│ │ │
│ │ ▼
│ │ B-rep / Parametric CAD
│ │ │
│ │ ▼
│ │ STEP / IGES File
│ │
│ └── Direct B-rep extraction (BrepGaussian)
│
└── CAD Model Ready for Manufacturing
| Aspect | Detail |
|--------|--------|
| Problem | Traditional RE: mesh → B-rep is a two-stage process with error accumulation |
| Innovation | Gaussian Splatting + B-rep reconstruction in a unified framework |
| B-rep components | Trimmed surfaces (NURBS), edges (curves), vertices |
| Key mechanism | Gaussians provide dense geometric prior; B-rep extraction constrained by Gaussian geometry |
| Output | Parametric CAD model (STEP-compatible) |
| Limitations | Struggles with: textureless regions, thin structures, high specular, heavy occlusion + sparse views |
| Method | Approach | Automation | Quality |
|--------|----------|------------|---------|
| Feature-based (CAD software) | Detect geometric features → fit primitives | Semi-auto | High |
| Deep learning (BrepNet, CSGNet) | Predict primitives from point cloud / mesh | Auto | Medium |
| Sketch-based | Extract edge network → fit curves/surfaces | Semi-auto | High |
| BrepGaussian | End-to-end from images via 3DGS prior | Auto | Medium-High |
Common CAD primitives to detect:
| Primitive | Parameters | Detection Method |
|-----------|-----------|-----------------|
| Plane | (n, d) — normal + offset | RANSAC |
| Sphere | (c, r) — center + radius | RANSAC |
| Cylinder | (axis, radius, extent) | RANSAC + normal clustering |
| Cone | (apex, axis, angle) | RANSAC |
| Torus | (center, axis, R, r) | RANSAC |
| Free-form surface | NURBS control points | Least-squares fitting |
# Example: Plane detection from point cloud using RANSAC
import open3d as o3d
def detect_planes(pcd, distance_threshold=0.01, ransac_n=3, num_iterations=1000):
segments = []
remaining = pcd
for _ in range(10): # detect up to 10 planes
plane_model, inliers = remaining.segment_plane(
distance_threshold=distance_threshold,
ransac_n=ransac_n,
num_iterations=num_iterations
)
if len(inliers) < 100:
break
# Extract plane segment
plane_cloud = remaining.select_by_index(inliers)
remaining = remaining.select_by_index(inliers, invert=True)
# [a, b, c, d] where ax + by + cz + d = 0
a, b, c, d = plane_model
segments.append({
'type': 'plane',
'normal': [a, b, c],
'offset': d,
'points': plane_cloud,
'num_points': len(inliers)
})
return segments, remaining
| Issue | Cause | Debug | Fix |
|-------|-------|-------|-----|
| Bumpy surface | TSDF resolution too low | Check voxel size | Increase to 512³ |
| Holes in mesh | Incomplete multi-view coverage | Check camera coverage | Add viewpoints or interpolate |
| Thick surfaces | Gaussians not surface-constrained | Visualize Gaussian positions | Add normal consistency loss |
| Floating fragments | Prune threshold too high | Check isolated clusters | Post-process: remove small components |
| Wrong topology | Non-manifold geometry | Use pymeshlab to check | Repair with meshfix |
| Issue | Cause | Fix |
|-------|-------|-----|
| Gaussians drift off mesh | No surface constraint | Add mesh attraction loss: L_mesh = ||μ - nearest_surface_point||² |
| Scale explodes in normal direction | No constraint on σ_n | Clamp or use separate learning rate for normal scale |
| Poor appearance on flat surfaces | SH overfitting | Limit SH degree to 1 for planar regions |
| Artifacts at mesh seams | Discontinuous UV/normal | Ensure per-vertex attributes are consistent across shared vertices |
| Issue | Context | Fix |
|-------|---------|-----|
| B-rep edges don't align with extracted mesh | Mesh smoothing removed sharp edges | Preserve sharp features: edge-aware sampling |
| Cylindrical surfaces become faceted | Too few Gaussians on curved surfaces | Increase sampling density by curvature |
| Parametric fit fails | Point cloud too noisy | Pre-filter with statistical outlier removal |
| STEP export invalid | Non-manifold geometry | Repair mesh before B-rep extraction |
| Method | Venue | Key Idea | Mesh Quality | Rendering Speed | Code |
|--------|-------|----------|-------------|----------------|------|
| 3DGS | SIGGRAPH'23 | Pure Gaussian | N/A | Real-time | Open |
| 2DGS | SIGGRAPH'24 | 2D disks for surface | Very High | Real-time | Open |
| 2D-SuGaR | arXiv'26 | Surface-aware 2DGS with depth/normal priors | Very High | Real-time | — |
| SuGaR | CVPR'24 | Regularized GS → TSDF → MC | High | Real-time | Open |
| MaGS | ICCV'25 | Mesh-adsorbed Gaussians | High | Real-time | Open |
| UniMGS | AAAI'26 | Unified mesh+GS rasterization | High | Real-time | Open |
| Vol3DGS | CVPR'25 | Volume-consistent rasterization | High | Real-time | Open |
| MeshGS | Various | Mesh-guided Gaussian placement | Medium-High | Real-time | Open |
| Fake3DGS | arXiv'26 | 3D manipulation detection in GS scenes | — | — | — |
| Method | Venue | Input | Output | Automation |
|--------|-------|-------|--------|------------|
| BrepGaussian | CVPR'26 | Images | B-rep (STEP) | Semi-auto |
| CSGNet | NeurIPS'21 | Voxel grid | CSG tree | Auto |
| BrepNet | CVPR'22 | Point cloud | B-rep edges | Auto |
| Primitive fitting (RANSAC) | Classic | Point cloud | Primitives | Semi-auto |
| DeepCAD | CVPR'21 | Point cloud | Sketch-extrusion | Auto |
| Method | Approach | Input | Output | Speed |
|--------|----------|-------|--------|-------|
| Marching Cubes | Isosurface extraction | TSDF / SDF | Triangle mesh | Fast |
| Poisson Reconstruction | Implicit surface fitting | Oriented points | Triangle mesh | Medium |
| Ball-Pivoting | Growing algorithm | Oriented points | Triangle mesh | Medium |
| Delaunay-based | Tetrahedralization | Points | Triangle mesh | Slow |
| Neural Mesh (DMTet) | Differentiable | Features | Triangle mesh | Slow |
| Method | Venue | Representation | Key Feature |
|--------|-------|---------------|-------------|
| Semantic Foam | CVPR'26 (Highlight) | Volumetric Voronoi mesh | Per-cell semantic feature field; outperforms Gaussian Grouping, SAGA; avoids point-based occlusion/inconsistent-supervision artifacts |
Note: Semantic Foam uses volumetric Voronoi mesh instead of point-based Gaussians for semantic decomposition. When CAD/mesh reconstruction needs semantic labels, consider Semantic Foam as an alternative to Gaussian-based semantic methods (LangSplat, Feature 3DGS, NRGS). The mesh-based representation integrates more naturally with B-rep/mesh pipelines.
| Method | Venue | Domain | Representation | Key Feature |
|--------|-------|--------|---------------|-------------|
| GS-DOT | arXiv'26 | Medical (DOT) | Anisotropic Gaussians | Photon diffusion transport |
| BiSplat-WRF | IEEE ICC'26 Workshop | Wireless (WRF) | Planar 2D Gaussians | Bilinear spatial transformer for EM coupling; adapts GS rendering to angular domain |
| RESPIRE | arXiv'26 (2604.28179) | Medical (bronchoscopy) | Mesh-anchored Gaussians | CT-informed mesh-anchored GS; dynamic bronchoscopy with geometric prior |
| RGS | arXiv'26 (2604.27552) | Medical (CBCT) | Residual wavelet-GS | Spectral decomposition into geometric base + residual detail Gaussians for sparse-view CBCT |
| DiffSoup | arXiv'26 (2603.27151) | Neural Rendering | Triangle soup primitives | Triangle soup as alternative to Gaussians; standard depth testing enables seamless integration with traditional mesh/graphics pipelines |
| FTSplat | arXiv'26 (2603.05932) | Robotics / Simulation | Predicted triangle surfaces | Feed-forward triangle prediction producing simulation-ready mesh; compatible with robotic simulators (Isaac Sim, MuJoCo) |
| IRIS | arXiv'26 (2603.15368) | Neural Fields / Editing | Gaussians-as-proxies for INR | Hybrid Gaussians-as-proxies for implicit neural fields; enables shape editing workflows bridging mesh↔GS conversion |
| D-Rex | SIGGRAPH'26 (2604.27871) | Avatar / Relighting | Decoupled diffusion post-process | Decouples relighting from avatar modeling via LoRA fine-tuned video diffusion; applicable to any white-light avatar system; enables mesh/avatar geometry preservation under novel illumination |
Note on medical mesh-GS methods: RESPIRE and RGS both use hybrid mesh-Gaussian representations for medical imaging. RESPIRE anchors Gaussians to a CT-derived mesh for bronchoscopy (topology from prior), while RGS uses spectral decomposition to separate geometric base (mesh-like) from residual detail (Gaussian-like) for CBCT reconstruction.
Note on triangle/mesh primitive alternatives: DiffSoup and FTSplat represent a growing trend of returning to mesh/triangle primitives within neural rendering frameworks. DiffSoup replaces Gaussians with triangle soup while retaining differentiability, enabling direct use of standard depth testing and z-buffer pipelines. FTSplat produces explicit triangle meshes via feed-forward prediction, bypassing the need for post-hoc mesh extraction. Both methods eliminate the mesh↔GS conversion bottleneck for downstream applications requiring mesh geometry.
Note on hybrid proxy representations: IRIS demonstrates that Gaussians can serve as learnable proxies for implicit neural fields, enabling shape editing that propagates through the proxy to the underlying INR. This is relevant for mesh↔GS conversion workflows where editing operations need to transfer across representation boundaries.
When responding to user queries, use these templates:
## [Mesh/3DGS/CAD] Conversion Recommendation
### Input: [description]
### Output Goal: [description]
### Recommended Pipeline
1. [Step 1]: [Tool/Method] — [Why]
2. [Step 2]: ...
### Expected Quality
- Geometric accuracy: [High/Medium/Low]
- Rendering fidelity: [High/Medium/Low]
- Processing time: [estimate]
### Key Parameters
- [Param]: [Recommended value] — [Reason]
### Potential Issues & Mitigations
1. [Issue] → [Fix]
## [Method A] vs [Method B] for [Task]
| Dimension | Method A | Method B |
|-----------|----------|----------|
| Geometry quality | ... | ... |
| Rendering speed | ... | ... |
| Implementation difficulty | ... | ... |
| Best use case | ... | ... |
### Recommendation: [Winner] because ...
## Diagnosis: [Symptom]
### Root Cause
[Explanation]
### Fix
1. Immediate: [Quick fix]
2. Proper: [Right fix]
### Code Change
[Minimal code snippet if applicable]
If you like it, please star this repo https://github.com/jaccen/Awesome-Gaussian-Skills