Grand Diomande Research · Full HTML Reader

Web Fluid Lab

The web fluid lab is the visual sketchbook. It runs in the browser using Three.js and allows faster iteration on visual grammar than Unity.

Embodied Trajectory Systems research note experiment writeup candidate score 18 .md

Full Public Reader

Web Fluid Lab

The web fluid lab is the visual sketchbook. It runs in the browser using Three.js
and allows faster iteration on visual grammar than Unity.

It is not a replacement for Unity DYK. It is a place to discover what the body
can do to light, fluid, and color — before committing those ideas to the main
performance pipeline.

What It Is

A browser-based visual engine running on Mac4:

  • Three.js scene with body-mask emitters
  • Fluid simulation or advection-based particle fields
  • Color field driven by BodyTruth and movement primitives
  • Multiple visual modes, switchable live
  • Body segmentation from Femto/Mega mask
  • Mocopi-derived motion values feeding effect parameters

The web lab connects to the same BodyTruth / motion data that Unity consumes.
When BodyTruth says the body is present and wave = 0.7, both Unity and the
browser receive the same signal. The visual output is different; the input
is the same.

Current Flagship: Mode D (Duncan Body Oracle)

Mode D tries to make the real body feel dimensional, strange, and embodied
without leaning on fake skeletons.

What Mode D does:
- Takes the Femto/Mega mask and smooths it temporally (suppresses pinholes,
fills edge gaps, reduces isolated sparkles)
- Runs a contour-preserving pass to keep the body's silhouette edge readable
while softening internal noise
- Drives fluid currents and color fields from that processed mask
- The body remains the visual canvas — it is not replaced by geometry

What Mode D does not do:
- Does not render a mocopi avatar
- Does not invent a body when the depth feed is lost
- Does not overlay generic particle effects on top of the performer

Mode D is where the aesthetic rule is most clearly expressed: the real body
is the material; the effects inhabit its space.

The Sketchbook Role

The browser is faster to change than Unity. A new color field, a new fluid
emitter placement, a new mask treatment, or a new mode grammar can be tested
in the browser in minutes. If the idea works, it can be ported to Unity or
kept as a parallel local output.

Good uses for the web lab:
- Trying new visual modes before Unity implementation
- Testing mask smoothing approaches on live Femto/Mega feed
- Comparing mode grammars side-by-side
- Exploring body-space fluid topology (where do emitters belong?)
- Testing BodyTruth-gated effect damping

Not the right tool for:
- The primary live performance output (Unity DYK is the stage)
- Long-running stability testing (browser is not production-hardened)
- pCloud rendering (Unity has the calibrated projection pipeline)

The Same Aesthetic Rules Apply

The web lab must follow the same rules as Unity:

  • Do not fake the performer — the body must come from the real mask or pCloud feed
  • Mocopi can drive motion truth but should not become a rendered avatar
  • When the body is missing, the lab can show a calm field — not an invented dancer
  • False-reactive damping must work the same way it does in Unity
  • Source-aware rate limits must apply — no discontinuous visual jumps

Connection to the Stack

The web lab receives motion data from the same Mac4-local pipeline:
- BodyTruth state (mode, confidence, sources)
- Movement primitives (lateral_sweep, burst, stillness, recovery, etc.)
- Template values (wave, weighted_hold, false_reactive, etc.)
- Mocopi skeleton (joint positions, velocities)
- Femto/Mega body mask (smoothed, contour-preserved)

It does not receive Rekordbox command state. It does not send commands to K11.
Visual exploration is decoupled from DJ control by design.

Advancing Ideas to Unity

When a Mode D idea proves itself in the browser — a specific mask treatment,
a fluid field topology, a color grammar — the path to Unity is:

1. Document the idea in a mode spec file
2. Port the shader logic to Unity ShaderLab or HLSL
3. Wire the same primitive/template inputs to the Unity shader globals
4. Test in Unity Game View at performance resolution
5. Confirm no frame-rate impact on the Game View render path
6. Archive the browser version as reference

The browser and Unity can also run as parallel outputs — Unity as the stage,
browser as an alternate monitor or secondary projection surface.

Promotion Decision

Attach run IDs, datasets, metrics, and reproduction commands.

Source Anchor

LUME-CC/05-output-paths/web-fluid-lab.md

Detected Structure

Method · Evaluation · Architecture