tally ho!


๐ŸŽฎ nice gear games
nicegear.games/
๐Ÿ“ฐ ใ‚คใƒณใƒ‡ใ‚ฃใƒผ้€šไฟก indie tsushin
indietsushin.net/
๐Ÿ˜ mastodon
gamedev.lgbt/@renkotsuban
๐Ÿ’ฌ discord
renkotsuban
๐Ÿ“ง e-mail
nicegear.games/#contact

zanzlanz
@zanzlanz

Happy New Year, Cohost!

I just made a brand new version of my "Wave Function Collapse"-inspired algorithm.

My previous version was basically this:

Loop through all the blank pixels of the bigger image. The goal is to find a pixel that's super confident it knows which color it should be, simply by it comparing its surroundings to a small input image. Resolve that one pixel. Then do the whole thing again to find the next most confident pixel.

Well someone reached out to me about it a couple days ago, inspiring me to take another stab at the problem. This new approach is the same concept, except ALL pixels guess which color they should be, all at once. Then it iterates a few times over to gradually get clearer and clearer.

If that wasn't quite clear, here's an analogy ๐ŸฆŽ:

It's like a grid of a million chameleons, where each one is trying to blend in with its nearby friends in order to best mimic the input image.

The big bonus of doing all pixels at once is I could easily implement it on ShaderToy, so it can run in your browser :O! Check it out:

It should be butter smooth on desktop - but sadly not so much on mobile.

If you're curious, you can make your own by editing my array of pixels in Buffer A. Just make sure to update the width and height in the Common script. I'd really love to see what patterns and variants you guys come up with!

With the proper adjustments, I can see this technique being usable for procedural map generation or texture synthesis. But in its current state, at least in my examples, maybe it's a little silly looking still ^^ What do you think?


You must log in to comment.

in reply to @zanzlanz's post: