Visual Hull (Shape from Silhouette)
Reconstructs a conservative 3D shape as the intersection of the viewing cones back-projected from silhouettes in several calibrated views.
Also known as shape-from-silhouette, space carving (silhouette)
In the family Capture, reconstruction & splatting, silhouette reconstruction
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | Not applicable | Offline reconstruction/generative method, not an engine feature. |
| Unity | None found | |
| Unreal 5.7 | None found | External multi-view silhouette reconstruction method; not built into Unreal Engine. |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Segment the object in each calibrated image to get a binary silhouette. Every silhouette defines a cone from the camera centre through the object's outline, and the object must lie inside all of them. Voxel carving tests each voxel by projecting it into every view and discarding it if it falls outside any silhouette; polyhedral methods intersect the cones exactly. The result is the visual hull, the largest shape consistent with all silhouettes. It always contains the true object and cannot represent concavities invisible in silhouettes. More views tighten the hull. It runs in real time for multi-camera rigs, which is why it was used for live performance capture, and often serves as initialisation for photo-consistency refinement.
When to choose it
Reach for it when
- need coarse shape from turntable photos with masks
- calibrated multi-camera rig should yield a quick 3d volume
- initialise a mesh from silhouettes
- bound a neural field with a robust rough shape
- shape from outlines in several views
Choose it for fast, robust coarse shape from calibrated multi-camera rigs or turntable captures with clean masks, e.g. initialising a mesh or bounding a neural field. Prefer Multi-View Stereo (PatchMatch, COLMAP) or NeuS when concavities and surface detail matter. Use Segment Anything (SAM) or SAM 2 to produce the masks it needs.
Field marks
- Concavities (bowls, eye sockets) are filled in because silhouettes cannot see them
- Few views leave phantom volumes (ghost blobs) outside the true shape
- A single bad mask carves a hole through the whole model since intersection is unforgiving
- Calibration error shaves thin parts such as limbs and fingers
Presets
Visual Hull (Shape from Silhouette) — 3-camera coarse intersection (left) vs N-camera carved hull (right)
{
"P_CAM_COUNT": 12,
"P_CONE_VIS": 0.75,
"P_ROT_SPEED": 0.65,
"P_SPLIT": 0.48
}Show GLSL (136 lines)
const float P_CAM_COUNT = 12.0; // P Camera Count N [3.0, 18.0, 1.0]
const float P_CONE_VIS = 0.75; // P Camera Ring Vis [0.0, 1.5, 0.05]
const float P_ROT_SPEED = 0.65; // P Spin Speed [0.0, 2.2, 0.05]
const float P_SPLIT = 0.48; // P 3-Cam / N-Cam Split [0.0, 1.0, 0.02]
mat2 rot2(float a) { float c = cos(a), s = sin(a); return mat2(c, -s, s, c); }
// 2D projected silhouette SDF of a sculpted trophy/chalice seen from camera azimuth angle phi
// Back-projecting each camera's silhouette creates a 3D generalized cylinder (viewing cone)!
// Intersecting N viewing cones = max_k(sdSilhouette_k(p)) = EXACT Visual Hull!
float silhouetteCone(vec3 q, float phi) {
// Project 3D point q into camera k's image plane (x_cam, y_cam)
float xCam = q.x * cos(phi) + q.z * sin(phi);
float yCam = q.y;
// True object silhouette profile: wide flared bowl at top, narrow stem, wide pedestal foot
float profileR = 0.24
+ 0.24 * exp(-pow((yCam - 0.34) / 0.22, 2.0))
+ 0.22 * exp(-pow((yCam + 0.44) / 0.14, 2.0))
- 0.11 * exp(-pow((yCam + 0.04) / 0.18, 2.0));
// Subtle non-axisymmetric handles protruding at phi=0 and phi=pi
float handleProj = abs(cos(phi)) * 0.18 * exp(-pow((yCam - 0.28) / 0.16, 2.0));
float halfW = profileR + handleProj;
float dX = abs(xCam) - halfW;
float dY = abs(yCam) - 0.56;
return max(dX, dY);
}
// Exact Visual Hull = intersection (max) of N back-projected viewing cones around the equator!
float mapVisualHull(vec3 p, int nCams, float spin) {
vec3 q = p;
q.xz = rot2(spin * 0.55) * q.xz;
q.yz = rot2(0.32) * q.yz;
float dHull = -1e5;
for (int k = 0; k < 18; k++) {
if (k >= nCams) break;
float phi = float(k) / float(nCams) * 3.1415926;
dHull = max(dHull, silhouetteCone(q, phi));
}
return dHull * 0.85;
}
vec3 calcNormal(vec3 p, int nCams, float spin) {
vec2 e = vec2(0.0025, 0.0);
return normalize(vec3(
mapVisualHull(p + e.xyy, nCams, spin) - mapVisualHull(p - e.xyy, nCams, spin),
mapVisualHull(p + e.yxy, nCams, spin) - mapVisualHull(p - e.yxy, nCams, spin),
mapVisualHull(p + e.yyx, nCams, spin) - mapVisualHull(p - e.yyx, nCams, spin)
));
}
vec3 aces(vec3 x) {
x = max(x, 0.0);
return (x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float screenX = fragCoord.x / max(iResolution.x, 1.0);
float split = clamp(P_SPLIT, 0.0, 1.0);
bool isMany = screenX >= split;
int nCams = isMany ? int(clamp(floor(P_CAM_COUNT + 0.5), 3.0, 18.0)) : 3;
float coneVis = clamp(P_CONE_VIS, 0.0, 1.5);
float spin = iTime * max(P_ROT_SPEED, 0.0);
vec3 ro = vec3(0.0, 0.36, 2.48);
vec3 ta = vec3(0.0, -0.02, 0.0);
vec3 fwd = normalize(ta - ro);
vec3 right = normalize(cross(fwd, vec3(0.0, 1.0, 0.0)));
vec3 up = cross(right, fwd);
vec3 rd = normalize(fwd * 1.52 + right * uv.x + up * uv.y);
vec3 col = mix(vec3(0.024, 0.034, 0.056), vec3(0.068, 0.088, 0.140), smoothstep(-0.55, 0.55, uv.y));
// Draw the calibrated multi-camera capture ring on floor plane y = -0.58
if (rd.y < -0.01) {
float tFlr = (-0.58 - ro.y) / rd.y;
if (tFlr > 0.0 && tFlr < 12.0) {
vec3 pf = ro + rd * tFlr;
float rFlr = length(pf.xz);
float ringLine = smoothstep(0.026, 0.006, abs(rFlr - 1.15));
col += vec3(0.24, 0.56, 0.88) * ringLine * 0.65 * min(coneVis, 1.2);
// Camera frustum markers around the capture ring (3 on left, N on right!)
vec3 qf = pf;
qf.xz = rot2(spin * 0.55) * qf.xz;
for (int k = 0; k < 18; k++) {
if (k >= nCams) break;
float phi = float(k) / float(nCams) * 6.2831853;
vec2 cPos = vec2(cos(phi), sin(phi)) * 1.15;
float dCam = length(qf.xz - cPos);
col += vec3(1.0, 0.84, 0.30) * smoothstep(0.065, 0.022, dCam) * 0.90 * min(coneVis, 1.2);
// Sightline ray from camera toward hull center
float proj = clamp(dot(qf.xz, cPos) / (1.15 * 1.15), 0.0, 1.0);
float dRay = length(qf.xz - cPos * proj);
col += vec3(0.20, 0.78, 0.94) * smoothstep(0.014, 0.003, dRay) * 0.25 * min(coneVis, 1.2);
}
}
}
// Raymarch the carved Visual Hull intersection of N silhouette cones
float t = 0.0;
bool hit = false;
for (int i = 0; i < 68; i++) {
float d = mapVisualHull(ro + rd * t, nCams, spin);
if (d < 0.002) { hit = true; break; }
t += d;
if (t > 8.0) break;
}
if (hit) {
vec3 p = ro + rd * t;
vec3 n = calcNormal(p, nCams, spin);
// Highlight polyhedral facet seams where different camera viewing cones intersect
vec3 nA = calcNormal(p + vec3(0.014, 0.0, 0.0), nCams, spin);
vec3 nB = calcNormal(p + vec3(0.0, 0.0, 0.014), nCams, spin);
float facetEdge = smoothstep(0.14, 0.48, (1.0 - dot(n, nA)) + (1.0 - dot(n, nB)));
vec3 l1 = normalize(vec3(0.58, 0.84, 0.52));
vec3 l2 = normalize(vec3(-0.70, -0.22, 0.50));
float diff = max(dot(n, l1), 0.0) * 0.85 + max(dot(n, l2), 0.0) * 0.26;
float spec = pow(max(dot(n, normalize(l1 - rd)), 0.0), 42.0);
vec3 alb = isMany ? vec3(0.20, 0.78, 0.74) : vec3(0.88, 0.54, 0.28);
col = alb * (0.28 + 0.82 * diff) + vec3(0.95) * spec * 0.45;
col = mix(col, vec3(1.0, 0.92, 0.45), facetEdge * 0.72);
}
float sep = smoothstep(0.0035, 0.0008, abs(screenX - split));
col = mix(col, vec3(0.95, 0.97, 1.0), sep);
fragColor = vec4(pow(clamp(aces(col), 0.0, 1.0), vec3(1.0 / 2.2)), 1.0);
}Attribution: MIT — written for this index.
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| visual-hull-live | Tesla T4 1920x1080 | 64.4× baseline (extreme) · 2.00 ms / 2.05 ms | opengl-timer-query · 36 frames · GPU Weight Atlas · Colab T4 sweep |
| visual-hull-live | NVIDIA L4 1920x1080 | 45.6× baseline (heavy) · 0.726 ms / 0.764 ms · 2.8× faster on L4 | opengl-timer-query · Cross-architecture validation |
| visual-hull-live | NVIDIA A100-SXM4-40GB 1920x1080 | 39.3× baseline (heavy) · 1.13 ms / 1.15 ms · 1.8× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
From the citation graph (Crossref reference lists): cited by Sweet-Spot Anamorphic Geometry & Sutherland-Hodgman Sightline Clipping, Neuralangelo.
Crosses
- Depth-feathered soft-particle smoke wrapping live visual-hull silhouettes: Carving an instant multi-camera visual hull of a moving actor or sculpture supplies a real-time 3D proxy depth buffer that lets soft-particle mist, steam, or glowing dust wrap seamlessly around live bodies without hard billboard clipping lines.
- Segment Anything (SAM): SAM supplies per-view silhouettes that the hull intersects.
Sources
- primaryA. Laurentini (1994). The visual hull concept for silhouette-based image understanding. IEEE Transactions on Pattern Analysis and Machine Intelligence.Verified via crossref · 2026-11-29doi:10.1109/34.273735