An analysis of the behaviour of the digital rain in The Matrix

The purpose of this document is to share an understanding of the behaviour and appearance of the iconic digital rain visual effect used in The Matrix. This can be used to provide a guide of sorts when attempting to emulate the effect.

This document is a work in progress:

The sample used for study is that in the opening sequence of the first movie.

The opening sequence, The Matrix, 1999

This analysis does not include other samples for the following reasons:

Glossary

Animation

Falling code

At first glance the glyphs appear to move down from the top to the bottom of the screen, however, the first thing to notice when isolating a single string is that the glyphs themselves do not descend:

Glyphs that remain in place

Except for changing glyphs, they remain in place, and different glyphs appear beneath them.

Additionally, it appears that the strings don’t always originate from the top of the screen:

Glyphs that appear lower down the screen

It looks as though new strings are being created at points lower down the screen. However, the pauses in time between these strings appearing suggest that invisible characters exist. For instance, if we were to insert a placeholder character in locations which we predict a character for that frame, we can see the pattern:

Evidence of invisible characters

We can therefore assume that the first of the visible glyphs in this string did not spawn in the middle of the screen, but was also preceded by invisible characters.

Changing glyphs

Some glyphs remain static for three frames, and then change into another glyph:

Changing glyph

During a single frame, the new and old glyph occupy the same space, each at 50% opacity. All changing glyphs change on the same frame. Some strings consist entirely of changing glyphs.

Deletion strings

Deletion strings only generate invisible characters. Unlike regular strings, deletion strings can appear over the top of existing strings. While we cannot see the deletion string itself, we can see evidence of it when an existing string disappears:

Evidence of deletion strings

Highlighted glyphs

Roughly 1 in 5 strings have highlighted glyphs. Only a single glyph of a string is highlighted at a given time, and that glyph is leading glyph of the string:

Evidence of highlighted glyphs

The only exception to the above rule of only a single glyph of a string being highlighted at a given time, is that every so often, all highlighted glyphs will stammer at the same time. The stammer causes strings with highlighted glyphs to fall behind other strings by a single row:

Highlight glyph stammering

Frame Leading glyph Second to leading glyph String length
0 Highlighted Normal 1
1 Partially highlighted Partially highlighted 2
2 Highlighted Normal 2
3 Highlighted Normal 3

Composition

Glyphs used

Kangxi radical

Glyph Name Screenshot
Han character Han character

Katakana

These glyphs are flipped horizontally.

Glyph Name Screenshot
ha syllable ha syllable
hi syllable hi syllable
shi syllable shi syllable
tsu syllable tsu syllable
u syllable u syllable
long-vowel long-vowel
na syllable na syllable
mi syllable mi syllable
mo syllable mo syllable
ni syllable ni syllable
sa syllable sa syllable
wa syllable wa syllable
o syllable o syllable
ri syllable ri syllable
ho syllable ho syllable
ma syllable ma syllable
e syllable e syllable
ki syllable ki syllable
mu syllable mu syllable
te syllable te syllable
ke syllable ke syllable
me syllable me syllable
ka syllable ka syllable
yu syllable yu syllable
ra syllable ra syllable
se syllable se syllable
ne syllable ne syllable
su syllable su syllable
ta syllable ta syllable
nu syllable nu syllable

Arabic numerals

There doesn’t appear to be separate characters for 6 and 9. They either share the same character or one is missing.

Numeral Screenshot Transformation
0 0 None
1 1 None
2 2 Flipped horizontally
3 3 Flipped vertically
4 4 None
5 5 Flipped horizontally
6 6 Flipped vertically
7 7 None
8 8 None
9 9 Flipped horizontally

English alphabet

Glyph Screenshot
Z Z

Other

Glyph Name Screenshot
* asterisk asterisk
+ plus plus
: colon colon
= equals equals
. period period
< less-than less-than
> more-than more-than
" double quotation double quotation
vertical bar vertical bar
¦ broken bar broken bar
_ underscore underscore