MatrixRain

The Matrix's digital rain, brought into your room.

Wave your hand through it, and it splashes like water

THE IDEA

It started in my terminal. I'd run cmatrix and watch the green code rain from The Matrix pour down my screen; it was so cool.


One day I caught myself wondering: what if it didn't stay on the screen? What if the rain fell around me and I could reach out and catch it, the way you'd catch real rain in your hand?


That question was the whole project. So I brought the digital rain into Apple Vision Pro.

DEVELOP TOOLS

DEVELOP TOOLS

  • Xcode(SwiftUI)

  • Reality Kit

  • AR Kit HandTracking

  • Reality Composer Pro

  • Apple Vision Pro

The Matrix's digital rain, brought into your room.

Wave your hand through it, and it splashes like water

The Matrix's digital rain, brought into your room.

Wave your hand through it, and it splashes like water

System architecture

System architecture

The Challenge, Part 1 Filling the room with rain

The Challenge, Part 1 Filling the room with rain

The Challenge, Part 1 Filling the room with rain

Before anything could be touched, the rain had to exist; falling all around the room, not just floating on a screen.

I started by generating the characters themselves. First, I wrote a Python script that procedurally builds a sprite sheet of random characters with controlled spacing between columns.

From there, I mapped the sprite sheet onto planes and drove the falling animation with a custom Shader Graph pipeline I built node-by-node in Reality Composer Pro. It was my first time in the tool, so I leaned on AI to move quickly learning the node system and iterating through shader variations far faster than I could have alone. The result: dense, continuous digital rain that fills the space on the GPU, cheaply enough to cover an entire room.

The Challenge, Part 2 Making the rain touchable

The Challenge, Part 2 Making the rain touchable

The Challenge, Part 2 Making the rain touchable

The room was full of rain. But it was pure GPU animation, with nothing real to touch.My hand would pass straight through it.

The obvious fix was to make every character a real physics object. But with hundreds of them falling at once, the frame rate would collapse. So I was stuck between two dead ends: an effect that looks real but can't be touched, or one that can be touched but destroys performance.

The fix was to stop treating it as one problem, and split the rain in two. Most of the rain stays as shader animation. But the characters near your hands become real RealityKit entities, with mass and collision, their positions tracked live through ARKit hand data. As your hand moves through the space, only the rain it can actually reach gets promoted to real physics impulses, splashes, the works.

So the rain you see is mostly an illusion. But the rain you touch is real physics.