Entropy-Locked Recursive Glitch Textures
About
Everything in this piece is primarily driven by uniform random noise. Entropy locking refers to a technique used to limit the sampling space of this random noise, artificially constraining it to a restricted set of still totally random values, in an unpredictable way.
Specifically, these two lines control the entropy locking in this sketch:
if (random_int(1,1000)>997) fxrand=sfc32(...hashes)
if (random_int(1,1000)>997) fxrand=sfc32(...hashes)
Basically, if a certain random condition is met (3/1000 odds), the pseudorandom number generator will have its seed reset. The combination of the standard technique of controlling randomness via resetting the random seed, and the decision to do it at random—in a way controlled by the random seed—creates interesting recursive structures in the "entropy-space" of the sketch.
Sometimes these will be extremely short loops, sometimes they remain unstable and never repeat. Sometimes, they get trapped in a loop, only for something to change in the drawing, reaching some mysterious threshold of difference that causes a new random number to be generated, breaking free from the temporary loop and becoming "more random" again.
Recursive Techniques
More recursion and self-reference is included throughout the sketch. A recursive "shredding" process is used to render small samples of the image back onto itself, either smaller or larger. A similar technique is used to create the horizontal or vertical "tears" that slice up the screen.
These create feed-forward loops where pixel information stored on the screen is used to generate the next change to the image. When the pixel density is high enough (controllable via buttons 1-8 on the keyboard), immense and complicated structures arise in the minute details. An almost fractal-like pattern arises due to the intersection of the recursive nature of these feed-forward loops, and the recursive nature of the seed-loops created by entropy locking.
Additionally, the textures are allowed to propagate in an interesting way, due to the use of transparent backgrounds. The color and positioning of the underlying pixel art is also controlled strictly through randomization and self-reference.
Interactive Controls
- F11 - Fullscreen mode (or use browser menu)
- s - Save a PNG of the image
- 1-8 - Set pixel density and re-render (default is 2, higher = higher resolution; preview uses 5 at 1080x1080px)
- m - Toggle mobile/compatibility mode and re-render
- w - Re-render with white background
- b - Re-render with black background
- t - Re-render with transparent background
- r - Re-render with random background
I HIGHLY encourage you to increase the pixel density and export an ultra-high render of your output, if you have a PC capable of it.
Author's Notes
This was my attempt to make something more "serious", and one of my first attempts to play in earnest with my themes in p5.js. Or at least it feels that way sometimes. That's also why it's a jpeg generator, I didn't have enough courage at the time to stand by my convictions about infinite variety. It does scale nicely though which I'm proud of.
Technical Notes
Rendering Details
The image is rendered in the flat 2D engine, rather than WebGL, because the weird pixel artifacts it creates (especially at ultra-high resolution) are very satisfying visually, even though the exact mechanics aren't fully understood.
Platform: p5.js
Minted: 2022 on fxhash
License: CC0 - go nuts; citations not required but definitely appreciated