
Sleep Ecology: A Realtime Journey Through the Collective Dream
Sleep Ecology is an immersive data visualization piece that translates quantitative sleep study data into a living, breathing virtual forest in real-time. Sleep cycles directly controlled the growth and decay of procedurally generated flora, creating a visceral data visualization. Anchored by a real-time timestamp, the piece invites you to witness the night’s emotional currents as they shape a living ecosystem from midnight to dawn.
You can find the original dataset used here.
My role - designer and developer
Time frame - feb to may 2025
Skills - Unreal Engine 5, Blueprints, TouchDesigner, Python, OSC Protocols, L-Systems, Data Handling & Visualization, 3D Asset Pipeline (materials, texturing, optimization), Lighting & Environment Design, Post- Processing

Concept
From REM Sleep to a Living Forest
Sleep is the body's most fundamental procedural system; a nightly algorithm of cycles, stages, and rhythms that governs restoration, memory, and renewal. This project asks: what happens when that biological code is translated into living code?
Using L-systems, a formal grammar for modelling plant growth, I constructed a virtual forest where every branch angle, elongation rate, and bloom threshold is governed not by random noise, but by the sleep architecture and emotional landscape of 100 human participants. REM cycles trigger flowering. Deep sleep slows growth. Awake states introduce wilting. And beneath it all, each plant species is bound to a specific emotional state reported by participants throughout the night.
The result is a landscape where human unconsciousness becomes the invisible hand shaping a digital ecosystem: a meditation on the shared procedural logic underlying all living systems.
This piece explores the collective unconscious as a living ecosystem. Based on a longitudinal REM-sleep study, it translates time-stamped dream reports and emotional valences into a dynamic visual environment. Each of the four plant species represents a specific emotional state:
Pale pink Cosmos – energizing positivity
White Yarrow – calming serenity
Crimson Astilbe – volatile negativity
Blue Delphinium – quiet melancholy
As participants awaken during the study, their associated emotions recede, and the corresponding flora fades. Over time, lingering emotions grow dominant, gradually reshaping the forest by dawn. A real-time clock anchors the piece, allowing viewers to revisit and observe the evolving emotional tides throughout the night.
Sleep Ecology reflects on how individual dreams contribute to a shared emotional landscape. By visualising fleeting feelings as living elements within an ecosystem, it prompts reflection on which emotions persist beyond sleep, and how they influence our waking lives.

Procedural Botany
3D Asset Design
Most plant species were modeled using L-systems, a mathematical rewriting system that allowed precise control over their form and growth behavior over time.
Importing raw texture maps from Quixel Megascans, I built each material graph from scratch in Unreal Engine 5, layering custom translucency, wind-driven vertex animations, and procedural shaders to achieve a surreal, living quality. Additional foliage and environmental elements were brought in via Quixel assets to complete the immersive forest.



3D Asset Creation
(L-System Scripting, UV Mapping, Optimization)
Touchdesigner
Assigning Material Slots, Making Game Engine Ready
Blender
Material & Texturing, Animation
Unreal Engine 5
L-Systems
Most plant species were modeled using L-systems, a mathematical rewriting system that allowed precise control over their form and growth behavior over time.This was done in Touchdesigner




Blender
I exported 9 versions of each plant from TouchDesigner, each captured at a different growth stage. I then used Blender to prepare the models for the game engine, specifically to assign material indices for the petals, stems, and leaves.




































Unreal Engine
I imported each model as a static mesh. I then created a master material to more effectively paint each flower's leaves, stem and petals.This included settings for surface imperfections and wind animations for more realistic designs, as well as emission settings for the dreamlike aesthetic.


Master Material Graph on Unreal Engine 5
Process for
Data Handling
Hover for annotations.
Each flower that appears is born from a participant's emotional state during REM sleep. When a person wakes, the plant representing their emotion fades. To simulate the slow emergence of dreams, plants grow steadily every hour, creating an organic rhythm of appearance and disappearance.
I used TouchDesigner to process and refine the time-stamped data in real time, feeding it into an internal clock that drives the forest’s evolution. This data is then sent to Unreal Engine 5 via an OSC server, where it controls plant spawning, growth, and removal, as well as the UI.
To enhance the dreamlike quality of the environment, I created a soft, glowing firefly Niagara system.
TOUCHDESIGNER -- DATA PROCESSING
Raw Input
Participant ID · wake timestamp · emotion (1 of 20) · intensity 1–4
Emotion categorisation
20 emotions collapsed into 4 — calm, energising, angry, introspective
Flower count formula
Participants × intensity multiplier, then normalised as ratio of a tunable total
art-directable density
Custom internal clock
Speed-scalable, resettable for debugging · increments hourIndex each hour · drives forest maturity over midnight → dawn arc
Wake event
When clock matches a participant's timestamp, their flowers are immediately discarded
destructive trigger
─── OSC BROADCAST ───
OSC SERVER ── VARIABLE BRIDGE
Variables transmitted on each update
hours minutes hourIndex count_calm count_energising count_angry count_introspective
─── BLUEPRINT RECEIVE ───
UNREAL ENGINE 5 — REAL-TIME RENDERING
Clock UI
Participant ID · wake timestamp · emotion (1 of 20) · intensity 1–4
Instanced plant system
Each emotion count drives its own instanced static mesh pool
Wake event collapses the relevant instances
Growth stage selector
hourIndex maps to one of 8 mesh variants per emotion — from seedling at index 0 to full bloom at index 8
hourIndex → mesh variant
0
1
2
3
4
5
6
7
8

I finally merged all this data, including the timestamp and hour index, and fed it to the OSC server for a final,
clean output.
In Unreal, I created a blueprint to import the data and route each channel to its appropriate function: the emotion data and hour index to their respective flower instancing blueprints, and the timestamp to the UI widget.
Each flower instancing function updated the total number of flowers, instancing and removing meshes accordingly, whenever the hour index was triggered. I also created editable variables, such as flower distance and scale ranges, for easier customization directly in the viewport.

I imported the raw study data, essentially a record of each participant's emotional intensity across 20+ feelings (rated 0–4), alongside their wake-up time. I then parsed and organized this into 8 lists: 4 for generally positive feelings and 4 for negative, one per intensity level. This structure made it easy to compare patterns and experiment with different visualization approaches.


I then built an internal clock, programmed to trigger a system update whenever its time matched one of the timestamps from the raw data, i.e. when it reached the wake-up time of a participant. Each trigger would update the vegetation and flower growth in the visualization, drawing from the corresponding data lists.


Instancing the vegetation based on the amount of actual data points turned too messy. For a more intuitive visualization for the viewer, I instead instanced the ratio of each feeling based on an arbitrary total. This enabled me to control the scale of the garden to my own preference, while keeping the data accurate.
I also condensed the 20 feelings from the study into 4 categories I found most interesting: high energy positive, low energy positive, high energy negative, and low energy negative. This helped ensure the project was as visually readable as it was compelling.
Technical Pipeline
Hover for annotations.
Below is a simplified layout of the technical pipeline, which realied heavily on visual scripting (Touchdesigner nodes and Unreal Engine Blueprints), Python, and an OSC server. This project was initially only meant to be in Touchdesigner. However, I later on realized that this would severly limit the project's possibilities in turn
The result was to
Worldbuilding & Optimization
Use of Quixel for extra ssets, foliage
Mission: make forest more dreamlike, asnwer: niagara system, heavy use of exponential fog, god rays
optimization: virtual textures?
