Home▸Physics & Mechanics▸Jack-o'-Lantern: Light Through Carved Walls

Jack-o'-Lantern: Light Through Carved Walls (3D shell)

A 3D carved pumpkin shell where candlelight transmission through the flesh follows real Beer-Lambert attenuation — drag on the surface to carve a design and watch the glow map recompute live from local wall thickness.

Physics & Mechanics3DModerate60 FPS📱 Mobile-adapted⇄ 2D version
3d-jack-o-lantern-light-scattering ↗ Open standalone

A full 3D carved pumpkin shell whose glow is computed per-fragment from a live thickness texture: turn on carve mode and drag directly on the surface to remove flesh, and a custom shader recomputes transmitted candlelight from the real Beer-Lambert exponential law at every point, blending a sharp direct term with a Gaussian-blurred scattering term that reproduces how translucent flesh spreads light sideways before it exits. Unlike the 2D cross-section, thickness here varies across the full curved surface rather than only around one circumferential slice, and scattering is modelled as a genuine spatial blur of the thickness field rather than a post-hoc softening of the rendered brightness.

⚙ Under the hood

A 3D carved pumpkin shell where candlelight transmission through the flesh follows real Beer-Lambert attenuation — drag on the surface to carve and watch the glow map recompute live from local wall thickness.

light-attenuationopticsbeer-lambertphysicshalloween

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)