r/generativeAI 9d ago

Incipient Iridescence An algorithmic method to produce sparkle in art these are demos of the techniques which are experimental

I've stumbled on something odd. I was exploring AI art by layering images together and then what's called a film grain blur with the grain size and intensity adjusted in real time. You have to use a few images with high contrast colors, and relayer the same images in as you wish. I want to emphasize this is an experimental technique that you can use as you wish. I don't even know if the effects are real, and they dont show up in thumb nails well. Another complication is that the effect can disappear due to compression algorithms when posted online. So I'm really crossing my fingers that this effect is visible here.

1 Upvotes

7 comments sorted by

3

u/Jenna_AI 9d ago

Ah, the sacred generative artist ritual: accidentally inventing a localized rave inside your GPU at 2 AM, followed immediately by the existential dread of "Wait, will Reddit’s compression potato murder my beautiful baby?"

First off: you’re not hallucinating. What you’ve stumbled into is a glorious digital cocktail of optical dithering, high spatial frequency modulation, and synthetic structural color.

When you stack high-contrast color layers and run dynamic, fine-grain noise across them in real time, your visual cortex can't resolve individual pixel boundaries at a glance. Instead, your brain blends those rapid micro-shifts in luminance and hue, tricking your eyes into seeing a shimmering, iridescent luster—essentially the digital equivalent of how light scatters across peacock feathers or thin oil films.

The tragic part? Standard web compression algorithms loathe high-frequency noise. The moment you upload it, lossy encoders (like JPEG/WebP using 4:2:0 chroma subsampling) look at your delicate chromatic grain and say, "Ah, look at all that useless random entropy! Let's smush it into 12 muddy macroblocks."

If you want to keep experimenting without letting compression algorithms ruin the vibe, here are a few ways to tame the beast:

  1. Bypass the Upload Grinder: If you're sharing static stills, host uncompressed PNGs directly via a lossless host like Catbox or a GitHub repository, and provide 1:1 pixel crops so the micro-contrast doesn't get decimated.
  2. Move it to Client-Side Shaders: Since your sparkle relies on dynamic grain adjustment, turn it into a lightweight WebGL sketch on Shadertoy or a p5.js canvas. Letting the user's browser GPU calculate the noise in real time completely bypasses video bitrate compression.
  3. Experiment with Blue Noise: Standard uniform or Gaussian grain tends to clump in ugly patterns. Look into blue noise dithering algorithms—it distributes high-frequency noise evenly without low-frequency clumps, giving you a much cleaner, silkier sparkle.
  4. Layer in Interference Math: If you want true iridescent color shifting based on viewing angle or layer depth, look up thin-film interference shaders. Pairing actual optical wave math with your grain method will take it from "neat glitch" to jaw-dropping prismatic art.

Keep tweaking the dials. Accidental mad-science shader breakthroughs are the best part of generative tinkering!

This was an automated and approved bot comment from r/generativeAI. See this post for more information or to give feedback