dmscene Demos & source

HOLLOWSTAR

hollowstar.dmt · 120 BPM · 28 s · 960×600

model-madeloopsspacetechno

notes

A dying hollow star: black disc, photon ring, streaked accretion disc and a lensed starfield, all falling inward over dark 120 BPM techno.

musicsynth sub-kick, sampled snare/hat, sub bass, usaw drone through a channel reverb, inharmonic FM bells, 16th arp in dotted-eighth delay, E9x rolls
visuala dying black hole in three timeline-cut scenes: a lensed starfield, a kick-pulsing photon ring, a differentially rotating ember accretion disc with orbiting sparks, then a cprevz infall collapse; bloom, radial chromatic aberration, grain, scanlines
filehollowstar.dmt
duration0:28
video960×600 · 30 fps · h264 + audio · 14 MB
song120 BPM · speed 6 · rpb 4 · 6 channels
loop2
renderscale 1 · dither on · master 0.52
uniformskickE snE bellE arpE holeR spinK lensK shx shy
modelKimi K3
collectionWritten by the models
tagsmodel-madeloopsspacetechno
source470 lines · 19 KB · download

anatomy

16VM programs
10patterns
2palettes
20timeline events
4text / sample / texture
470source lines
7inst
3chan
1master
1frame
3pixel
1post
2fn

line composition

pattern 43%pixel 26%inst 9%fn 4%post 4%palette 3%chan 3%frame 3%timeline 3%master 1%text 0%sample 0%title 0%song 0%order 0%pan 0%uniform 0%

play order

00123423567899

order list · loop returns to order 2 · 14 entries

palettes

ember6 keys · lines 25–32
void4 keys · lines 33–38

timeline

0:00 0:07 0:14 0:21 0:28 scene scene=0 at 0:00 scene=1 at 0:04 scene=2 at 0:16 scene=1 at 0:18 scene=2 at 0:24 glow glow=0.5 at 0:00 glow=0.9 at 0:04 glow=0.8 at 0:16 glow=1.25 at 0:18 glow=1 at 0:24 glow=0.45 at 0:27 die die=0 at 0:00 die=0 at 0:23 die=1 at 0:26 spin spin=0 at 0:00 spin=0 at 0:15 spin=1.2 at 0:16 spin=0 at 0:18 spin=0 at 0:23 spin=1.8 at 0:24
ateventvaluesource
0:00 scene 0 L41
0:00 glow 0.5 L41
0:00 die 0 L41
0:00 spin 0 L41
0:04 scene 1 L42
0:04 glow 0.9 L42
0:15 spin 0 L43
0:16 scene 2 L44
0:16 spin 1.2 L44
0:16 glow 0.8 L44
0:18 scene 1 L45
0:18 spin 0 L45
0:18 glow 1.25 L45
0:23 die 0 L46
0:23 spin 0 L46
0:24 scene 2 L47
0:24 spin 1.8 L47
0:24 glow 1.0 L47
0:26 die 1 L48
0:27 glow 0.45 L49

Event times are derived from the order list, pattern lengths, BPM and RPB. The timeline loops with the song, so this is the first pass.

resources

kindnameinfovalue
texttitle10HOLLOWSTAR
texttag22ALL LIGHT FALLS INWARD
samplesnareassets/snare.wav
samplehatassets/hat.wav

source

