Sensory Space: immersive light art, built to lower the risk of seizures
For some people with epilepsy, flashing light can trigger a seizure. Sensory Space, a generative artwork of slow light and sound, sends every frame through a limiter on the GPU, and its flash test has to catch a flash whenever the limiter is switched off.
Live at sensory-space.org; source at jason-chao/sensory_space (MIT).
Sensory Space is a generative artwork of slow light and sound, made to support well-being, with particular care for people on the autistic spectrum and others who need sensory support. It runs in a browser, on a phone or through a projector, and it is live now.

For some people with epilepsy, flashing light can trigger a seizure. Epilepsy is far more common among autistic people (a median of about 12%, against under 1% in the general population), and a projector fills most of the visual field. So before writing the first scene, I set one rule: the picture must never flash, whatever a scene or a bug of mine asks for.
One limiter for every scene
None of the twenty-one scenes contains any safety code. Every frame goes through one limiter, the last stage on the GPU before the screen, and whatever a scene asks for, the limiter decides how fast the picture may actually change.

WCAG, the web’s accessibility standard, counts a flash as a pair of opposing changes in brightness of 10% or more, and allows at most three in a second. At the limiter’s pace, a region can manage at most about 1.75. A faster change turns into a dissolve. That lowers the risk, though no software can remove it for everyone.
The limit has to work region by region. Two patches can flash in opposite directions while the average brightness of the frame stays perfectly still, so a limiter that watched the average would let a strobing chessboard through. Colour can also flash on its own. Two saturated hues alternating at the same brightness pass any brightness check, so the limiter paces colour changes at the same rate.

A test that must fail
The flash check drives the real renderer through eleven worst cases, such as brightness slammed between 0 and 1 fifteen times a second, the scene switched every 100 milliseconds, and every control randomised every two frames. It counts flashes in each of 144 regions, using WCAG’s definition.
The twelfth case switches the limiter off, and it must fail. If it ever passes, the check can no longer see a flash, and the whole run fails. The whole check runs in GitHub Actions on every push.

Flashing that came from the projector
A few users reported two colours flashing in the colour wash, the quietest scene of all. When I measured it, brightness and colour changed by less than half a percent between frames. The flashing most likely came from the projector. A flat, dark field of colour makes a projector’s auto-iris keep adjusting the exposure, and makes the colour wheel of a single-chip DLP projector visible. I gave the scene soft texture, so a projector always has a picture to work with.
The scene that felt spooky
The fractal garden passed every check, but some users found it spooky: a dark, speckled interior, fine edges that shimmered, and a form that never settled. I softened it, viewers still found it uneasy, and I withdrew it. A limiter can catch a flash, but only viewers could tell me that a picture felt wrong.

New scenes, and touch
I visited teamLab’s immersive exhibitions and came away inspired. Five new scenes grew out of that: lamps that pass their light to their neighbours when touched, flowers that bud, open and scatter, water drawn as flowing lines of light, brush strokes drawn slowly in space, and waves of colour through a deep lattice of points. Two more came later: rolling waves, drawn in the manner of the seas in Japanese ukiyo-e woodblock prints, and soft dots at many depths, after Yayoi Kusama’s infinity rooms.


Pressing and dragging leaves a wake that each scene answers in its own way. Lava follows the hand and splits, fireflies part and drift back, and lamps light up along the path.

Brainwaves as input, within limits
For custom installations, Sensory Space can also take signals from an electroencephalography (EEG) headband. They may tint the colour and the tone, but they can never move the brightness or the volume, and movement slows the scene down, since a loop that speeds up with agitation could escalate it. Nothing is scored. The coupling is weak on purpose, because a single dry electrode on the forehead mostly picks up blinks and facial muscle. The feature is off on the public site.
Try it
It works on a phone too: sensory-space.org.

- Try it: sensory-space.org
- Source code: github.com/jason-chao/sensory_space