AuthorTopic: A linear palette that can hue-shift  (Read 1973 times)

Offline Vinik

  • 0010
  • *
  • Posts: 210
  • Karma: +0/-0
    • View Profile

A linear palette that can hue-shift

on: September 26, 2016, 10:03:52 pm
Hello everyone, I believe this the right place to post this, sorry if I am mistaken. Since I have restarted pixeling I have tried to learn about "good" palettes, and, as you can imagine everything points to connected, hue-shifted swatches and keeping a "low" color count. But then again, I keep redoing said palettes for each piece, and I miss the sense of continuity that I had way back when I knew nothing of typical pixel art palette choice, and used basically linear palettes only with slight tweaks. Sometimes I don't feel like hue-shifting at all, sometimes it seems absolutely necessary. Because of that I started experimenting with 4-steps linear, mostly unconnected palettes that can be used to start faster, and also hue-shift pretty well when needed as if it was designed for that. This is what I came up with recently:

I started by tweaking the aseprite's NES NTSC palette which was already in 4 shades and somewhat value corrected, shrinked it by cutting a lot of blues and purples, then started changing the entries the make it possible for any swatch to be hue-shifted as nicely as possible by simply picking the colors diagonally in either direction.

The first row is the palette (40 colors + transparent), the second and third ones are all the possible diagonal shifts. Some shifts are not usable the way they are right now, but I want to keep adjusting it so that all are usable. Even if I failed, it was good exercise, and it made me look at shifts I would probably never think of, but have a pretty interesting effect.

Right now It does not have any grays or desaturated colors for metals etc, and I cant see how to insert a proper red or yellow. I would really like any input you guys could give me on how to make this work and reduce distortions, thank you very much.

Offline Cyangmou

  • 0011
  • **
  • Posts: 929
  • Karma: +3/-0
    • cyangmou
    • http://pixeljoint.com/p/32234.htm
    • cyangmou
    • View Profile
    • Pixwerk Homepage

Re: A linear palette that can hue-shift

Reply #1 on: September 27, 2016, 12:03:42 am
Usually it's pretty easy to tell someone "do some hue shift" to get more alive colors in a piece which is otherwise death.
The problem with those pieces is that there is not much artistic craftmanship in them, that a "shortcut" help like "hue-shift" truly helps.
Hue shifting is a simplified term for something which goes on with color, but is much more complicated.

The problem you run into with your palettebuildig is that you assumed approximately the same values for each ramp of colors.
Another problem you have going on is that all your darkest shades and all your brightest shades are looking in avg. the same,
all first shades seem to have the same saturation, same goes for all second shades as a group and so forth.

THe result of those flaws is that the only usable colors in your palette as it is, are currently the midtones.

You run in trouble with red and yellow, because they work only at specific hue and different value and saturation levels.

also the saturation levels some colors look "best" or "truest" at vary a lot. Red only looks like red in the really high saturated area.
While blue and green work really nice in mid-saturated levels.
And some grays only will work with really little saturation.

maybe this image helps to make my points clearer:


for example:
yellow seems to look best with high value, high saturation and gets "muddy" really quick in the lower levels.
blue seems to look best in mid value high saturation but there are a lot of beautiful over a much wider bightness and saturation field.

Just throw any mathematics for this topic over board and don't try to come up with the same values for each colortype.
It won't work because reality doesn't work that way.

Learn a bunch of colors you like and where the are in the colorcycle.
https://en.wikipedia.org/wiki/List_of_colors:_A%E2%80%93F

for example if you look for "sand" what you will get will be at the level it usually should be.

Once you know some colors and where the are, it gets easier to learn new colors and remember where they are in the color-spectrum.
And then it gets much easier to understand why the color you want to achieve can't be achieved with the model you used for your current palettebuilding.
« Last Edit: September 27, 2016, 12:09:53 am by Cyangmou »
"Because the beauty of the human body is that it hasn't a single muscle which doesn't serve its purpose; that there's not a line wasted; that every detail of it fits one idea, the idea of a man and the life of a man."

Dev-Art
Twitter

Offline RAV

  • 0010
  • *
  • Posts: 293
  • Karma: +0/-0
    • View Profile
    • Blackbox Voxel Tool

Re: A linear palette that can hue-shift

Reply #2 on: September 27, 2016, 01:47:58 am
Cyangmou is right. Hue shift is just a simplified term, often to point out another mistake, which is to entirely ignore hue and just shift brightness levels to simulate daylight changes. I guess that from pointing out that other mistake, the term hue shift draws. But it would also be a mistake to just take it as literal as the other. For best results the shift happens on all three levels, and individual by colour, instead of uniform for palette.

