dmscene Demos & source

DEBRIS

debris.dmt · 96 BPM · 58 s · 960×600

homagelongcinematiccity

notes

A study of direction after fr-041: debris. by Farbrausch (2007). A dark sepia city is established from street level, then lifts, folds and tears itself into a storm of masonry. Original music.

filedebris.dmt
duration0:58
video960×600 · 30 fps · h264 + audio · 54 MB
song96 BPM · speed 6 · rpb 4 · 7 channels
loop0
renderscale 2 · dither on · master 0.44
uniformscamx camy camz fx fy fz rx ry rz ux uy uz roll farD brk storm letterA fiss glow fogA titleA credA flash trail quake kE ringx ringy ringz
tagshomagelongcinematiccity
source947 lines · 33 KB · download

anatomy

16VM programs
12patterns
0palettes
108timeline events
3text / sample / texture
947source lines
9inst
3chan
1master
1frame
1pixel
1post
6fn

line composition

pixel 42%pattern 23%frame 13%fn 7%inst 6%post 3%timeline 3%chan 1%master 1%text 0%title 0%song 0%order 0%pan 0%uniform 0%

play order

001122334445667788910111111

order list · 23 entries

timeline

0:00 0:14 0:29 0:43 0:58 brk brk=0 at 0:00 brk=0.01 at 0:05 brk=0.02 at 0:08 brk=0.04 at 0:10 brk=0.08 at 0:13 brk=0.14 at 0:15 brk=0.17 at 0:16 brk=0.24 at 0:18 brk=0.32 at 0:20 brk=0.38 at 0:23 brk=0.42 at 0:25 brk=0.45 at 0:26 brk=0.47 at 0:28 brk=0.48 at 0:30 brk=0.49 at 0:31 brk=0.5 at 0:33 brk=0.52 at 0:35 brk=0.55 at 0:38 brk=0.58 at 0:39 brk=0.7 at 0:40 brk=0.82 at 0:43 brk=0.93 at 0:45 brk=1 at 0:48 brk=1 at 0:50 brk=1 at 0:53 brk=1 at 0:55 storm storm=0 at 0:00 storm=0.02 at 0:05 storm=0.03 at 0:08 storm=0.05 at 0:10 storm=0.08 at 0:13 storm=0.12 at 0:15 storm=0.14 at 0:16 storm=0.2 at 0:18 storm=0.35 at 0:20 storm=0.58 at 0:23 storm=0.7 at 0:25 storm=0.66 at 0:26 storm=0.48 at 0:28 storm=0.22 at 0:30 storm=0.18 at 0:31 storm=0.16 at 0:33 storm=0.18 at 0:35 storm=0.28 at 0:38 storm=0.33 at 0:39 storm=0.78 at 0:40 storm=0.94 at 0:43 storm=1 at 0:45 storm=0.9 at 0:48 storm=0.68 at 0:50 storm=0.55 at 0:53 storm=0.42 at 0:55 letterA letterA=0 at 0:00 letterA=0 at 0:30 letterA=1 at 0:31 letterA=1 at 0:33 letterA=1 at 0:35 letterA=0.95 at 0:38 letterA=0.85 at 0:39 letterA=0.3 at 0:40 letterA=0.1 at 0:43 letterA=0 at 0:45 fiss fiss=0 at 0:00 fiss=0 at 0:30 fiss=0 at 0:39 fiss=0.25 at 0:40 fiss=0.6 at 0:43 fiss=1 at 0:45 fiss=1 at 0:48 fiss=0.8 at 0:50 fiss=0.6 at 0:53 fiss=0.45 at 0:55 glow glow=0.15 at 0:00 glow=0.2 at 0:05 glow=0.22 at 0:08 glow=0.28 at 0:10 glow=0.3 at 0:13 glow=0.34 at 0:15 glow=0.42 at 0:18 glow=0.5 at 0:20 glow=0.52 at 0:23 glow=0.55 at 0:25 glow=0.46 at 0:28 glow=0.42 at 0:30 glow=0.62 at 0:40 glow=0.7 at 0:43 glow=0.78 at 0:45 glow=0.85 at 0:48 glow=0.62 at 0:50 glow=0.55 at 0:53 glow=0.5 at 0:55 fog fog=0.95 at 0:00 trail trail=0.06 at 0:00 trail=0.1 at 0:25 trail=0.08 at 0:28 trail=0.05 at 0:33 trail=0.14 at 0:40 trail=0.18 at 0:45 trail=0.2 at 0:48 trail=0.16 at 0:50 trail=0.1 at 0:53 trail=0.02 at 0:55 titleA titleA=0 at 0:00 titleA=0 at 0:55 titleA=1 at 0:56 credA credA=0 at 0:00 credA=0 at 0:55 credA=1 at 0:57
ateventvaluesource
0:00 brk 0.00 L18
0:00 storm 0.00 L18
0:00 letterA 0.00 L18
0:00 fiss 0.00 L18
0:00 glow 0.15 L18
0:00 fog 0.95 L18
0:00 trail 0.06 L18
0:00 titleA 0.00 L18
0:00 credA 0.00 L18
0:05 brk 0.01 L19
0:05 storm 0.02 L19
0:05 glow 0.20 L19
0:08 brk 0.02 L20
0:08 storm 0.03 L20
0:08 glow 0.22 L20
0:10 brk 0.04 L21
0:10 storm 0.05 L21
0:10 glow 0.28 L21
0:13 brk 0.08 L22
0:13 storm 0.08 L22
0:13 glow 0.30 L22
0:15 brk 0.14 L23
0:15 storm 0.12 L23
0:15 glow 0.34 L23
0:16 brk 0.17 L24
0:16 storm 0.14 L24
0:18 brk 0.24 L25
0:18 storm 0.20 L25
0:18 glow 0.42 L25
0:20 brk 0.32 L26
0:20 storm 0.35 L26
0:20 glow 0.50 L26
0:23 brk 0.38 L27
0:23 storm 0.58 L27
0:23 glow 0.52 L27
0:25 brk 0.42 L28
0:25 storm 0.70 L28
0:25 glow 0.55 L28
0:25 trail 0.10 L28
0:26 brk 0.45 L29
0:26 storm 0.66 L29
0:28 brk 0.47 L30
0:28 storm 0.48 L30
0:28 glow 0.46 L30
0:28 trail 0.08 L30
0:30 brk 0.48 L31
0:30 storm 0.22 L31
0:30 glow 0.42 L31
0:30 letterA 0.00 L31
0:30 fiss 0.00 L31
0:31 brk 0.49 L32
0:31 storm 0.18 L32
0:31 letterA 1.00 L32
0:33 brk 0.50 L33
0:33 storm 0.16 L33
0:33 letterA 1.00 L33
0:33 trail 0.05 L33
0:35 brk 0.52 L34
0:35 storm 0.18 L34
0:35 letterA 1.00 L34
0:38 brk 0.55 L35
0:38 storm 0.28 L35
0:38 letterA 0.95 L35
0:39 brk 0.58 L36
0:39 storm 0.33 L36
0:39 letterA 0.85 L36
0:39 fiss 0.00 L36
0:40 brk 0.70 L37
0:40 storm 0.78 L37
0:40 letterA 0.30 L37
0:40 fiss 0.25 L37
0:40 glow 0.62 L37
0:40 trail 0.14 L37
0:43 brk 0.82 L38
0:43 storm 0.94 L38
0:43 letterA 0.10 L38
0:43 fiss 0.60 L38
0:43 glow 0.70 L38
0:45 brk 0.93 L39
0:45 storm 1.00 L39
0:45 letterA 0.00 L39
0:45 fiss 1.00 L39
0:45 glow 0.78 L39
0:45 trail 0.18 L39
0:48 brk 1.00 L40
0:48 storm 0.90 L40
0:48 fiss 1.00 L40
0:48 glow 0.85 L40
0:48 trail 0.20 L40
0:50 brk 1.00 L41
0:50 storm 0.68 L41
0:50 fiss 0.80 L41
0:50 glow 0.62 L41
0:50 trail 0.16 L41
0:53 brk 1.00 L42
0:53 storm 0.55 L42
0:53 fiss 0.60 L42
0:53 glow 0.55 L42
0:53 trail 0.10 L42
0:55 brk 1.00 L43
0:55 storm 0.42 L43
0:55 fiss 0.45 L43
0:55 glow 0.50 L43
0:55 trail 0.02 L43
0:55 titleA 0.00 L43
0:55 credA 0.00 L43
0:56 titleA 1.00 L44
0:57 credA 1.00 L45

