![]() I fear this was all gibberish and doesn't help anyone. Oh, if anyone want's to know what game it is :D A roguelike mining game with monsters attacking your dome cyclically So in general, per Node swaps seem to be working better. I also experimented a bit with screen space swaps, but those don't play nice with UI or anything else that has transparency. Features the Master Sword from The Legend of Zelda. Blue: Based on concept art of Frollo and on Undertales Toriel. Features Kirbys Fire Sword from Kirby 64: The Crystal Shards. ![]() The result you can see in the video - i can dynamically swap between different palettes. Red: Based on Esmeraldas Festival Costume & Gaston. Additionally, i save all the color values separately, to adjust things like gradients, font colors or line colors. So for example, you see a pixel with a red value of 0.6, and then sample from the goal palette at uv (0.6, 0.0) to get your swap color. I do have another script that does that for every sprite automatically, so the sprite doesn't need to take care of that. The basic idea behind palette swaps is usually this: Take a color value from the original texture, do some math on it and use it to look up color in a swap palette, to use that color instead. This can the be used in a shader, to swap all colors to the goal palette, while the sprite itself is made in the base palette. The palettes are also wider than, for example, 8 pixels for 8 colors, so the colors can actually be unevenly distributed and no strange edge cases happen with the lookup. The result will look something like this: 'll notice the colors are not evenly distributed, but take the space exactly so that the "uneven" lookup from the base color does hit the right swap color. The "doing some math on it" in this case is just taking the average across all color channels (= the grey value). It the calculates a new goal palette, so that the color value lookups from the base palette always hit the right color. will i ever remember to post to tumblr probably not drew this a while ago but underswap gaster with his grandkid(s) personal headcanon of mine is that. I wrote a small program that takes a base palette that is used for all your sprites and a goal palette. I'm not sure if this is common knowledge, but i found a way around it (which might be obvious after this introduction): the swap palettes don't need to be evenly distributed, but can distribute their colors in a way to make the lookup from the base palette always hit correctly. That would mean the lookup on the goal palette would probably hit the same swap color for multiple base colors. However, the problem with having your base palette not as evenly distributed greyscale is that the lookup on the swap texture can get the wrong color. On the other hand, i don't like having grey sprites everywhere either, or having to run a converter program after getting a new sprite. One of the most famous examples of palette swapping is Mortal Kombats Scorpion and Reptile, who are simple swaps of Sub-Zero. Undyne is the Royal Scientist and Alphys is the Captain of the Royal Guards, and so on and so forth. For example, Toriel is queen and Asgore is the Caretaker for the Ruins in this AU. I didn't like this, because i don't think any pixel artist likes to pixel in greyscale, or likes the additional work saving everything as grey. In fighting games, such as Mortal Kombat or Street Fighter, palette swapping lets them increase their roster of fighters without having to draw new ones. 8 Wins - 0 dodges, 360 Health SwapSans Theme - SwapSans Fight SwapSans comes from the AU of UnderSwap, which 'swaps' the roles and personalities of characters in pairs. This is the easiest to do, because you can control the base colors well by evenly distributing the color values. So for example, you see a pixel with a red value of 0.6, and then sample from the goal palette at uv=(0.6, 0.0) to get your swap color.Īll examples i found required the sprites to be in greyscale (or do strange things you don't want to do in shaders, like tons of if clauses). A palette swap, alternatively known as costume change or alternate color, is a mechanic used in video games, whereby a graphic that is already used for one element is given a different palette, so it can be reused as other elements. The basic idea behind palette swaps is usually this: Take a color value from the original texture, do some math on it and use it to look up color in a swap palette, to use that color instead. ![]() I was always interested in palette swaps, especially for out current game in development, as it has a small palette.
0 Comments
Leave a Reply. |