Skip to content
Dream Engine

Documentation

Dream Engine docs

Research narrative stack — signal capture, axis interpretation, scene-graph visualization — plus the Subconscious Motion Field Reconstruction demo method.

Capture

How Dream Engine ingests neural and sleep-stage features without claiming raw dream footage.

  • Inputs arrive as NeuralFeatureBatch — typically Neurodecode latents (latents.npy) or a synthetic generator for offline demos.
  • Stage bias (wake / n1 / n2 / n3 / rem) shapes band profiles; trial index selects which sample drives the scene.
  • Capture is research-oriented: consent-gated partner data only. No clinical acquisition path ships in the open prototype.
  • NeuralFeatureBatch
  • Neurodecode bridge
  • Synthetic smoke configs

Interpretation

Axes projection turns features into continuous dream-control dimensions under sensory-safe policy.

  • axes_from_features maps dynamics to lucidity, motion, depth, and chroma — continuous controls, not semantic dream labels.
  • SensoryPolicy clamps intensity, motion, chroma, and forbids flash by default (allow_flash=False).
  • Interpretation is narrative scaffolding for collaborators: inspectable axes, never a reconstruction of private imagery.
  • DreamAxes
  • SensoryPolicy
  • Stage → palette mapping

Visualization

Portable scene graphs render in Three.js with matplotlib QA — engine-agnostic JSON first.

  • build_scene_graph composes terrain, sky, orbs, ribbons, arches, and particles into SceneGraph v1.
  • Three.js is the interactive backend; matplotlib produces CI-safe previews without WebGL.
  • export_interlace_bundle emits demo-bundle/v1 for Interlace lab slots and static viewer hosting.
  • SceneGraph v1
  • Three.js viewer
  • demo-bundle/v1

Subconscious Motion Field Reconstruction

A transparent, client-side method that maps multi-modal sleep-state proxies into an inspectable vector field with attractor basins.

This section describes the demo shipped on the Dream Engine product page. All inputs are synthetic and generated in the browser. The pipeline is structured so real EEG, HRV, respiration, and hypnogram streams can replace the synthetic generator without changing the feature → motion → field contracts.

1. Synthetic signals

A seeded PRNG produces discrete time series (default 120 steps). At each step we emit EEG-like band amplitudes (delta, theta, alpha, beta), an HRV index, breath cadence, and a categorical sleep stage (N1, N2, N3, REM). Stage schedules follow a repeating light → deep → REM hypnogram; band and autonomic profiles are stage-conditioned with light temporal smoothing so scrubbing remains continuous.

2. Feature extraction

For each time t we form a feature vector F(t): normalized band amplitudes; short-window HRV volatility; breath irregularity (residual vs local mean); and sleep-stage encoding (numeric stage value plus one-hot channels). Extraction is a pure function of the signal tensors — no learned weights in the demo path.

3. Motion parameter mapping

F(t) maps to direction (dx, dy, dz), magnitude, turbulence, and attractor strength. The rules are intentional and readable: high theta with REM lifts and swirls the flow with higher turbulence; high delta with N3 sinks into slow, stable downward motion; HRV volatility adds lateral jitter; irregular breath increases local chaos. Viewer modality toggles zero out gated channels; intensity sliders scale REM influence, autonomic volatility, and global turbulence.

4. Motion field and attractors

A 16×16 lattice in normalized space receives a vector at each node: base flow from the global motion parameters, a mild circulatory curl, seeded turbulence, and a pull toward active attractors. Attractors are archetype loci — REM cluster, deep sleep basin, autonomic ridge, N2 bridge — whose strength rises when feature combinations match. The field is a list of per-node vectors plus attractor metadata, not a rendered “dream image.”

5. Interactive viewer

The product viewer scrubs time, toggles EEG / HRV / breath / sleep-stage influence, and exposes REM intensity, autonomic volatility, and subconscious turbulence. Hovering a region reports the local motion vector and key features; attractor markers show basin labels. Everything runs client-side with no backend dependency.

  • MotionFieldSignals
  • extractFeatures
  • mapFeaturesToMotion
  • buildMotionField
  • AttractorPoint