However, what works for you depends on what your project development requires. Often you face the tough situation to not have the ideal solution, but an approximation you try to make work. For example, to simulate a change in daylight in a classic pixel game, ideally you'd have separate palettes handcrafted and update the scene. But maybe the engine doesn't allow for that, and cloning the assets with different colours preset may not be an option either for memory requirement. Coming from this, you may try to approximate it with some kind of simplified shift. Which could be as simple as overlaying the scene with a transparent colour surface, which today is easier to do than trying to emulate index palettes.

« Last Edit: September 27, 2016, 01:51:06 am by RAV »

Offline Vinik

  • 0010
  • *
  • Posts: 210
  • Karma: +0/-0
    • View Profile

Re: A linear palette that can hue-shift

Reply #3 on: September 27, 2016, 02:36:40 am
Thank you very much Cyangmou for the lengthy, insightful answer. Rest assured that, although a beginner with pixels, I can understand what you said from my background, and after reading it I do feel quite dumb for trying to come up with a more "rational" way to develop a palette, as if there was a shortcut to make it my own.

Somehow I assumed there was some secret about keeping value constant that made palettes look more balanced, and I was going for something like that here, in a very failed experiment, thinking it was somehow better than other palettes I developed more naturally. The brights indeed are more like placeholders than individual colors, they all look the same, almost the same for the darks. That was already the case with NES NTSC I started from, but looking at a lot of numbers I thought I had fixed them without actually reality checking, I don't know how I managed to do that, really sorry  :D

As Cyangmou explained very clearly, each hue have its own "quirks", and they just cant be treated the same, yellow is so inherently brighter to point it is no longer yellow if darkened, blue azure cant be made brighter without looking more like lilac and so on. Trying to handle yellow, purple and deep blue the same way I would handle "easier" colors in HSL have always been puzzling, and after a while I started to learn to compensate the differences with brightness, saturation etc.

I do have a basic understanding of that, and my previous palettes are probably more useful than this one. After reading a lot of "tutorials" I did became in love with the uniformity of color models that compensate the inherent brightness of each hue, and I thought I had something there :-[

Here is a previous experiment on generating a palette where all colors would decay towards the same dark purple and rise towards the same light yellow, this time with a ramp generator (shame), I can now see that same mistake happens here:

In my defense, when I used it I restricted my self to half of the shades and used the others as intermediaries for AA. But there are a lot of very similar colors.

From now on I will refrain from trying to model palettes, I will review what I think I know about color, and I will try craft my palettes according to what I like, what works, and what I need.

Offline RAV

  • 0010
  • *
  • Posts: 293
  • Karma: +0/-0
    • View Profile
    • Blackbox Voxel Tool

Re: A linear palette that can hue-shift

Reply #4 on: September 27, 2016, 02:52:10 am
The computational HSL model probably mucked up the discussion of artists about colour. I doubt that when traditional artists talked about hue shift they meant it in the same sense the HSL slider does. Traditional artists have another way of constructing their palettes, and that is by mixing colours, instead of picking it from colour space or adjusting sliders. It overall is probably a better way to learn colour and understand the scene you're working on. Mixing colours naturally changes it on all three levels of what the HSL model means. Got some yellow and red from the sunset, some blue from electrics nearby, mixing with the wooden planks here, etc.

Offline Vinik

  • 0010
  • *
  • Posts: 210
  • Karma: +0/-0
    • View Profile

Re: A linear palette that can hue-shift

Reply #5 on: September 27, 2016, 03:10:33 am
Thank you too for the input RAV, one of the early motivations to make such swatch-organized palettes indeed was my thoughts on how to handle real time shadows that would respect a previously defined palette, but you are right when you say that there are much easier ways to do that today, to the point one should think if it is worth the trouble.

Here is a different palette, this more hand made, but also plagued by not reality-checking. It seems I enter into a different mindset when I am trying to create a palette, that prevents me from realizing why it wont work with shapes the way it works with simple ramps. That is why I tried to do some math to keep things balanced.

Offline RAV

  • 0010
  • *
  • Posts: 293
  • Karma: +0/-0
    • View Profile
    • Blackbox Voxel Tool

Re: A linear palette that can hue-shift

Reply #6 on: September 27, 2016, 04:09:38 am
Experienced artists place a lot of importance on hard research of reference material to a given topic they want to work on. This can mean many things, whether it is the work of other artists, but most importantly it is from real life. They want to make a scene with chinese atmosphere, so they look for tons of photographs about every aspect of chinese culture, study the signature elements of what makes it, and try to let this flow into their own vision. Most obviously this has to do with the form of things. But I also think this has as much to do with colour palette. You want to understand what a sunset in a forest means for colours, google a lot of photos from that, or better yet, go there yourself. It probably is best to inform your general idea of colours to the given topic from concrete references, like you would about form.

On another note, we sometimes have discussions about the pros and cons of various pixel techniques. What's very cool about dithering in the context here, is that it's pretty much the practice of mixing colours in the more traditional sense mentioned earlier. Especially in the earlier days of predefined limited palettes, this was how you could emulate the traditional way of working with colour.