Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

More Dynamic Palette Indexation

A topic by CrypticSky created Jan 31, 2023 Views: 313 Replies: 6
Viewing posts 1 to 7
(1 edit)

I'm really loving the software! I feel like one thing would be nice to add to the palette indexation feature though, it would make the workflow a lot smoother.

You see, you can change the matching colors of the palette easily, and I love that, but I haven't found a way to change/adjust the indexation of the image. So say, I have a shader where most pixels of the image are expected to change dynamically (to change a character's clothing, for example) but the actual number of needed colors is low, because I might have a long sleeved or short sleeved shirt, but it'll be few colors.

So I don't actually need a huge palette, but in order to be able to tell the shader that the sleeves can be a different color than the torso, the initial image needs to have them be a different color. Same for the hands. What if I want the character to wear a ring? That's another unique pixel color to add... and so on and so forth.

Issue is, if I have to have every single pixel (or at least, a majority of them) of the original image a different color in order for the palette to index them properly, it makes the image completely unreadable, and it's easy to get lost. Is there already a way around this? If not, here's my idea:

It would be really nice to be able to click/select on the image, and associate the pixels to a new indexed color as a region. That way, I can say, upload the sprite of the naked character, define the shirt and sleeve regions I want in the software, and save the color palettes for the different clothes. Could even name them! Sleeve1 is color 1 in palette 1, but it's color 2 in palette 4, etc. And in an animation, I could carry over the indexed regions, so that the colors stay synchronized by simply telling the image what is shirt and what is bare skin for that frame. That way, no need to manually recolor anything!

I've seen that technique done, but I haven't found an easy way to implement it yet... I would rather not go over all of my pixels incrementing the R value by one manually... it's very, very long, and it's easy to make mistakes, even for small sprites...

Of course, I could try and use layers for the clothes, but it defeats the point of using a palette for this ^^;; Besides, I'd have to create animations for all the articles of clothing, then layer them and save them separately, it's tedious and feels unnecessary for a smaller sprite... So if a similar feature already exists, I'd love to see it (still quite new to this after all!) but if not,  I think it'd be a cool feature :3

Hey, thank you for your feedback. Yes totally it should be like masks it could be previsualised with a color by mask. I could even implement a cluster algorithm to automatically create them.

Thank you for your idea !

Else if it's just about color swap there is matching palette (it's just under indexation) you can put a palette which replace the colors based on the indexation palette color index

(1 edit)

Yes I was already aware of the swapping via matching palette, that feature is really well done! It just needs this kind of flexibility to reach full potential I think. Happy to see you also like the idea, and happy to help :-) 

(1 edit)

I was looking for it and found something that might be helpful to you regarding this feature: The video that initially introduced me to the concept!


As you can see, there's an in-between step that makes it work as a normal (exportable馃憖) shader, which you may already be familiar with. It's easy to set pixel colors through code, so you could use the same trick to define the regions? 

And I believe you can definitely make it work with an indexed palette rather than coordinates like you already have, though that could be interesting as well.

There's also an article from Kururo Beasts explaining how they used Dynamic Pixel Mapping for creating different clothes and accessories using the same animation, it resembles the concept Aarthificial has shown in the video, maybe that can help you with some more inspiration.

Thank you for the article, yes that's very interesting 

Looks like You want the same thing i do, so theres 2 of us