download .dmt
1# @description A dying hollow star: black disc, photon ring, streaked accretion disc and a lensed starfield, all falling inward over dark 120 BPM techno.
2# @tags space, techno
3# @model Kimi K3
4# @collection Written by the models
5# @music synth sub-kick, sampled snare/hat, sub bass, usaw drone through a channel reverb, inharmonic FM bells, 16th arp in dotted-eighth delay, E9x rolls
6# @visual a dying black hole in three timeline-cut scenes: a lensed starfield, a kick-pulsing photon ring, a differentially rotating ember accretion disc with orbiting sparks, then a cprevz infall collapse; bloom, radial chromatic aberration, grain, scanlines
7# @duration 28
8# hollowstar.dmt - a dying hollow star: black disc, photon ring, streaked
9# accretion disc, lensed starfield, orbiting sparks; everything falls inward
10# on the collapse scenes. Dark 120 bpm techno: synth kick + sub, sampled
11# snare/hat, drone in a hall, FM bells and a dotted-echo arp.
12# 14 bars of 16 rows at 120 bpm / speed 6 -> 28 seconds.
14title HOLLOWSTAR
15song bpm=120 speed=6 rpb=4 channels=6 loop=2 volume=0.52 dither=1
16order 0 0 1 2 3 4 2 3 5 6 7 8 9 9
17pan 0.5 0.6 0.5 0.42 0.62 0.38
19text title "HOLLOWSTAR"
20text tag "ALL LIGHT FALLS INWARD"
22sample snare "assets/snare.wav"
23sample hat "assets/hat.wav"
25palette ember {
26 0.00 0.02 0.00 0.03
27 0.25 0.35 0.05 0.08
28 0.50 0.90 0.25 0.10
29 0.72 1.00 0.65 0.25
30 0.88 1.00 0.95 0.80
31 1.00 0.03 0.01 0.05
33palette void {
34 0.00 0.01 0.01 0.04
35 0.40 0.05 0.15 0.35
36 0.70 0.30 0.60 0.90
37 1.00 0.90 0.95 1.00
40timeline {
41 0:00 scene=0 glow=0.5 die=0 spin=0
42 2:00 scene=1 glow=0.9
43 7:08 spin=0
44 8:00 scene=2 spin=1.2 glow=0.8
45 9:00 scene=1 spin=0 glow=1.25
46 11:08 die=0 spin=0
47 12:00 scene=2 spin=1.8 glow=1.0
48 13:00 die=1
49 13:08 glow=0.45
52# ------------------------------------------------------------------ helpers
53fn textline(s, px, py, sz) {
54 cx = (u - px) / sz
55 cy = (py - v) / sz
56 i = floor(cx)
57 return glyph(str(s, i), fract(cx), fract(cy)) * step(0, cx) * step(cx, strlen(s)) * step(0, cy) * step(cy, 1)
59fn stars(lx, ly, f) {
60 # one layer of twinkling point stars on a hashed grid
61 gx = floor(lx * f + 60)
62 gy = floor(ly * f + 60)
63 h1 = hash(gx * 1.71 + gy * 91.7)
64 px2 = fract(lx * f) - 0.5
65 py2 = fract(ly * f) - 0.5
66 sd = len(px2, py2)
67 twk = 0.55 + 0.45 * sin(beat * 2.2 + h1 * 40)
68 return exp(-sd * sd * (30 + 200 * h1)) * step(0.90, h1) * twk
71# ------------------------------------------------------------------ instruments
72# channels: 0 kick 1 snare/hat (sampled) 2 bass 3 drone 4 bell 5 arp
73inst kick {
74 f = 44 + 300 * exp(-t * 28)
75 $p = $p + f / sr
76 body = sin($p * tau) * exp(-t * 4.5)
77 click = hp(noise(), 4000) * exp(-t * 200) * 0.5
78 out(dist(body * 1.6 + click, 1.4) * 0.85)
80inst dsnare {
81 out(smp(snare, t) * 0.85)
83inst dhat {
84 out(smp(hat, t * (1.3 - 0.5 * vel)) * 0.5)
86inst bass {
87 e = env(0.004, 0.30, 0.6, 0.10)
88 s = sin(ph * tau) * 0.9 + bsaw(ph, freq) * 0.3
89 s = svf(s, 120 + 900 * e, 0.5)
90 out(s * e * 0.55)
92inst drone {
93 e = env(0.8, 1.0, 0.9, 1.2)
94 s = usaw(freq, 0.35) * 0.5 + sin(ph * tau * 0.5) * 0.6
95 s = svf(s, 200 + 500 * e + 120 * sin(t * 0.23), 0.6)
96 out(s * e * 0.16)
98inst bell {
99 # hollow FM bell: inharmonic partials, long decay
100 e = env(0.002, 1.1, 0.0, 0.4)
101 m = sin(ph * tau * 3.53) * exp(-t * 1.8) * 4.5
102 s = sin(ph * tau + m) * 0.75
103 s = s + sin(ph * tau * 2.756 + m * 0.35) * exp(-t * 2.6) * 0.4
104 s = s + sin(ph * tau * 5.41) * exp(-t * 5.0) * 0.18
105 out(s * e * 0.30)
107inst arp {
108 e = env(0.001, 0.18, 0.0, 0.06)
109 s = bsaw(ph, freq) + bsqr(ph, 0.5, freq * 2) * 0.3
110 s = svf(s, 300 + 5000 * e, 0.4)
111 out(s * e * 0.25)
114chan 3 {
115 w = verb(x, 0.90, 0.40)
116 out(x * 0.55 + w * 0.75)
118chan 4 {
119 d = dly(x, 0.5, 0.5)
120 w = verb(x * 0.7 + d * 0.3, 0.85, 0.5)
121 out(x + d * 0.45 + w * 0.35)
123chan 5 {
124 d = dly(x, 0.375, 0.42)
125 out(x + d * 0.38)
127master {
128 w = verb(l * 0.4 + r * 0.4, 0.80, 0.55)
129 out(dist(l + w * 0.14, 1.05) * 0.92, dist(r + w * 0.14, 1.05) * 0.92)
132# ------------------------------------------------------------------ patterns
133pattern 0 rows=16 {
134 # intro: drone + bells, a single arp note rings
135 . | . | . | A-2 5 30 | A-4 6 2C | .
136 . | . | . | . | . | .
137 . | . | . | . | . | .
138 . | . | . | . | . | .
139 . | . | . | . | . | .
140 . | . | . | . | . | .
141 . | . | . | . | . | .
142 . | . | . | . | . | .
143 . | . | . | . | E-5 6 24 | .
144 . | . | . | . | . | .
145 . | . | . | . | . | .
146 . | . | . | . | . | .
147 . | . | . | . | . | A-5 7 1C
148 . | . | . | . | . | .
149 . | . | . | . | . | .
150 . | . | . | . | C-5 6 20 | .
152pattern 1 rows=16 {
153 # kick + bass enter, quarter-note arp
154 C-2 1 40 | . | A-1 4 40 | A-2 5 2C | . | A-4 7 22
155 . | . | . | . | . | .
156 . | . | . | . | . | .
157 . | . | . | . | . | .
158 C-2 1 40 | . | . | . | . | C-5 7 20
159 . | . | . | . | . | .
160 . | . | A-1 4 36 | . | . | .
161 . | . | . | . | . | .
162 C-2 1 40 | . | A-1 4 38 | . | E-5 6 24 | E-5 7 20
163 . | . | . | . | . | .
164 . | C-6 3 12 | . | . | . | .
165 . | . | . | . | . | .
166 C-2 1 40 | . | . | . | . | A-5 7 22
167 . | . | . | . | . | .
168 . | C-6 3 12 | G-1 4 30 | . | . | .
169 . | . | . | . | . | .
171pattern 2 rows=16 {
172 # full groove, Am
173 C-2 1 40 | . | A-1 4 40 | A-2 5 28 | . | A-4 7 24
174 . | . | . | . | . | C-5 7 1A
175 . | C-6 3 14 | . | . | . | E-5 7 20
176 . | . | A-1 4 34 | . | . | A-5 7 24
177 C-2 1 40 | C-4 2 38 | . | . | . | C-6 7 20
178 . | . | . | . | . | A-5 7 1C
179 . | C-6 3 14 | A-1 4 38 | . | . | E-5 7 20
180 . | C-6 3 0E | . | . | . | C-5 7 18
181 C-2 1 40 | . | A-1 4 40 | . | C-5 6 2A | A-4 7 22
182 . | . | . | . | . | C-5 7 1A
183 . | C-6 3 14 | . | . | . | E-5 7 20
184 . | . | A-2 4 34 | . | . | A-5 7 24
185 C-2 1 40 | C-4 2 38 | . | . | . | E-6 7 22
186 . | . | . | . | . | C-6 7 1C
187 . | C-6 3 14 | A-1 4 36 | . | . | A-5 7 1E
188 . | C-6 3 0E | . | . | . | E-5 7 18
190pattern 3 rows=16 {
191 # full groove, F
192 C-2 1 40 | . | F-1 4 40 | F-2 5 28 | . | F-4 7 24
193 . | . | . | . | . | A-4 7 1A
194 . | C-6 3 14 | . | . | . | C-5 7 20
195 . | . | F-1 4 34 | . | . | F-5 7 24
196 C-2 1 40 | C-4 2 38 | . | . | . | A-5 7 20
197 . | . | . | . | . | F-5 7 1C
198 . | C-6 3 14 | F-1 4 38 | . | . | C-5 7 20
199 . | C-6 3 0E | . | . | . | A-4 7 18
200 C-2 1 40 | . | F-1 4 40 | . | A-4 6 2A | F-4 7 22
201 . | . | . | . | . | A-4 7 1A
202 . | C-6 3 14 | . | . | . | C-5 7 20
203 . | . | F-2 4 34 | . | . | F-5 7 24
204 C-2 1 40 | C-4 2 38 | . | . | . | A-5 7 22
205 . | . | . | . | . | F-5 7 1C
206 . | C-6 3 14 | F-1 4 36 | . | . | C-6 7 1E
207 . | C-6 3 0E | . | . | C-5 6 22 | A-5 7 18
209pattern 4 rows=16 {
210 # G with a snare fill
211 C-2 1 40 | . | G-1 4 40 | G-2 5 28 | . | G-4 7 24
212 . | . | . | . | . | B-4 7 1A
213 . | C-6 3 14 | . | . | . | D-5 7 20
214 . | . | G-1 4 34 | . | . | G-5 7 24
215 C-2 1 40 | C-4 2 38 | . | . | . | B-5 7 20
216 . | . | . | . | . | G-5 7 1C
217 . | C-6 3 14 | G-1 4 38 | . | . | D-5 7 20
218 . | C-6 3 0E | . | . | . | B-4 7 18
219 C-2 1 40 | . | G-1 4 40 | . | D-5 6 28 | G-4 7 22
220 . | . | . | . | . | B-4 7 1A
221 . | C-6 3 14 | . | . | . | D-5 7 20
222 . | . | G-2 4 34 | . | . | G-5 7 24
223 C-2 1 40 | C-4 2 30 | G-1 4 36 | . | . | B-5 7 22
224 . | C-4 2 24 | . | . | . | .
225 . | C-4 2 2C E93 | E-1 4 30 | . | . | .
226 . | C-6 3 10 | . | . | G-5 6 20 | .
228pattern 5 rows=16 {
229 # break: no kick, bells and echoes while the star breathes in
230 . | . | A-1 4 34 | A-2 5 30 | A-4 6 30 | A-5 7 1E
231 . | . | . | . | . | .
232 . | . | . | . | . | .
233 . | . | . | . | . | .
234 . | C-6 3 0C | . | . | . | E-6 7 1A
235 . | . | . | . | . | .
236 . | . | . | . | C-5 6 28 | .
237 . | . | . | . | . | .
238 . | . | . | . | . | C-6 7 1C
239 . | . | . | . | . | .
240 . | . | . | . | E-5 6 26 | .
241 . | . | . | . | . | .
242 . | C-6 3 0C | . | . | . | A-5 7 18
243 . | . | . | . | . | .
244 . | . | . | . | . | .
245 . | C-6 3 08 | . | . | G-5 6 1E | .
247pattern 6 rows=16 {
248 # return, busier Am an octave up on the arp
249 C-2 1 40 | . | A-1 4 40 | A-2 5 2A | E-5 6 26 | A-5 7 24
250 . | . | . | . | . | C-6 7 1A
251 . | C-6 3 14 | . | . | . | E-6 7 20
252 . | . | A-2 4 34 | . | . | A-6 7 24
253 C-2 1 40 | C-4 2 38 | . | . | . | C-7 7 20
254 . | . | . | . | . | A-6 7 1C
255 . | C-6 3 14 | A-1 4 38 | . | . | E-6 7 20
256 . | C-6 3 0E | . | . | . | C-6 7 18
257 C-2 1 40 | . | A-1 4 40 | . | . | A-5 7 22
258 . | . | . | . | . | C-6 7 1A
259 . | C-6 3 14 | . | . | . | E-6 7 20
260 . | . | A-2 4 34 | . | . | A-6 7 24
261 C-2 1 40 | C-4 2 38 | . | . | G-5 6 24 | E-7 7 22
262 . | . | . | . | . | C-7 7 1C
263 C-2 1 34 | C-6 3 14 | E-2 4 36 | . | . | A-6 7 1E
264 . | C-6 3 0E | . | . | . | E-6 7 18
266pattern 7 rows=16 {
267 # F again, snare push at the end
268 C-2 1 40 | . | F-1 4 40 | F-2 5 28 | . | F-5 7 24
269 . | . | . | . | . | A-5 7 1A
270 . | C-6 3 14 | . | . | . | C-6 7 20
271 . | . | F-1 4 34 | . | . | F-6 7 24
272 C-2 1 40 | C-4 2 38 | . | . | F-5 6 28 | A-6 7 20
273 . | . | . | . | . | F-6 7 1C
274 . | C-6 3 14 | F-1 4 38 | . | . | C-6 7 20
275 . | C-6 3 0E | . | . | . | A-5 7 18
276 C-2 1 40 | . | F-1 4 40 | . | . | F-5 7 22
277 . | . | . | . | . | A-5 7 1A
278 . | C-6 3 14 | . | . | . | C-6 7 20
279 . | . | F-2 4 34 | . | . | F-6 7 24
280 C-2 1 40 | C-4 2 38 | . | . | A-5 6 24 | A-6 7 22
281 . | C-4 2 2C | . | . | . | F-6 7 1C
282 . | C-6 3 14 | C-2 4 36 | . | . | C-6 7 1E
283 . | C-6 3 0E | . | . | . | A-5 7 18
285pattern 8 rows=16 {
286 # build: 16th hats, snare roll, rising arp
287 C-2 1 40 | C-6 3 18 | A-1 4 38 | A-2 5 2C | A-4 6 2A | A-4 7 24
288 . | C-6 3 0C | . | . | . | .
289 . | C-6 3 16 | A-1 4 30 | . | . | C-5 7 22
290 . | C-6 3 0C | . | . | . | .
291 C-2 1 40 | C-4 2 38 | A-1 4 38 | . | . | E-5 7 24
292 . | C-6 3 0C | . | . | . | .
293 . | C-6 3 16 | A-1 4 30 | . | . | A-5 7 22
294 . | C-6 3 0C | . | . | . | .
295 C-2 1 40 | C-6 3 18 | A-1 4 38 | . | C-5 6 28 | C-6 7 24
296 . | C-6 3 0C | . | . | . | .
297 . | C-6 3 16 | A-1 4 30 | . | . | E-6 7 22
298 . | C-6 3 0C | . | . | . | .
299 C-2 1 40 | C-4 2 38 | A-1 4 38 | . | . | A-6 7 24
300 . | C-4 2 30 E92 | . | . | . | .
301 C-2 1 34 | C-4 2 34 E92 | A-1 4 38 | . | E-5 6 2A | E-7 7 22
302 . | C-4 2 3A E92 | . | . | . | .
304pattern 9 rows=16 {
305 # outro: the star dies; kick once, bells ring out
306 C-2 1 30 | . | A-1 4 3A | A-2 5 30 | A-4 6 34 | A-5 7 20
307 . | . | . | . | . | .
308 . | . | . | . | . | .
309 . | . | . | . | . | .
310 . | . | . | . | . | .
311 . | . | . | . | . | .
312 . | . | . | . | . | .
313 . | . | . | . | . | .
314 . | . | . | . | . | E-6 7 1A
315 . | . | . | . | . | .
316 . | . | . | . | C-5 6 26 | .
317 . | . | . | . | . | .
318 . | . | . | . | A-4 6 1E | .
319 . | . | . | . | . | .
320 . | . | . | . | . | .
321 . | . | . | . | E-5 6 22 | .
324# ------------------------------------------------------------------ visuals
325uniform kickE snE bellE arpE holeR spinK lensK shx shy
327frame {
328 select(evt(scene))
329 kickE = exp(-trig(0) * 8)
330 snE = exp(-trig(1) * 9) * step(0.5, vel(1))
331 bellE = exp(-trig(4) * 2.5)
332 arpE = exp(-trig(5) * 9)
333 holeR = 0.14 + evtl(die) * 0.32
334 spinK = evtl(spin)
335 lensK = 0.10 + 0.06 * kickE
336 shx = kickE * 0.012 * sin(beat * 41)
337 shy = kickE * 0.012 * cos(beat * 37)
340pixel intro {
341 # deep space, a faint ring breathing with the bells, title
342 r = polar(u, v) + 0.0001
343 a = r1
344 warp = 0.06 / (r + 0.18)
345 lx = u * (1 + warp)
346 ly = v * (1 + warp)
347 neb = fbm(lx * 1.6 + 5.1, ly * 1.6 - 2.3, 4)
348 pal(void, 0.15 + neb * 0.35)
349 cmul(0.45)
350 s1 = stars(lx, ly, 22)
351 s2 = stars(lx + 3.3, ly - 1.7, 41)
352 cadd(s1 * 0.60 + s2 * 0.35, s1 * 0.62 + s2 * 0.36, s1 * 0.75 + s2 * 0.45)
353 ring = exp(-abs(r - 0.30) * 60) * (0.10 + 0.35 * bellE + 0.06 * sin(beat * pi))
354 cadd(ring * 0.9, ring * 0.55, ring * 0.30)
355 ttl = textline(title, -0.70, 0.12, 0.14)
356 halo = textline(title, -0.692, 0.112, 0.14)
357 fade = smooth(0.4, 2.0, time)
358 cadd((ttl + halo * 0.5) * fade * 0.95, (ttl + halo * 0.4) * fade * 0.72, (ttl + halo * 0.3) * fade * 0.42)
359 tg = textline(tag, -0.50, -0.14, 0.045) * smooth(1.2, 3.0, time)
360 cadd(tg * 0.55, tg * 0.60, tg * 0.72)
361 cmul(1 + 0.12 * bellE)
364pixel star {
365 # the hollow star: black disc, photon ring, streaked accretion disc
366 sx = u + shx
367 sy = v + shy
368 rr = polar(sx, sy) + 0.0001
369 a = r1
371 # gravitationally lensed sky coordinates
372 warp = lensK / (rr + 0.10)
373 lx = sx * (1 + warp)
374 ly = sy * (1 + warp)
375 rx2 = rot(lx, ly, beat * 0.01)
376 ry2 = r1
378 # accretion disc with differential rotation, seam-free noise domain
379 discR = 0.30
380 dr = rr - discR
381 band = exp(-dr * dr * 240)
382 streak = fbm(cos(a) * 1.8 + beat * 0.6 / (rr * 4 + 0.4), sin(a) * 1.8 + rr * 9, 5)
383 beam = 0.55 + 0.75 * (0.5 + 0.5 * cos(a + 0.7)) ^ 2
384 dk = band * (0.35 + 1.1 * streak) * beam
385 pal(ember, 0.85 - rr * 1.6 + streak * 0.25)
386 cmul(dk * (0.85 + 0.4 * kickE))
388 # cold nebula and two star layers behind everything
389 neb = fbm(rx2 * 1.5 + 3.7, ry2 * 1.5 - 1.3, 4)
390 cadd(neb * neb * 0.10, neb * neb * 0.05, neb * neb * 0.16)
391 s1 = stars(rx2, ry2, 22)
392 s2 = stars(rx2 + 3.3, ry2 - 1.7, 41)
393 cadd(s1 * 0.55 + s2 * 0.30, s1 * 0.58 + s2 * 0.31, s1 * 0.72 + s2 * 0.40)
395 # photon ring hugging the hole
396 ring = exp(-abs(rr - holeR - 0.035) * 200) * (1.0 + 0.8 * kickE + 0.4 * arpE)
397 cadd(ring * 1.25, ring * 1.10, ring * 0.85)
399 # the hollow interior: near black with a cold whisper of gas
400 cmul(mix(0.03, 1.0, smooth(holeR * 0.72, holeR * 1.04, rr)))
401 vd = fbm(cos(a) + beat * 0.05, sin(a) + rr * 3 - beat * 0.08, 4)
402 inM = 1 - smooth(holeR * 0.5, holeR * 0.95, rr)
403 mixpal(void, vd * 0.7 + beat * 0.01, inM * 0.30)
405 # orbiting sparks, some retrograde
406 repeat i 9 {
407 hi = hash(i * 17.31 + 4.7)
408 dir2 = 1 - 2 * step(0.5, hash(i * 5.77 + 0.3))
409 ang = hi * tau + beat * (0.20 + 0.45 * hash(i * 3.17)) * dir2 * tau * 0.35
410 rad = discR * (0.72 + 0.62 * hash(i * 7.93 + 1.1))
411 dx2 = sx - cos(ang) * rad
412 dy2 = sy - sin(ang) * rad
413 sp2 = exp(-(dx2 * dx2 + dy2 * dy2) * 3200) * (0.30 + 0.70 * (0.5 + 0.5 * sin(beat * 5 + i * 2.1)))
414 cadd(sp2 * 1.30, sp2 * 0.85, sp2 * 0.40)
415 }
417 # kick glow in the core region
418 cadd(kickE * 0.10 * exp(-rr * 5), kickE * 0.05 * exp(-rr * 5), kickE * 0.03 * exp(-rr * 5))
419 cmul(1 + 0.18 * kickE)
422pixel collapse {
423 # the star falls into itself: shrinking rings + inward spiral feedback
424 rr = polar(u, v) + 0.0001
425 a = r1
426 ph2 = fract(beat * 0.5)
427 ringr = mix(0.92, holeR * 1.55 + 0.03, ph2)
428 lump = 0.55 + 0.9 * fbm(cos(a) * 2.3 + beat * 0.35, sin(a) * 2.3 - beat * 0.22, 3)
429 ring = exp(-abs(rr - ringr) * 22) * (0.30 + 0.9 * kickE) * lump
430 ring2 = exp(-abs(rr - mix(0.80, holeR * 1.45, fract(ph2 + 0.5))) * 30) * (0.2 + 0.5 * bellE) * lump
431 pal(ember, 0.3 + ph2 * 0.5 + beat * 0.02)
432 cmul((ring + ring2 * 0.7) * (0.5 + 0.5 * evtl(glow)))
433 st2 = fbm(cos(a) * 2 + rr * 6, sin(a) * 2 - beat * 0.2, 4)
434 cadd(st2 * 0.14 * exp(-rr * 1.2), st2 * 0.09 * exp(-rr * 1.2), st2 * 0.20 * exp(-rr * 1.2))
435 # sparks spiralling to their death
436 repeat i 7 {
437 hi = hash(i * 11.17 + 2.9)
438 ph3 = fract(beat * (0.25 + 0.3 * hash(i * 3.71)) + hi)
439 rad = mix(0.60, holeR * 1.05, ph3)
440 ang = hi * tau + ph3 * tau * (1.5 + hash(i * 7.13)) + beat * 0.2
441 dx2 = u - cos(ang) * rad
442 dy2 = v - sin(ang) * rad
443 sp2 = exp(-(dx2 * dx2 + dy2 * dy2) * 2600) * 0.9
444 cadd(sp2 * 1.2, sp2 * 0.7, sp2 * 0.35)
445 }
446 # zoom < 1: the previous frame is pulled toward the hole, with a twist
447 cprevz(0.5, 0.5, 0.988 - 0.012 * min(spinK, 2), 0.02 + 0.03 * spinK + 0.03 * snE, 0.86)
448 cmul(0.935)
449 # the hole eats the light; it grows while the star dies
450 cmul(mix(0.0, 1.0, smooth(holeR * 0.85, holeR * 1.25, rr)))
451 rim2 = exp(-abs(rr - holeR * 1.18) * 90) * (0.5 + 0.9 * kickE + 0.5 * arpE)
452 cadd(rim2 * 1.2, rim2 * 0.55, rim2 * 0.22)
455post {
456 # bloom, radial chromatic aberration, grain, vignette, faint scanlines
457 g = evtl(glow)
458 b = tap(-3, 0) + tap(3, 0) + tap(0, -2) + tap(0, 2) + tap(-2, -2) + tap(2, 2) + tap(-2, 2) + tap(2, -2)
459 bl = b * 0.125
460 ca = 1.5 + 3.5 * kickE + 2.0 * snE
461 cr = tap(-u * ca, -v * ca)
462 cbv = tap(u * ca, v * ca)
463 cb = r2
464 rgb(mix(cget(0), cr, 0.55) + bl * 0.42 * g, cget(1) + bl * 0.34 * g, mix(cget(2), cb, 0.55) + bl * 0.5 * g)
465 gr = (hash(x * 913.7 + y * 771.3 + frame * 0.731) - 0.5) * 0.045
466 cadd(gr, gr, gr)
467 d = len(u, v)
468 cmul(1 - 0.34 * d * d)
469 cmul(1 - 0.09 * step(0.5, fract(y * h * 0.5)))

Click a line number to link to that line.