Visibility — the virtual camera over the map

The deepest thing voxeled knows about a piece isn't where each LED is, or which way it faces — it's whether that LED is actually seen from a given vantage. A bare point cloud (Chromatik) can't ask this; it threw the orientation away and never had the geometry-as-a-solid to occlude with. This is voxeled's level-3 space-awareness, and it's exactly what the Thread sculpture needed: "the LED strips would come in and out of view depending on the camera position."

Three levels

  1. Position — f(x,y,z,t). Spatial, but blind to how light leaves the piece. (Everyone.)
  2. + Orientation — respect each LED's emission normal: front-face looks, surface flow, view-angle falloff. (voxeled's normal.)
  3. + Visibility — respect what's actually seen from a vantage: self-occlusion, silhouette, "which strands read from where the audience stands." (This module.)

One primitive, three uses

All three are the same operation — project the map through a camera and z-test — read differently:

usewhat it isin voxeled
occlusion / facinglight only what the audience seespatterns.spotlight
projection-mappingsample a 2D frame onto the visible surfacepatterns.projector / projectTexture
camera automappingthe inverse: recover positions from where LEDs land in a real camerafuture (same math)

That collapse is the point: build the virtual camera once and occlusion, the VJ framebuffer jack-in, and camera automapping all fall out of it.

The primitive (src/visibility.mjs)

It's dependency-free, deterministic, and cheap: ~1.9 ms/frame over the 9 216-point two-heart rig (≈500 fps) — a whole-scene depth pass cached once per frame (ctx.frame), so per-pixel patterns just read the result.

See it

VOX_PATTERN=spotlight node examples/mobius-heart/run.mjs   # occlusion: LEDs wink in/out as it orbits
VOX_PATTERN=projector node examples/mobius-heart/run.mjs   # a texture projected onto the visible surface

spotlight lights only the camera-visible, front-facing pixels (grazing angles dimmer) as the vantage orbits — the Thread "in and out of view" effect, computed instead of hand-managed. projector maps a scrolling band through the same camera onto the piece, occlusion respected — a preview of a VJ jacking a framebuffer into the house.

Limits / next