I Made "Paint by Numbers" in Unity

Опубликовано: 09 Октябрь 2024
на канале: Kyle Banks // Farewell North
2,886
262

Check out Codecks and get 50% off the first 3 months of any subscription
👉 https://codecks.io/kyle

Support development on Patreon
❤️   / kylebanks  

Wishlist Farewell North on Steam
👉 https://farewell-north.com/steam

Join the Discord
👉 https://farewell-north.com/discord

In this video we'll dig into multiple clustering algorithms, including K-Means Clustering and Simple Linear Iterative Clustering (SLIC Superpixels), to see if we can generate Paint by Numbers from any image in Unity. We'll implement these algorithms in Compute Shaders and C# to eventually implement color palette selection and region segmentation for our Paint by Numbers generator.

We'll also explore a few supporting topics, including the CIELAB color space to see if it allows us to better select our palette colors from the original image, a simple blur technique to smooth out the image details, and feeding the SLIC output into our K-Means algorithm for a nice performance boost.

Enjoy!

References & Credits:
All images in this video from Unsplash.com
The Ultimate Guide to K-Means Clustering: Definition, Methods and Applications - https://www.analyticsvidhya.com/blog/...
SLIC Superpixels - https://www.epfl.ch/labs/ivrl/researc...
An Improved SLIC Algorithm for Segmentation of Microscopic Cell Images - https://www.sciencedirect.com/science....
Segmentation: A SLIC Superpixel Tutorial using Python - https://pyimagesearch.com/2014/07/28/...
slic-python-implementation - https://github.com/laixintao/slic-pyt...
CIELAB Color Space - https://en.wikipedia.org/wiki/CIELAB_...
ColorSpace - https://github.com/fuqunaga/ColorSpace
Your Colors Suck (it's not your fault) -    • Your Colors Suck (it's not your fault)  

Game Overview:
Restore color to the desolate islands of Farewell North, an open world journey where you play as a collie traveling with his owner. Explore land and sea, uncover hidden paths, evade monsters, and free wildlife to bring color back to the world while revealing an emotional story about saying farewell.

0:00 Paint by Numbers
0:35 K-Means Clustering
3:33 CIELAB Color Space
5:25 codecks.io/kyle
6:30 Simple Linear Iterative Clustering (SLIC Superpixels)
8:55 Blur
9:30 Borders
11:00 SLIC into K-Means
11:35 Paint by Numbers

#devlog #gamedev #gaming #videogames #indiedev #indiegame #unity #unity3d #madewithunity #indiegames #indiegamedev #gamers #superpixels #algorithm #shaders