Event times are derived from the order list, pattern lengths, BPM and RPB.

resources

kindnameinfovalue
texttword6DEBRIS
texttcred121after fr-041: debris.
texttcred219by Farbrausch, 2007

source

download .dmt
1# @description A study of direction after fr-041: debris. by Farbrausch (2007). A dark sepia city is established from street level, then lifts, folds and tears itself into a storm of masonry. Original music.
2# @tags homage, cinematic, city
3# debris.dmt - a study of direction after fr-041: debris. (Farbrausch, 2007)
4# 96 BPM, 23 bars = 57.5 s. A dark sepia city is established from street level,
5# then lifts, folds and tears itself into a storm of masonry. Original music.
6title DEBRIS
7song bpm=96 speed=6 rpb=4 channels=7 loop=0 volume=0.44 scale=2 dither=1
8order 0 0 1 1 2 2 3 3 4 4 4 5 6 6 7 7 8 8 9 10 11 11 11
9pan 0.50 0.36 0.50 0.52 0.62 0.42 0.50
11text tword "DEBRIS"
12text tcred1 "after fr-041: debris."
13text tcred2 "by Farbrausch, 2007"
15uniform camx camy camz fx fy fz rx ry rz ux uy uz roll farD brk storm letterA fiss glow fogA titleA credA flash trail quake kE ringx ringy ringz
17timeline {
18 0:00 brk=0.00 storm=0.00 letterA=0.00 fiss=0.00 glow=0.15 fog=0.95 trail=0.06 titleA=0.00 credA=0.00
19 2:00 brk=0.01 storm=0.02 glow=0.20
20 3:00 brk=0.02 storm=0.03 glow=0.22
21 4:00 brk=0.04 storm=0.05 glow=0.28
22 5:00 brk=0.08 storm=0.08 glow=0.30
23 6:00 brk=0.14 storm=0.12 glow=0.34
24 6:08 brk=0.17 storm=0.14
25 7:00 brk=0.24 storm=0.20 glow=0.42
26 8:00 brk=0.32 storm=0.35 glow=0.50
27 9:00 brk=0.38 storm=0.58 glow=0.52
28 10:00 brk=0.42 storm=0.70 glow=0.55 trail=0.10
29 10:08 brk=0.45 storm=0.66
30 11:00 brk=0.47 storm=0.48 glow=0.46 trail=0.08
31 12:00 brk=0.48 storm=0.22 glow=0.42 letterA=0.00 fiss=0.00
32 12:08 brk=0.49 storm=0.18 letterA=1.00
33 13:00 brk=0.50 storm=0.16 letterA=1.00 trail=0.05
34 14:00 brk=0.52 storm=0.18 letterA=1.00
35 15:00 brk=0.55 storm=0.28 letterA=0.95
36 15:08 brk=0.58 storm=0.33 letterA=0.85 fiss=0.00
37 16:00 brk=0.70 storm=0.78 letterA=0.30 fiss=0.25 glow=0.62 trail=0.14
38 17:00 brk=0.82 storm=0.94 letterA=0.10 fiss=0.60 glow=0.70
39 18:00 brk=0.93 storm=1.00 letterA=0.00 fiss=1.00 glow=0.78 trail=0.18
40 19:00 brk=1.00 storm=0.90 fiss=1.00 glow=0.85 trail=0.20
41 20:00 brk=1.00 storm=0.68 fiss=0.80 glow=0.62 trail=0.16
42 21:00 brk=1.00 storm=0.55 fiss=0.60 glow=0.55 trail=0.10
43 22:00 brk=1.00 storm=0.42 fiss=0.45 glow=0.50 trail=0.02 titleA=0.00 credA=0.00
44 22:08 titleA=1.00
45 22:12 credA=1.00
48# ------------------------------------------------------------------ instruments
49inst kick {
50 f = 42 + 460 * exp(-t * 40)
51 $p = $p + f / sr
52 body = sin($p * tau) * exp(-t * 6.0)
53 click = hp(noise(), 1900) * exp(-t * 95) * 0.4
54 out(dist((body * 1.85 + click) * 1.1, 1.5) * 0.78)
56inst impact {
57 f = 26 + 120 * exp(-t * 5)
58 $p = $p + f / sr
59 body = sin($p * tau) * exp(-t * 2.0)
60 blast = lp(noise(), 760) * exp(-t * 4.5)
61 out(dist(body * 1.5 + blast * 0.8, 1.25) * 0.50)
63inst metal {
64 n = svf(noise(), 1400 + 2800 * exp(-t * 24), 0.62)
65 m = sin(tau * (307 + 60 * t) * t + 2.4 * sin(t * 21)) * exp(-t * 7)
66 out((r2 * 0.95 + m * 0.5) * exp(-t * 5.5) * 0.34)
68inst tick {
69 out(hp(noise(), 7400) * exp(-t * (44 + 70 * (1 - vel))) * 0.16)
71inst sub {
72 e = env(0.008, 0.20, 0.74, 0.30)
73 s = sin(ph * tau) + 0.20 * sin(ph * tau * 2)
74 out(dist(s * e, 1.3) * 0.38)
76inst bass {
77 e = env(0.006, 0.13, 0.55, 0.11)
78 s = saw(ph) * 0.5 + sin(ph * tau * 0.5) * 0.42 + sin(ph * tau) * 0.30
79 s = fold(s * (1 + 0.9 * e), 1.4)
80 s = svf(s, 130 + 900 * e + 500 * p0, 0.36)
81 out(dist(s * e, 1.45) * 0.46)
83inst choir nna=continue {
84 e = env(1.10, 0.9, 0.86, 2.6)
85 v = 0.006 * sin(t * 4.3) + 0.003 * sin(t * 2.7)
86 s = usaw(freq * (1 + v), 0.17)
87 f1 = svf(s, 560 + 160 * p0, 0.87)
88 a = r2
89 f2 = svf(s, 1150 + 260 * p1, 0.85)
90 b = r2
91 out((a * 0.95 + b * 0.55 + s * 0.10) * e * 0.065)
93inst bell {
94 e = exp(-t * 1.55)
95 m = sin(ph * tau * 1.41 + 0.9 * sin(t * 1.2)) * 1.7 * exp(-t * 2.1)
96 s = sin(ph * tau + m) + 0.30 * sin(ph * tau * 2.76) + 0.10 * sin(ph * tau * 5.41)
97 out(s * e * 0.24)
99inst air nna=continue {
100 e = env(0.90, 1.1, 0.82, 2.2)
101 n = svf(noise(), 240 + 1800 * p0 + 260 * sin(t * 0.21), 0.52)
102 out((n * 0.85 + r2 * 0.38) * e * 0.12)
105chan 3 {
106 wet = verb(x, 0.88, 0.42)
107 out(x * 0.74 + wet * 0.70)
109chan 4 {
110 d = dly(x, 0.3125, 0.42)
111 d2 = dly(x, 0.46875, 0.34)
112 out(x * 0.80 + d * 0.34 + d2 * 0.22)
114chan 5 {
115 wet = verb(x, 0.90, 0.50)
116 out(x * 0.72 + wet * 0.60)
118master {
119 dl = dly(l, 0.417, 0.30)
120 dr = dly(r, 0.531, 0.30)
121 wet = verb(l * 0.5 + r * 0.5, 0.84, 0.46)
122 out(dist((l + dr * 0.14 + wet * 0.16) * 0.72, 1.05), dist((r + dl * 0.14 + wet * 0.16) * 0.72, 1.05))
125# ------------------------------------------------------------------ patterns
126# 0: drone, distant city
127pattern 0 rows=16 {
128 . | . | D-1 4 30 | D-3 5 26 | . | C-4 7 14 S00 | .
129 .
130 .
131 .
132 . | . | . | A-3 5 16 | . | .
133 .
134 .
135 .
136 . | . | . | D-3 5 20 | D-5 6 12 | .
137 .
138 . | . | . | F-3 5 14 | . | .
139 .
141# 1: a heartbeat under the street
142pattern 1 rows=16 {
143 C-1 1 30 | . | D-1 4 32 | D-3 5 26 | . | C-4 7 16 S20 | .
144 .
145 .
146 .
147 . | . | . | A-3 5 16 | . | .
148 . | C-6 2 12 | . | D-3 5 22 | . | .
149 .
150 .
151 . | . | A-0 4 28 | F-3 5 18 | D-5 6 12 | .
152 .
153 . | C-6 2 10 | . | . | . | .
154 .
156# 2: pulse, sub, first cracks
157pattern 2 rows=16 {
158 C-1 1 38 | . | D-1 4 36 | D-3 5 26 | . | C-4 7 16 S40 | .
159 . | . | . | . | . | .
160 . | . | . | . | . | .
161 . | . | . | . | . | .
162 C-1 1 34 | . | A-0 4 34 | A-3 5 18 | . | .
163 . | . | . | . | . | .
164 . | . | . | . | . | .
165 . | C-6 2 14 | . | . | . | .
166 C-1 1 38 | . | D-1 4 36 | D-3 5 26 | . | .
167 . | . | . | . | . | .
168 . | . | . | . | . | .
169 . | . | . | . | . | .
170 C-1 1 34 | . | F-0 4 32 | F-3 5 18 | . | .
171 . | . | . | . | . | .
172 . | . | . | . | . | .
173 . | C-6 2 16 | . | . | . | .
175# 3: bass enters, metal answers
176pattern 3 rows=16 {
177 C-1 1 40 | . | D-1 4 40 | D-3 5 28 | . | C-4 7 18 S80 | .
178 . | . | D-1 4 20 | . | . | .
179 . | . | F-1 4 30 | . | . | .
180 . | . | D-1 4 24 | . | . | .
181 C-1 1 38 | C-5 2 30 | A-0 4 38 | A-3 5 20 | . | .
182 . | . | A-0 4 22 | . | . | .
183 . | . | C-1 4 28 | . | . | .
184 . | . | A#0 4 26 | . | . | .
185 C-1 1 40 | . | D-1 4 40 | D-3 5 28 | . | .
186 . | . | D-1 4 22 | . | . | .
187 . | . | F-1 4 30 | . | . | .
188 . | . | G-1 4 26 | . | . | .
189 C-1 1 38 | C-5 2 34 | A-0 4 38 | A-3 5 20 | . | .
190 . | . | A-0 4 20 | . | . | .
191 . | . | C-1 4 28 | . | . | .
192 . | C-5 2 20 | A#0 4 26 | . | . | .
194# 4: full industrial groove - blocks lift
195pattern 4 rows=16 {
196 C-1 1 40 | . | D-1 4 3E | D-3 5 30 | . | C-4 7 18 S80 | .
197 . | . | D-1 4 22 | . | . | .
198 . | C-5 2 34 | F-1 4 32 | . | . | .
199 C-1 1 34 | . | D-1 4 24 | . | . | .
200 C-1 1 40 | C-5 2 30 | A-0 4 3E | A-3 5 22 | . | C-4 7 20 S90 | .
201 . | . | A-0 4 22 | . | . | .
202 . | C-5 2 34 | C-1 4 32 | . | . | .
203 C-1 1 34 | . | A#0 4 26 | . | . | .
204 C-1 1 40 | . | D-1 4 3E | D-3 5 30 | . | .
205 . | . | D-1 4 22 | . | . | .
206 . | C-5 2 34 | F-1 4 32 | . | . | .
207 C-1 1 34 | . | G-1 4 28 | . | . | .
208 C-1 1 40 | C-5 2 30 | A-0 4 3E | A-3 5 22 | . | .
209 . | . | A-0 4 22 | . | . | .
210 . | C-5 2 32 | C-1 4 30 | . | . | .
211 C-1 1 34 | C-5 2 18 | A#0 4 26 | . | . | .
213# 5: the break before the pull-back
214pattern 5 rows=16 {
215 C-1 6 40 | C-5 2 36 | D-1 4 40 | D-3 5 32 | . | C-4 7 22 S40 | .
216 . | . | . | . | . | .
217 . | . | . | . | . | .
218 . | . | . | . | . | .
219 . | C-5 2 26 | A-0 4 32 | A-3 5 24 | . | .
220 . | . | . | . | . | .
221 . | . | . | . | . | .
222 . | . | . | . | . | .
223 . | . | D-1 4 36 | D-3 5 30 | D-5 6 14 | .
224 . | . | . | . | . | .
225 . | . | . | . | . | .
226 . | . | . | . | . | .
227 . | C-6 2 18 | A-0 4 30 | F-3 5 24 | . | .
228 . | . | . | . | . | .
229 . | . | . | . | . | .
230 . | . | . | . | . | .
232# 6: quiet - the giant letters
233pattern 6 rows=16 {
234 . | . | D-1 4 15 | D-3 5 15 | . | . | .
235 . | . | . | F-3 5 11 | . | C-4 7 14 S20 | .
236 . | . | . | . | . | . | .
237 . | . | . | . | . | . | .
238 . | . | A-0 4 12 | A-3 5 11 | D-5 6 16 | . | .
239 . | . | . | . | . | . | .
240 . | . | . | . | . | . | .
241 . | . | . | . | . | . | .
242 . | . | D-1 4 13 | D-3 5 14 | . | . | .
243 . | . | . | . | . | . | .
244 . | . | . | . | F-5 6 13 | . | .
245 . | . | . | . | . | . | .
246 . | C-6 2 8 | A-0 4 11 | A-3 5 10 | . | C-4 7 16 S30 | .
247 . | . | . | . | . | . | .
248 . | . | . | . | E-5 6 12 | . | .
249 . | . | . | . | . | . | .
251# 7: quiet 2 - more air
252pattern 7 rows=16 {
253 . | . | D-1 4 15 | D-3 5 15 | . | C-4 7 16 S30 | .
254 . | . | . | . | . | . | .
255 . | . | . | . | . | . | .
256 . | . | . | . | . | . | .
257 . | . | A-0 4 12 | A-3 5 11 | D-5 6 15 | . | .
258 . | . | . | . | . | . | .
259 . | . | . | . | . | . | .
260 . | . | . | . | . | . | .
261 . | . | D-1 4 13 | D-3 5 14 | . | . | .
262 . | . | . | . | . | . | .
263 . | . | . | F-3 5 10 | F-5 6 12 | . | .
264 . | . | . | . | . | . | .
265 . | C-6 2 10 | A-0 4 12 | A-3 5 10 | . | C-4 7 18 S60 | .
266 . | . | . | . | . | . | .
267 . | . | . | . | E-5 6 11 | . | .
268 . | . | . | . | . | . | .
270# 8: build - the cut
271pattern 8 rows=16 {
272 C-1 1 40 | . | D-1 4 3E | D-3 5 30 | . | C-4 7 30 S00 | .
273 . | . | D-1 4 24 | . | . | C-4 7 30 S20 | .
274 . | C-5 2 34 | F-1 4 32 | . | . | C-4 7 30 S40 | .
275 . | . | D-1 4 24 | . | . | C-4 7 30 S60 | .
276 C-1 1 38 | C-5 2 30 | A-0 4 3E | A-3 5 22 | . | C-4 7 30 S80 | .
277 . | C-5 2 22 | A-0 4 22 | . | . | C-4 7 30 SA0 | .
278 . | C-5 2 34 | C-1 4 32 | . | . | C-4 7 30 S80 | .
279 C-1 1 34 | . | A#0 4 26 | . | . | C-4 7 30 S60 | .
280 C-1 1 40 | C-6 2 20 | D-1 4 3E | D-3 5 30 | . | C-4 7 30 S80 | .
281 . | C-5 2 26 | D-1 4 24 | . | . | C-4 7 30 SA0 | .
282 . | C-5 2 34 | F-1 4 32 | . | . | C-4 7 30 S80 | .
283 . | C-5 2 20 | G-1 4 28 | . | . | C-4 7 30 S40 | .
284 C-1 1 40 | C-5 2 30 | A-0 4 3E | A-3 5 22 | . | C-4 7 30 S60 | .
285 C-1 1 34 | . | A-0 4 26 | . | . | C-4 7 30 S80 | .
286 C-1 1 40 | C-5 2 34 | C-1 4 30 | . | . | C-4 7 30 SA0 | .
287 C-1 1 40 | C-6 2 26 | A#0 4 28 | . | . | C-4 7 30 S40 | .
289# 9: the sky tears
290pattern 9 rows=16 {
291 C-1 1 40 | C-5 2 38 | D-1 4 40 | D-3 5 32 | . | C-4 7 24 S60 | C-1 6 40
292 . | . | D-1 4 24 | D#3 5 20 | . | . | .
293 C-1 1 38 | C-5 2 30 | F-1 4 34 | . | A#5 6 17 | . | .
294 C-1 1 40 | . | D-1 4 26 | . | . | . | .
295 C-1 1 40 | C-5 2 38 | A-0 4 40 | A-3 5 24 | D-5 6 16 | C-4 7 26 S70 | C-1 6 40
296 . | . | A-0 4 24 | . | . | . | .
297 C-1 1 38 | C-5 2 30 | C-1 4 34 | . | A-5 6 17 | . | .
298 C-1 1 40 | C-5 2 22 | A#0 4 28 | . | . | . | .
299 C-1 1 40 | C-5 2 38 | D-1 4 40 | D-3 5 32 | . | . | .
300 . | . | D-1 4 24 | F-3 5 20 | . | . | .
301 C-1 1 38 | C-5 2 30 | F-1 4 34 | . | F-5 6 17 | . | .
302 C-1 1 40 | . | G-1 4 28 | . | . | . | .
303 C-1 1 40 | C-5 2 38 | A-0 4 40 | A-3 5 24 | E-5 6 15 | C-4 7 26 S80 | C-1 6 40
304 . | . | A-0 4 24 | . | . | . | .
305 C-1 1 38 | C-5 2 30 | C-1 4 34 | . | E-5 6 17 | . | .
306 C-1 1 40 | C-5 2 22 | A#0 4 28 | D#3 5 18 | . | . | .
308# 10: collapse
309pattern 10 rows=16 {
310 C-1 6 40 | C-5 2 34 | D-1 4 40 | D-3 5 30 | . | C-4 7 24 S30 | C-1 6 40
311 . | . | . | . | . | . | .
312 . | . | D-1 4 24 | . | . | . | .
313 . | . | . | . | . | . | .
314 . | C-5 2 24 | A-0 4 30 | A-3 5 22 | D-5 6 17 | . | .
315 . | . | . | . | . | . | .
316 . | . | . | . | . | . | .
317 . | . | . | . | . | . | .
318 C-1 6 40 | . | D-1 4 36 | D-3 5 28 | . | C-4 7 22 S40 | C-1 6 40
319 . | . | . | . | . | . | .
320 . | . | . | . | . | . | .
321 . | . | . | . | . | . | .
322 . | C-6 2 20 | A-0 4 28 | F-3 5 20 | A#4 6 17 | . | .
323 . | . | . | . | . | . | .
324 . | . | . | . | . | . | .
325 . | . | . | . | . | . | .
327# 11: dissolve, title
328pattern 11 rows=16 {
329 C-1 6 30 | C-5 2 28 | D-1 4 28 | D-3 5 22 | . | C-4 7 24 S10 | C-1 6 30
330 . | . | . | . | . | . | .
331 . | . | . | A-3 5 15 | . | . | .
332 . | . | . | . | . | . | .
333 . | C-6 2 16 | A-0 4 20 | F-3 5 22 | D-5 6 14 | . | .
334 . | . | . | . | . | . | .
335 . | . | . | . | . | . | .
336 . | . | . | . | . | . | .
337 . | . | D-1 4 24 | D-3 5 26 | . | C-4 7 20 S30 | .
338 . | . | . | . | . | . | .
339 . | C-5 2 14 | . | . | . | . | .
340 . | . | . | . | . | . | .
341 . | . | A-0 4 22 | A-3 5 15 | . | . | .
342 . | . | . | . | E-5 6 10 | . | .
343 . | . | . | . | . | . | .
344 . | . | . | . | . | . | .
347# ------------------------------------------------------------------ geometry
348fn box(px, py, pz, bx, by, bz) {
349 qx = abs(px) - bx
350 qy = abs(py) - by
351 qz = abs(pz) - bz
352 return len(len(max(qx, 0), max(qy, 0)), max(qz, 0)) + min(max(qx, max(qy, qz)), 0)
354fn buckle(px, pz) {
355 b = brk * brk
356 return b * (1.25 * sin(pz * 0.21 + brk * 3.0) + 0.55 * sin(pz * 0.061 - 1.3)) * exp(-abs(px - 6) * 0.03)
358fn bridge(px, py, pz) {
359 # an elevated road across the canyon; it folds and dives as brk rises
360 bend = 2.6 * sin(px * 0.13 + brk * 3.4) + brk * 7.0 * sin(px * 0.05)
361 bz = pz - (26 + bend * 0.5)
362 return box(px - 6, py - (7.4 - brk * 3.0 * sin(px * 0.08)), bz, 44, 0.19, 1.10) * 0.8
364fn ringd(px, py, pz) {
365 # the landmark: a monumental steel portal over the avenue
366 qx = px - 6
367 qy = py - 20.0
368 rq = len(qx, qy)
369 return len(rq - 14.0, pz - 40) - 1.0
371fn city(px, py, pz) {
372 g = py - buckle(px, pz)
373 cx = floor(px / 12 + 0.5)
374 cz = floor(pz / 12 + 0.5)
375 lx = px - cx * 12
376 lz = pz - cz * 12
377 hh = 5 + 15 * hash(cx * 12.9898 + cz * 78.233)
378 hh = hh * step(0.09, hash(cx * 3.17 + cz * 5.71)) + 0.05
379 gm = smooth(0.58, 0.97, brk)
380 gone = step(1 - gm * 1.05, hash(cx * 9.13 + cz * 4.71))
381 hh = hh * (1 - 0.97 * gone)
382 hw = 2.4 + 0.8 * hash(cx * 2.33 + cz * 4.17)
383 hd = 2.4 + 0.8 * hash(cx * 6.11 + cz * 1.73)
384 th = hash(cx * 1.71 + cz * 9.31) * 0.55
385 k = smooth(th, th + 0.32, brk)
386 ly = py - hh * 0.5 - k * (4.0 + 16.0 * hash(cx * 5.11 + cz * 2.97))
387 lx = lx - k * 2.2 * (hash(cx * 8.11 + cz * 3.31) - 0.5)
388 lz = lz - k * 2.2 * (hash(cx * 4.71 + cz * 6.91) - 0.5)
389 ay = k * 2.3 * (hash(cx * 3.91 + cz * 7.73) - 0.5)
390 la = rot(lx, lz, ay)
391 lz = r1
392 lx = la
393 ax = k * 0.30 * (hash(cx * 6.71 + cz * 1.31) - 0.5)
394 lb = rot(ly, lz, ax)
395 lz = r1
396 ly = lb
397 d = box(lx, ly, lz, hw, hh * 0.5, hd)
398 return min(min(min(d, g), bridge(px, py, pz)), ringd(px, py, pz))
400fn swarm(sc, spd, seed, st) {
401 ax = u * sc + camx * 0.02 * sc + time * spd + seed * 3.7
402 ay = v * sc + camy * 0.02 * sc + sin(time * 0.13 + seed) * 0.8
403 ix = floor(ax)
404 iy = floor(ay)
405 h1 = hash(ix * 1.71 + iy * 4.31 + seed * 2.1)
406 h2 = hash(ix * 7.13 + iy * 2.97 + seed * 5.3)
407 h3 = hash(ix * 3.37 + iy * 8.11 + seed * 7.7)
408 dx = fract(ax) - 0.5 - (h1 - 0.5) * 0.8
409 dy = fract(ay) - 0.5 - (h2 - 0.5) * 0.8
410 wd = 0.016 + 0.060 * h3
411 hg = 0.008 + 0.026 * h1
412 m = step(abs(dx), wd * st) * step(abs(dy), hg)
413 shade = 0.55 + 0.45 * step(0.0, dx + dy)
414 return m * shade * step(0.18, h3)
417frame {
418 kE = exp(-trig(0) * 8)
419 mE = exp(-trig(1) * 9)
420 iE = exp(-trig(6) * 4)
421 brk = evtl(brk)
422 storm = evtl(storm)
423 letterA = evtl(letterA)
424 fiss = evtl(fiss)
425 glow = evtl(glow)
426 fogA = evtl(fog)
427 trail = evtl(trail)
428 titleA = evtl(titleA)
429 credA = evtl(credA)
430 quake = 1.8 * brk * brk + iE * 0.8
432 # ---- shot 1: street level dolly, tilting up at the lifting block
433 p1 = smooth(0, 19, t)
434 s1x = 6.0 + 0.55 * sin(t * 0.17) + quake * 0.05 * sin(t * 31)
435 s1y = 1.78 + 1.5 * p1 * p1 + quake * 0.03 * sin(t * 27)
436 s1z = -10 + 38 * p1
437 tilt = smooth(9, 18, t)
438 s1tx = 6 + 3.5 * tilt + 1.4 * sin(t * 0.13)
439 s1ty = 3.4 + 13.5 * tilt
440 s1tz = s1z + 18
442 # ---- shot 2: the crane back. same corner becomes one fleck in the storm;
443 # then the camera tilts up to the letters standing in the haze
444 p2 = smooth(20, 32, t)
445 p3 = smooth(30, 40, t)
446 s2x = mix(6, -4, p2) + 6 * p3 + 1.2 * sin(t * 0.11)
447 s2y = mix(3.2, 12, p2) + 1.0 * p3
448 s2z = mix(20, -6, p2) - 8 * p3
449 s2tx = mix(10, 6, p2) + 3 * p3
450 s2ty = mix(18, 7.0, p2) + 2 * smooth(32, 39, t)
451 s2tz = mix(38, 44, p2)
453 # ---- shot 3: cut. inside the storm, diving between the falling blocks
454 p4 = smooth(40, 50, t)
455 s3x = 6.0 - 2.0 * p4 + 0.8 * sin(t * 0.9)
456 s3y = 3.2 + 1.5 * p4 + 0.4 * sin(t * 1.3)
457 s3z = 26 + 38 * p4
458 s3tx = 6 + 3 * sin(t * 0.4)
459 s3ty = 5 + 4 * p4
460 s3tz = s3z + 34
462 # ---- shot 4: settle, look up at the tear
463 p5 = smooth(50, 57.5, t)
464 s4x = mix(4.0, 2.0, p5) + 1.0 * sin(t * 0.28)
465 s4y = mix(4.7, 8.5, p5)
466 s4z = mix(64, 72, p5)
467 s4tx = mix(6.0, 2.0, p5)
468 s4ty = mix(9.0, 20.0, p5)
469 s4tz = 110
471 # ---- chain the shots (hard cut at 40 s)
472 cut = step(40, t)
473 camx = mix(s1x, s2x, p2)
474 camy = mix(s1y, s2y, p2)
475 camz = mix(s1z, s2z, p2)
476 tx = mix(s1tx, s2tx, p2)
477 ty = mix(s1ty, s2ty, p2)
478 tz = mix(s1tz, s2tz, p2)
479 camx = mix(camx, s3x, cut)
480 camy = mix(camy, s3y, cut)
481 camz = mix(camz, s3z, cut)
482 tx = mix(tx, s3tx, cut)
483 ty = mix(ty, s3ty, cut)
484 tz = mix(tz, s3tz, cut)
485 camx = mix(camx, s4x, p5)
486 camy = mix(camy, s4y, p5)
487 camz = mix(camz, s4z, p5)
488 tx = mix(tx, s4tx, p5)
489 ty = mix(ty, s4ty, p5)
490 tz = mix(tz, s4tz, p5)
492 # ---- shake on impacts and on the cut
493 shakeA = iE * 0.22 + exp(-abs(t - 40) * 7) * 0.35 + 0.05 * brk
494 camx = camx + shakeA * sin(t * 43.1) * 0.5
495 camy = camy + shakeA * sin(t * 37.7 + 1.3) * 0.35
496 tx = tx + shakeA * sin(t * 29.3 + 0.7) * 0.7
498 # ---- camera basis
499 fx = tx - camx
500 fy = ty - camy
501 fz = tz - camz
502 fl = len(len(fx, fz), fy) + 0.0001
503 fx = fx / fl
504 fy = fy / fl
505 fz = fz / fl
506 rl = len(fx, fz) + 0.0001
507 rx = fz / rl
508 ry = 0
509 rz = -fx / rl
510 ux = fy * rz
511 uy = fz * rx - fx * rz
512 uz = -fy * rx
514 # ---- roll: subtle in the street, tumbling inside the storm
515 rollA = mix(0.02 * sin(t * 0.21), 0.05 * sin(t * 0.17), p2)
516 rollA = mix(rollA, 0.22 * sin(t * 0.63) + 0.08 * sin(t * 1.7), cut)
517 roll = mix(rollA, 0.03 * sin(t * 0.15), p5)
519 farD = mix(62, 132, clamp((camy - 5) / 25, 0, 1))
520 flash = max(iE * 1.1, kE * 0.22) + exp(-abs(t - 40) * 9) * 0.6
522 # project the giant ring centre into screen space so the cube spiral wraps it
523 rgx = 6.0 - camx
524 rgy = 20.0 - camy
525 rgz = 40.0 - camz
526 rzd = rgx * fx + rgy * fy + rgz * fz
527 rzd = max(rzd, 0.5)
528 ringz = rzd
529 ringx = (rgx * rx + rgy * ry + rgz * rz) / (rzd * 0.72)
530 ringy = (rgx * ux + rgy * uy + rgz * uz) / (rzd * 0.72)
533pixel {
534 # ---------------------------------------------------------------- camera ray
535 ru = rot(u, v, roll)
536 rv = r1
537 dx = fx + rx * ru * 0.72 + ux * rv * 0.72
538 dy = fy + ry * ru * 0.72 + uy * rv * 0.72
539 dz = fz + rz * ru * 0.72 + uz * rv * 0.72
540 dl = len(len(dx, dz), dy) + 0.00001
541 dx = dx / dl
542 dy = dy / dl
543 dz = dz / dl
545 # ---------------------------------------------------------------- march
546 tt = 0.05
547 d = 1
548 hit = 0
549 repeat i 40 {
550 px = camx + dx * tt
551 py = camy + dy * tt
552 pz = camz + dz * tt
553 d = city(px, py, pz)
554 hit = max(hit, step(d, 0.028))
555 tt = tt + max(d * 0.76, 0.03) * step(0.028, d) * step(tt, farD)
556 }
557 px = camx + dx * tt
558 py = camy + dy * tt
559 pz = camz + dz * tt
561 # ---------------------------------------------------------------- normal
562 e = 0.035
563 c0 = city(px, py, pz)
564 c1 = city(px + e, py, pz)
565 c2 = city(px, py + e, pz)
566 c3 = city(px, py, pz + e)
567 nx = c1 - c0
568 ny = c2 - c0
569 nz = c3 - c0
570 nl = len(len(nx, nz), ny) + 0.00001
571 nx = nx / nl
572 ny = ny / nl
573 nz = nz / nl
575 # ---------------------------------------------------------------- local block
576 cx0 = floor(px / 12 + 0.5)
577 cz0 = floor(pz / 12 + 0.5)
578 llx = px - cx0 * 12
579 llz = pz - cz0 * 12
580 hh = 5 + 15 * hash(cx0 * 12.9898 + cz0 * 78.233)
581 hh = hh * step(0.09, hash(cx0 * 3.17 + cz0 * 5.71)) + 0.05
582 gm = smooth(0.58, 0.97, brk)
583 gone = step(1 - gm * 1.05, hash(cx0 * 9.13 + cz0 * 4.71))
584 hh = hh * (1 - 0.97 * gone)
585 hw = 2.4 + 0.8 * hash(cx0 * 2.33 + cz0 * 4.17)
586 hd = 2.4 + 0.8 * hash(cx0 * 6.11 + cz0 * 1.73)
587 th = hash(cx0 * 1.71 + cz0 * 9.31) * 0.55
588 kk = smooth(th, th + 0.32, brk)
589 rise = kk * (4.0 + 16.0 * hash(cx0 * 5.11 + cz0 * 2.97))
590 lly = py - hh * 0.5 - rise
591 llx = llx - kk * 2.2 * (hash(cx0 * 8.11 + cz0 * 3.31) - 0.5)
592 llz = llz - kk * 2.2 * (hash(cx0 * 4.71 + cz0 * 6.91) - 0.5)
593 ay = kk * 2.3 * (hash(cx0 * 3.91 + cz0 * 7.73) - 0.5)
594 la = rot(llx, llz, ay)
595 llz = r1
596 llx = la
597 ax = kk * 0.30 * (hash(cx0 * 6.71 + cz0 * 1.31) - 0.5)
598 lb = rot(lly, llz, ax)
599 llz = r1
600 lly = lb
602 # ---------------------------------------------------------------- shading
603 gb = py - buckle(px, pz)
604 ground = step(abs(gb), 0.10)
605 dbg = bridge(px, py, pz)
606 steel = step(abs(dbg), 0.35) * (1 - ground)
607 drg = ringd(px, py, pz)
608 rring = step(abs(drg), 0.28) * (1 - ground)
609 side = (1 - ground) * (1 - steel) * (1 - rring)
611 # facade grid in the block's own frame
612 wv = (lly + hh * 0.5) * 2.6 + hash(cx0 * 5.7 + cz0 * 2.1) * 1.7
613 wu = (abs(nx) > abs(nz) ? llz : llx) * 3.2 + hash(cx0 * 2.9 + cz0 * 8.3) * 2.0
614 fu = fract(wu)
615 fv = fract(wv)
616 inw = step(0.24, fu) * step(fu, 0.70) * step(0.28, fv) * step(fv, 0.62)
617 wc = hash(floor(wu) * 3.31 + floor(wv) * 7.73 + cx0 * 13.1 + cz0 * 7.9)
618 flick = 0.14 * sin(t * 2.1 + wc * 12.0) * step(0.7, hash(floor(wu) + floor(wv) * 2.1))
619 lit = inw * step(0.755, wc + flick + 0.07 * kE) * side
620 btint = hash(cx0 * 7.7 + cz0 * 3.1)
621 cold = lit * step(0.94, btint)
622 warm = lit * (1 - cold)
623 floorline = step(0.88, fract((lly + hh * 0.5) * 0.34)) * side
624 roof = step(0.65, abs(ny)) * (1 - ground) * (1 - rring)
625 roofg = step(0.70, hash(floor(llx * 2.2) * 3.1 + floor(llz * 2.2) * 7.3 + cx0 * 5.1)) * roof * 0.030
626 neon = step(0.82, hash(cx0 * 2.31 + cz0 * 4.77)) * step(0.65, abs(ny)) * (1 - ground) * (1 - rring)
627 neonb = neon * (1 - steel) * step(hh - 0.55, lly + hh * 0.5) * step(lly + hh * 0.5, hh + 0.02) * step(0.55, hash(cx0 * 8.1 + cz0 * 1.9))
629 # brick courses and aggregate
630 grain = hash(px * 4.1 + pz * 3.3 + py * 6.7) * 0.5 + hash(px * 13.1 + py * 17.3) * 0.5
631 course = step(0.84, fract((lly + hh * 0.5) * 5.2 + hash(cx0 * 3.1 + cz0 * 2.7) * 4.0)) * side
633 # light: cold sky key from above, warm sodium bounce from the street
634 lxn = -0.35
635 lyn = 0.82
636 lzn = -0.45
637 diff = max(nx * lxn + ny * lyn + nz * lzn, 0)
638 amb = 0.010 + 0.020 * max(ny, 0)
639 brick = (0.085 + 0.095 * grain + 0.025 * btint) * (1 - ground * 0.80)
640 bt2 = hash(cx0 * 3.7 + cz0 * 6.1)
641 brr = brick * (0.92 + 0.38 * bt2)
642 bgg = brick * (0.60 + 0.10 * bt2)
643 bbb = brick * (0.46 + 0.08 * bt2)
645 # wet blue street: sky sheen, sodium pools, lane paint
646 ix = fract(px / 12 + 0.5) - 0.5
647 iz = fract(pz / 12 + 0.5) - 0.5
648 pool = exp(-len(ix, iz) * 9) * (0.55 + 0.45 * hash(floor(px / 12 + 0.5) * 1.7 + floor(pz / 12 + 0.5) * 4.3))
649 streak = exp(-abs(ix) * 26) * 0.4 + exp(-abs(iz) * 26) * 0.4
650 lane = step(abs(px - 6), 0.07) * step(0.55, fract(pz * 0.33)) * 0.16
651 fres = pow(max(1 + dy, 0), 5) * 0.11
652 sxd = abs(fract(px / 12) - 0.5) * 12
653 szd = abs(fract(pz / 12) - 0.5) * 12
654 dash = (step(sxd, 0.10) * step(0.5, fract(pz * 0.5)) + step(szd, 0.10) * step(0.5, fract(px * 0.5)))
655 cross = step(sxd, 2.3) * step(szd, 2.3) * step(0.5, fract((px + pz) * 0.8))
656 swalk = exp(-abs(abs(llx) - hw - 0.45) * 10) + exp(-abs(abs(llz) - hd - 0.45) * 10)
657 asphalt = 0.55 + 0.45 * fbm(px * 0.45, pz * 0.45, 3)
658 wet = ground * (pool * 0.38 + streak * 0.10 + lane + fres + 0.012 + dash * 0.075 + cross * 0.025 + swalk * 0.05) * asphalt
659 # sodium lamps down both sides of the canyon
660 lz0 = floor(pz / 12 + 0.5) * 12
661 lamp = exp(-len(len(px - 3.2, pz - lz0), py - 4.6) * 1.15) + exp(-len(len(px - 8.8, pz - lz0), py - 4.6) * 1.15)
662 lamp = lamp * (0.35 + 0.4 * hash(lz0 * 0.37))
664 # assemble: cold concrete and warm brick, cream windows
665 cr = amb * 0.80 + brr + diff * 0.060
666 cg = amb * 1.15 + bgg + diff * 0.075
667 cb = amb * 1.55 + bbb + diff * 0.095
668 dwin = inw * side * 0.016
669 bandrow = step(0.90, fract((lly + hh * 0.5) * 0.95)) * side * 0.026
670 seam = step(0.955, fract(wu * 0.25)) * side * 0.016
671 cr = cr + dwin * 0.70 + roofg * 0.85 + bandrow * 0.7 + seam * 0.6 + course * 0.12
672 cg = cg + dwin * 0.62 + roofg * 0.88 + bandrow * 0.6 + seam * 0.7 + course * 0.11
673 cb = cb + dwin * 0.52 + roofg * 0.90 + bandrow * 0.5 + seam * 0.8 + course * 0.10
674 # cream window light is the only warm source
675 cr = cr + warm * 1.10 + cold * 0.18
676 cg = cg + warm * 0.76 + cold * 0.50
677 cb = cb + warm * 0.40 + cold * 0.78
678 cr = cr + wet * 0.58 + lamp * 0.36 + neonb * 0.85
679 cg = cg + wet * 0.76 + lamp * 0.20 + neonb * 0.30
680 cb = cb + wet * 0.96 + lamp * 0.09 + neonb * 0.15
681 # cool grazing rim, so slabs and the ring read against the sky
682 vdn = dx * nx + dy * ny + dz * nz
683 rim = pow(1 - abs(vdn), 3.0) * 0.30
684 cr = cr + rim * 0.58
685 cg = cg + rim * 0.78
686 cb = cb + rim * 1.10
687 cr = cr - floorline * 0.012
688 cg = cg - floorline * 0.010
689 cb = cb - floorline * 0.010
691 # steel bridge: cold girders with sodium running lights
692 btop = steel * step(0.55, abs(ny))
693 brun = steel * step(0.975, fract(px * 0.55)) * step(0.4, abs(ny)) * 0.14
694 cr = cr + steel * (0.105 + 0.03 * sin(t * 3.0 + pz) + lamp * 0.12) + btop * 0.05 + brun * 1.0
695 cg = cg + steel * (0.115 + 0.03 * sin(t * 2.4 + pz) + lamp * 0.08) + btop * 0.06 + brun * 0.62
696 cb = cb + steel * (0.130 + 0.03 * sin(t * 2.9 + pz) + lamp * 0.05) + btop * 0.07 + brun * 0.34
697 # the giant ring: rusted ribs, bright inner lip, cold outer edge
698 anel = atan2(py - 20.0, px - 6)
699 rq = len(px - 6, py - 20.0)
700 rib = step(0.45, fract(anel * 12.0 + 0.5))
701 tub = step(0.5, fract((rq - 13.0) * 7.0 + anel * 0.8))
702 rust = 0.45 + 0.55 * hash(floor(anel * 24.0) * 1.7 + 2.3)
703 panel = step(0.78, hash(floor(anel * 24.0) * 3.1 + 7.7))
704 lip = exp(-abs(rq - 12.98) * 26.0) * rring
705 redge = exp(-abs(rq - 15.02) * 26.0) * rring
706 cr = cr + rring * ((0.190 + 0.070 * rib) * rust + diff * 0.22 + panel * 0.30) * (0.82 + 0.18 * tub) + lip * 1.10 + redge * 0.55
707 cg = cg + rring * ((0.125 + 0.045 * rib) * rust + diff * 0.24 + panel * 0.19) * (0.82 + 0.18 * tub) + lip * 1.02 + redge * 0.72
708 cb = cb + rring * ((0.095 + 0.030 * rib) * rust + diff * 0.28 + panel * 0.10) * (0.82 + 0.18 * tub) + lip * 0.95 + redge * 0.95
710 # fog: cool blue-grey overcast
711 fr = 0.032
712 fg = 0.044
713 fb = 0.058
714 fogk = exp(-tt * 0.008 * fogA)
715 cr = mix(fr, cr, fogk * hit)
716 cg = mix(fg, cg, fogk * hit)
717 cb = mix(fb, cb, fogk * hit)
719 # ---------------------------------------------------------------- sky
720 sky = 1 - hit
721 hy = clamp(dy, -0.15, 0.9)
722 skyT = smooth(-0.04, 0.78, hy)
723 skr = mix(0.082, 0.010, skyT)
724 skg = mix(0.108, 0.028, skyT)
725 skb = mix(0.128, 0.048, skyT)
726 cloud = fbm(u * 2.3 + t * 0.006, v * 2.0 - t * 0.010, 4)
727 cl2 = smooth(0.34, 0.74, cloud)
728 skr = skr + cl2 * 0.055
729 skg = skg + cl2 * 0.058
730 skb = skb + cl2 * 0.062
731 cl3 = smooth(0.55, 0.9, fbm(u * 5.1 - 3.0, v * 4.2 + 1.4, 3))
732 skr = skr - cl3 * 0.030
733 skg = skg - cl3 * 0.026
734 skb = skb - cl3 * 0.022
735 # sodium band at the horizon, warmer on one side
736 hang = exp(-max(dy + 0.04, 0) * 7.0)
737 wb = hang * (0.55 + 0.45 * sin(u * 1.7 + 0.7))
738 skr = skr + wb * 0.26 * (0.4 + 0.6 * glow)
739 skg = skg + wb * 0.145 * (0.4 + 0.6 * glow)
740 skb = skb + wb * 0.045 * (0.4 + 0.6 * glow)
741 # cold moon behind cloud
742 mo = exp(-len(u - 0.28, v - 0.34) * 4.2) * 0.10
743 skr = skr + mo * 0.72
744 skg = skg + mo * 0.86
745 skb = skb + mo * 1.05
746 cr = cr + sky * skr
747 cg = cg + sky * skg
748 cb = cb + sky * skb
750 # ---------------------------------------------------------------- sky fracture
751 if (fiss > 0.01) {
752 n1 = fbm(u * 1.7 + 4.7, v * 1.7 - 2.3, 4)
753 n2 = fbm(u * 4.3 - 2.0, v * 4.3 + 5.0, 3)
754 vd = vor(u * 2.7 + n1 * 0.9 + n2 * 0.35, v * 2.7 + n1 * 0.6)
755 e0 = r2 - vd
756 edge = exp(-e0 * mix(120, 44, fiss))
757 edge = edge * step(0.52, hash(r1 * 91.7 + floor(t * 0.4)))
758 halo = exp(-e0 * 15.0) * 0.15
759 tear = exp(-abs(u + 0.10 * sin(t * 0.4) - 0.05) * mix(95, 28, fiss)) * step(0.45, fiss)
760 smk = fbm(u * 1.25 + t * 0.012, v * 1.25 - t * 0.018, 4)
761 brk2 = (0.45 + 0.55 * n2) * (1 - 0.45 * smooth(0.45, 0.85, smk))
762 hole = smooth(0.62, 1.0, fiss) * exp(-len(u - 0.05, v - 0.12) * 1.6)
763 cr = cr + sky * (fiss * (edge * 1.15 + halo + tear * 0.95) * brk2 + hole * 0.75)
764 cg = cg + sky * (fiss * (edge * 0.80 + halo * 0.60 + tear * 0.58) * brk2 + hole * 0.80)
765 cb = cb + sky * (fiss * (edge * 0.55 + halo * 0.40 + tear * 0.36) * brk2 + hole * 0.86)
766 }
768 # ---------------------------------------------------------------- giant letters
769 if (letterA > 0.01) {
770 if (y > 0.28 && y < 0.46) {
771 wy = (y - 0.28) / 0.18
772 wxp = (x - 0.18) / 0.64 * 6
773 li = floor(wxp)
774 lx = fract(wxp)
775 col = smooth(40, 47, t)
776 hl = hash(li * 3.7 + 1.1)
777 lx = lx + col * (hl - 0.5) * 0.9
778 wy = wy + col * (0.15 + 0.85 * hash(li * 7.3 + 2.2))
779 slice = floor(wy * 12)
780 lx = lx + col * (hash(slice * 1.7 + li * 5.3) - 0.5) * 0.55
781 code = str(tword, li)
782 g = glyph(code, lx, wy)
783 g2 = glyph(code, lx + 0.030, wy + 0.026)
784 inside = step(0.5, g)
785 rim = max(g2 - g, 0)
786 hg = 0.5 + 0.5 * wy
787 lr = 0.245 + 0.095 * hg
788 lg = 0.255 + 0.090 * hg
789 lb = 0.255 + 0.085 * hg
790 # sparse windows inside the monolith, to sell its scale
791 wl = step(0.9965, hash(floor(x * 170) * 1.3 + floor(y * 96) * 7.1))
792 wl2 = step(0.9975, hash(floor(x * 170 + 3.1) * 2.7 + floor(y * 96 + 1.7) * 5.3))
793 g3 = glyph(code, lx - 0.026, wy - 0.022)
794 rim2 = max(g3 - g, 0)
795 cr = mix(cr, lr, inside * letterA * 0.90)
796 cg = mix(cg, lg, inside * letterA * 0.90)
797 cb = mix(cb, lb, inside * letterA * 0.90)
798 fband = step(0.90, fract(wy * 8.0)) * inside * 0.018
799 cgrain = (hash(x * 731.0 + y * 389.0) - 0.5) * 0.045
800 cr = cr + inside * letterA * (wl * 0.95 + wl2 * 0.38 + cgrain) + fband * 0.35
801 cg = cg + inside * letterA * (wl * 0.72 + wl2 * 0.54 + cgrain) + fband * 0.34
802 cb = cb + inside * letterA * (wl * 0.48 + wl2 * 0.68 + cgrain) + fband * 0.33
803 cr = cr + rim * letterA * 0.45 + rim2 * letterA * 0.16
804 cg = cg + rim * letterA * 0.48 + rim2 * letterA * 0.18
805 cb = cb + rim * letterA * 0.55 + rim2 * letterA * 0.22
806 }
807 }
809 # ---------------------------------------------------------------- cube spiral
810 # dense tumbling cubes wrapping the giant ring, like the original
811 spA = smooth(10.0, 14.0, t) * (1.0 - smooth(36.0, 40.0, t)) * step(ringz, 80.0)
812 if (spA > 0.01) {
813 scx = u - ringx
814 scy = v - ringy
815 rc = len(scx, scy)
816 ac = atan2(scy, scx)
817 baseR = 14.0 / (ringz * 0.72)
818 rr = baseR * (1.0 + 0.045 * sin(ac * 3.0 + t * 0.55) + 0.020 * sin(ac * 8.0 - t * 0.9))
819 spin = t * 0.55
820 sc = ac / tau * 18.0 - spin + rc * 0.6
821 ci = floor(sc)
822 cf = fract(sc)
823 h0 = hash(ci * 7.13 + 2.7)
824 h1 = hash(ci * 3.71 + 5.1)
825 h2 = hash(ci * 9.37 + 1.9)
826 scale = 16.0 / ringz
827 rad = (0.022 + 0.030 * h1) * scale
828 sz = 0.30 + 0.20 * h0
829 bx = abs(rc - rr) / rad
830 by = abs(cf - 0.5) / sz
831 blk = step(bx, 1.0) * step(by, 1.0) * step(0.02, h2)
832 side = step(0.0, (rc - rr) * 3.0 + (cf - 0.5))
833 sh = (0.30 + 0.70 * h0) * (0.55 + 0.45 * side)
834 cr = cr + blk * spA * sh * 0.45
835 cg = cg + blk * spA * sh * 0.50
836 cb = cb + blk * spA * sh * 0.58
837 cr = cr * (1.0 - blk * spA * 0.10)
838 cg = cg * (1.0 - blk * spA * 0.10)
839 cb = cb * (1.0 - blk * spA * 0.08)
840 }
842 # ---------------------------------------------------------------- debris storm
843 if (storm > 0.02) {
844 m1 = swarm(9, 0.05, 1.3, 3.0)
845 m2 = swarm(15, 0.10, 4.7, 2.6)
846 m3 = swarm(26, 0.19, 8.1, 2.0)
847 dust = storm * (m1 * 0.95 + m2 * 0.80 + m3 * 0.60)
848 cr = cr + dust * 0.52
849 cg = cg + dust * 0.68
850 cb = cb + dust * 0.80
851 # dark flecks in front of the glow
852 md = swarm(11, 0.07, 6.3, 2.4) + swarm(21, 0.15, 3.1, 3.2)
853 md = min(md, 1) * storm * 0.55
854 cr = cr * (1 - md)
855 cg = cg * (1 - md)
856 cb = cb * (1 - md)
857 # a few big cubes
858 big = swarm(5.5, 0.02, 2.9, 1.1)
859 cr = cr + big * storm * 0.22
860 cg = cg + big * storm * 0.16
861 cb = cb + big * storm * 0.11
862 }
864 # ---------------------------------------------------------------- title + credit
865 if (titleA > 0.01) {
866 bm = smooth(0.27, 0.40, y) * (1 - smooth(0.52, 0.65, y))
867 cm = smooth(0.650, 0.685, y) * (1 - smooth(0.765, 0.800, y))
868 dim = max(bm, cm) * titleA * 0.68
869 cr = cr * (1 - dim)
870 cg = cg * (1 - dim)
871 cb = cb * (1 - dim)
872 if (y > 0.34 && y < 0.50) {
873 wy = (y - 0.34) / 0.16
874 wxp = (x - 0.26) / 0.48 * 6
875 li = floor(wxp)
876 lx = fract(wxp)
877 code = str(tword, li)
878 g = glyph(code, lx, wy)
879 cr = mix(cr, 0.92, step(0.5, g) * titleA)
880 cg = mix(cg, 0.83, step(0.5, g) * titleA)
881 cb = mix(cb, 0.70, step(0.5, g) * titleA)
882 }
883 }
884 if (credA > 0.01) {
885 if (y > 0.688 && y < 0.724) {
886 cw = 0.50 / 21
887 cxp = (x - 0.25) / cw
888 ci = floor(cxp)
889 lx = fract(cxp)
890 g = glyph(str(tcred1, ci), lx, (y - 0.688) / 0.036)
891 cr = mix(cr, 0.74, step(0.5, g) * credA)
892 cg = mix(cg, 0.66, step(0.5, g) * credA)
893 cb = mix(cb, 0.55, step(0.5, g) * credA)
894 }
895 if (y > 0.730 && y < 0.766) {
896 cw = 0.50 / 20
897 cxp = (x - 0.25) / cw
898 ci = floor(cxp)
899 lx = fract(cxp)
900 g = glyph(str(tcred2, ci), lx, (y - 0.730) / 0.036)
901 cr = mix(cr, 0.72, step(0.5, g) * credA)
902 cg = mix(cg, 0.64, step(0.5, g) * credA)
903 cb = mix(cb, 0.53, step(0.5, g) * credA)
904 }
905 }
907 # exposure, flash, feedback
908 cr = cr * (1.10 + 0.35 * kE + 0.55 * flash)
909 cg = cg * (1.14 + 0.32 * kE + 0.50 * flash)
910 cb = cb * (1.18 + 0.30 * kE + 0.46 * flash)
911 fade = smooth(0, 1.0, t)
912 rgb(cr * fade, cg * fade, cb * fade)
913 cprev(x, y, trail)
916post {
917 b = tap(-2, 0) + tap(2, 0) + tap(0, -2) + tap(0, 2) + tap(-3, -3) + tap(3, 3) + tap(-3, 3) + tap(3, -3)
918 bl = b * 0.125
919 ca = 0.15 + 2.2 * flash
920 rs = tap(ca, 0)
921 bs = tap(-ca, 0)
922 rr = mix(cget(0), rs, 0.22) + bl * 0.20
923 gg = cget(1) + bl * 0.22
924 bb = mix(cget(2), bs, 0.22) + bl * 0.28
925 bleed = max(bl * 1.7 - cget(0), 0) * 0.22
926 rr = rr + bleed * 0.55
927 gg = gg + bleed * 0.75
928 bb = bb + bleed * 1.05
929 rain = step(0.992, hash(floor(x * 430) * 1.7 + floor(y * 95 - time * 26))) * (1 - smooth(14, 24, time)) * 0.11
930 rr = rr + rain * 0.8
931 gg = gg + rain * 0.9
932 bb = bb + rain
933 d = len(u, v)
934 rr = rr * (1 - 0.42 * d * d)
935 gg = gg * (1 - 0.42 * d * d)
936 bb = bb * (1 - 0.42 * d * d)
937 gr = (hash(x * 917.1 + y * 331.7 + frame * 17.3) - 0.5) * 0.030
938 # cold grade: pull the reds down, lift the blues, raise the midtones
939 lum = 0.30 * rr + 0.59 * gg + 0.11 * bb
940 rr = mix(rr, lum * 0.94, 0.18)
941 gg = mix(gg, lum * 1.00, 0.18)
942 bb = mix(bb, lum * 1.10, 0.18)
943 rr = rr * 1.03 + 0.002
944 gg = gg * 1.05 + 0.003
945 bb = bb * 1.08 + 0.005
946 rgb(rr + gr, gg + gr, bb + gr * 1.1)

Click a line number to link to that line.