---
id: "visual-hull"
title: "Visual Hull (Shape from Silhouette)"
aliases: [shape-from-silhouette, space carving (silhouette)]
domain: "capture"
stage: "capture"
realtime: "interactive"
platforms: [cpu, cuda]
year_introduced: 1994
inputs: [photos, camera-poses]
outputs: [voxels, mesh]
style: "photoreal"
dynamic: "both"
cost: "cheap"
authority: "Laurentini, 1994"
url: "https://texelatlas.vercel.app/t/visual-hull/"
sources_verified_at: "2026-11-29"
---
# Visual Hull (Shape from Silhouette) (Laurentini, 1994)

> Reconstructs a conservative 3D shape as the intersection of the viewing cones back-projected from silhouettes in several calibrated views.

## 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

## 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 use it

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)](https://texelatlas.vercel.app/t/multi-view-stereo-patchmatch.md) or [NeuS](https://texelatlas.vercel.app/t/neus.md) when concavities and surface detail matter. Use [Segment Anything (SAM)](https://texelatlas.vercel.app/t/segment-anything.md) or [SAM 2](https://texelatlas.vercel.app/t/sam2.md) to produce the masks it needs.

## Cost

cheap — Voxel projection tests are embarrassingly parallel and cheap on GPU; dominated by segmentation quality, not compute.
Measured GPU Weight: 64.42× baseline (extreme) — 1.9969 ms median / 2.0548 ms p95 on Tesla T4/PCIe/SSE2 @ 1920x1080 (opengl-timer-query).
Ada L4 scaling: 45.65× baseline (heavy) — 0.7258 ms median (2.75× faster on L4).
Ampere A100 scaling: 39.32× baseline (heavy) — 1.1323 ms median (1.76× faster on A100).

## Failure modes

- 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

## Dataflow

- Inputs: photos, camera-poses
- Outputs: voxels, mesh
- Platforms: cpu, cuda

## Presets

### Visual Hull (Shape from Silhouette) — 3-camera coarse intersection (left) vs N-camera carved hull (right) (glsl-fragment; rendered 2026-11-30)

```json
{
  "P_CAM_COUNT": 12,
  "P_CONE_VIS": 0.75,
  "P_ROT_SPEED": 0.65,
  "P_SPLIT": 0.48
}
```

```glsl
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.

## Combines with

- [Segment Anything (SAM)](https://texelatlas.vercel.app/t/segment-anything.md): SAM supplies per-view silhouettes that the hull intersects.

## Combination ideas

- [Depth-feathered soft-particle smoke wrapping live visual-hull silhouettes](https://texelatlas.vercel.app/ideas/visual-hull-soft-particle-shroud/)

## Sources

1. [primary] A. Laurentini (1994) The visual hull concept for silhouette-based image understanding. IEEE Transactions on Pattern Analysis and Machine Intelligence. https://doi.org/10.1109/34.273735 (verified via crossref on 2026-11-29)

## Cite this entry

Texel. "Visual Hull (Shape from Silhouette)." https://texelatlas.vercel.app/t/visual-hull/ (accessed 2026-12-01).
