AuthorTopic: NEW CLUSTER STUDY THREAD!  (Read 81192 times)

Offline Arne

  • 0010
  • *
  • Posts: 431
  • Karma: +1/-0
  • Panties.
    • View Profile
    • AndroidArts

Re: NEW CLUSTER STUDY THREAD!

Reply #160 on: January 27, 2015, 01:03:34 pm
Even The Amiga's 444 isn't much of a hinderance unless you're doing copper stuff or long 32 color mode ramps. I guess, if the gradient is so smooth you can't see the transitions, it stops being pixel art anyways because there is no pixel definition.  I do recall some instances where a hue shift "one step up" in a ramp has been unwanted though. Some games would offset the copper half a bar every other frame to smoothen out gradients.

As for going lower, it's interesting how such stepping produces colors almost the opposite of what we see on photos where the most common colors stretches from the black corner of the color cube to the white, diagonally through the grays bulging like a grain of rice.

On topic, I've found clustering/orphan elimation a useful thing to fall back on when something feels wrong but I'm somehow blind to it. It's good to have there at the back of the head when the old orges rise to do uneccessary fancy pixel footwork with excessive AA, lining and whatnot.

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: NEW CLUSTER STUDY THREAD!

Reply #161 on: January 28, 2015, 05:34:07 am
Even The Amiga's 444 isn't much of a hinderance unless you're doing copper stuff or long 32 color mode ramps. I guess, if the gradient is so smooth you can't see the transitions, it stops being pixel art anyways because there is no pixel definition.  I do recall some instances where a hue shift "one step up" in a ramp has been unwanted though.
Yeah, for individual sprites it's no problem and even helpful, for long gradients like in a 256c master palette, it messes around with saturation and hue when you go to fill in intermediate colors. (basically why I designed the new OHRRPGCE palette with amiga 444, then went to VGA 666 and eventually full 888 when it became available, to get easier-to-work with midcolors. The result had to be usable and understandable by people without much understanding of pixel art or color theory, and it had to have long (15/16c) ramps.)

Quote
As for going lower, it's interesting how such stepping produces colors almost the opposite of what we see on photos where the most common colors stretches from the black corner of the color cube to the white, diagonally through the grays bulging like a grain of rice.
I'm not sure what the opposite of 'the most common colors stretches from the black corner of the color cube to the white, diagonally through the grays bulging like a grain of rice.' would be. Are you proposing a concave rather than convex shape occurs, wide at black and white and narrow in the middle, like an hourglass with the outside corners bevelled flat?
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline Arne

  • 0010
  • *
  • Posts: 431
  • Karma: +1/-0
  • Panties.
    • View Profile
    • AndroidArts

Re: NEW CLUSTER STUDY THREAD!

Reply #162 on: January 28, 2015, 07:29:09 am
Well, some years ago I gathered a bazillion photos of a variety of things (including naked people :P) and plotted a 3D RGB histogram of color count. Most hits were aligned from the black diagonal to the white, bulging at the center (midpoint) like a grain of rice... perhaps one with fuzzy irregular mold. Certain saturated colors were of course less common as they are less likely to occur in a photo. A palette generated by nested RGB for-loops using big steps produces few hits on the common color regions in my aforementioned histogram. Of course, graphical neon colors are still quite usable, perhaps more effective in many cases. Would be interesting to try other stepping methods though, for say a 64 color pal, and find one that's more to my liking whilst being really simple.

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: NEW CLUSTER STUDY THREAD!

Reply #163 on: January 28, 2015, 09:04:28 am
Ah. so what you're saying is that retro colorcube is roughly the boolean subtraction of the photo profile from the total RGB colorcube. Something very roughly like this:


Where white is occupied locations.

I've tried different stepping methods myself, and different colorspaces. YCbCr is a moderate improvement on RGB. Colorspaces that cannot be expressed with a plain 3x3 transform matrix, but nonetheless are carefully fitted into sRGB, may be an improvement on that -- eg the variable-precision/dependent H/S/L encoding used in png16.
« Last Edit: January 28, 2015, 09:11:49 am by Ai »
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline 32

  • 0011
  • **
  • Posts: 535
  • Karma: +1/-0
    • @AngusDoolan
    • http://pixeljoint.com/p/19827.htm
    • View Profile

Re: NEW CLUSTER STUDY THREAD!

Reply #164 on: February 15, 2015, 02:17:23 am
I realised after reading this that I'd kind of been doing the channel restriction thing already just cause it was satisfying to me, the colours felt more pure or something. It hadn't occurred to me that it had any basis in history. Having been told that I ran with it on my newest piece and I think the colours turned out really nice. Of course I went with 5 values per channel which makes no sense in terms of bits but it came up with a really interesting palette. Does anyone smarter than me know of a way to generate the whole palette with those restrictions?

Between this, banding and clusters I think every time I read a new theory from you Helm I get better ;D Just wanted to say thanks.

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: NEW CLUSTER STUDY THREAD!

Reply #165 on: February 15, 2015, 09:00:43 am
I realised after reading this that I'd kind of been doing the channel restriction thing already just cause it was satisfying to me, the colours felt more pure or something. It hadn't occurred to me that it had any basis in history. Having been told that I ran with it on my newest piece and I think the colours turned out really nice. Of course I went with 5 values per channel which makes no sense in terms of bits but it came up with a really interesting palette. Does anyone smarter than me know of a way to generate the whole palette with those restrictions?
In Gimp, you can generate RGB colorcubes using 3 layers, a bit of pencil tool work, a bit of scaling, the filters->Map->Tile filter (or copy/paste), and Colors->Components->Compose filter. Just keep in mind that the image must be Grayscale, not RGB, for the Compose filter to be available.

These are the three grayscale layers I made, they each represent a channel -- order doesn't matter but I like having green going across, red going down and blue as z (dunno what else to call it -- the slowest-changing dimension), so that is how I've labelled them here:

R:
G:
B:

(given the above layers, all you'd need to do was chuck them in a Greyscale image and feed them to Colors->Components->Compose. The other comments described how I created the above layers. Hopefully the structure of the layers is obvious.)

These images are 5x25, or more generally Ax(BxC). Which dimension is which doesn't matter, 25x5 would be equally doable.


If you want values you can use in code, it would be pretty easy in python, just use
Code: [Select]
import itertools
alltriples = itertools.product(rintensities, gintensities, bintensities)
.
for example for your 5x5x5 cube you can use the values you mentioned:
Code: [Select]
import itertools
intensities = [0, 0x3f, 0x7f, 0xbf, 0xff]
alltriples = itertools.product(intensities, intensities, intensities)

Both methods are easily adapted to arbitrary intensity levels or different number of intensities for different channels.

Though of course as Ptoing has mentioned, GrafX2 or ProMotion are probably more convenient than generating a palette, since they explicitly force all colors to conform to the selected colorcube at all times.

The 5x5x5 palette doesn't seem to be used historically. OTOH, the Amstrad CPC palette was 3x3x3, and 5x5x5 is a direct expansion of it (keeping three levels exactly as is, adding two exactly intermediate ones). So I mentally labelled this colorcube 'CPC5'.
« Last Edit: February 15, 2015, 09:09:35 am by Ai »
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline 32

  • 0011
  • **
  • Posts: 535
  • Karma: +1/-0
    • @AngusDoolan
    • http://pixeljoint.com/p/19827.htm
    • View Profile

Re: NEW CLUSTER STUDY THREAD!

Reply #166 on: February 15, 2015, 10:16:17 am
Of course! Now that you've told me it's so obvious :lol:. Very cool tool in gimp also, tried doing it in photoshop but I guess all channels are not created equal or something according to adobe. Definitely want to get my hands on a copy of ProMotion but the Australian Dollar is so weak right now I can't quiiiiite justify the expense. I remember seeing it used years ago in the recorded pixel art thread though and the colour handling looks far superior to GraphicsGale. Between that and the tiling tools I might cave on it soon.

Interesting about the CPC. I obviously don't have all the relevant knowledge but I'd assumed odd numbered palettes wouldn't exist.

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: NEW CLUSTER STUDY THREAD!

Reply #167 on: February 15, 2015, 11:09:37 am
Of course! Now that you've told me it's so obvious :lol:. Very cool tool in gimp also, tried doing it in photoshop but I guess all channels are not created equal or something according to adobe.
Yeah, pretty sure you can do it in photoshop, but no idea how.

Quote
Definitely want to get my hands on a copy of ProMotion but the Australian Dollar is so weak right now I can't quiiiiite justify the expense. I remember seeing it used years ago in the recorded pixel art thread though and the colour handling looks far superior to GraphicsGale. Between that and the tiling tools I might cave on it soon.

Interesting about the CPC. I obviously don't have all the relevant knowledge but I'd assumed odd numbered palettes wouldn't exist.
Well, that is with a <= 16-color display (ie. you can pick 16 of the 27 for your usable palette), so the actual number of bits per pixel is still whole.

FWIW I messed around with RGB curves, producing this modified 5x5x5 "cube" that IMO has better differentiation in red and blue:


(blue ramp is 00 5d a7 c8 ff, red ramp is 00 56 87 ae ff. Pure greys are sacrificed due to this, you get tinted greys instead.)

Unadjusted version:



Comparison unadjusted | adjusted:


IMO it's noticably less 'overexposed' looking.
« Last Edit: February 15, 2015, 11:15:41 am by Ai »
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.

Offline 32

  • 0011
  • **
  • Posts: 535
  • Karma: +1/-0
    • @AngusDoolan
    • http://pixeljoint.com/p/19827.htm
    • View Profile

Re: NEW CLUSTER STUDY THREAD!

Reply #168 on: February 15, 2015, 11:54:06 am
I'd assumed I could just drop the images into the channel layers photoshop has. At first impression I'd thought it worked but for some reason the channels weren't mixed properly ::).

Probably could use some messing around, I think if anything I'd drop the first value DOWN though cause the palette lacks much in the darker end. I tried applying your palette 1 for 1 to my image but I didn't really gain any insight, it looks more over exposed but it's impossible to say without manually re-picking the colours. I kinda like the tinted greys though and eyeballing it, it does look a bit nicer.

Do the values of the steps on the old machine palettes have any basis in the hardware? Is it kind of interpreted as uniform steps of brightness for the subpixel (I don't know much about bit depth in terms of old monitor tech haha)? Obviously there's no reason not to play with them now but I'm curious.

EDIT: Thinking about it I guess the values of the steps would just be determined directly by the limitations of the monitor technology? So it is kinda of arbitrary in a way?
« Last Edit: February 15, 2015, 12:25:18 pm by 32 »

Offline Ai

  • 0100
  • ***
  • Posts: 1057
  • Karma: +2/-0
  • finti
    • http://pixeljoint.com/pixels/profile.asp?id=1996
    • finticemo
    • View Profile

Re: NEW CLUSTER STUDY THREAD!

Reply #169 on: February 15, 2015, 01:53:15 pm
Yeah, the adjustment I made has a side effect of reducing dark colors, which is an intuitive judgement based on experience drawing with EGA64, CPC, and unaltered RGB555 palettes. The primary effect I was aiming to achieve was turning all the similar oversaturated colors into  colors with more varied saturation.. so more pastel / watercolor aesthetic, I guess. Done using a very mild, oblique S curve (exact shape differing for each channel).

The values were often determined directly by monitor technology, yes. Though monitor technology quickly began moving in the general direction of what we use today, sRGB, so most of them can be fitted pretty accurately / simply into sRGB.
Ptoing's limitations thread goes into it more, but in general there were two types of possible ramp, clipped and unclipped.
Unclipped, the step value is (255/(N-1)). Clipped, the step value is (256 / N) (meaning you don't get "full" intensity -- eg. for N=8, which Genesis used, the maximum intensity is 224 aka (256 - (256/N)) ).

It's not uniform steps in brightness (for RGB based systems), it's uniform steps in something approximating sRGB space (which includes gamma companding of approximately 2.2, so the response to intensity values is exponential  rather than linear.)
I wrote a bit more about that here, if you are interested, but the short story is it tends to work out pretty well for small colorcubes -- significantly more pop/expressiveness -- to just pretend that sRGB is linear even though it's not (so, eg. 00 ba ff does not look as good for CPC 3x3x3 cube as the 'naive' 00 7f ff, even though 186 is perceptually more 'correct' as a midpoint).

FWIW if you want to see what an semi linear colorcube looks like you can apply gamma 0.45 (1/2.2) using Levels tool. It makes all the classic failings of small colorcubes significantly worse ;)
« Last Edit: February 15, 2015, 10:25:40 pm by Ai »
If you insist on being pessimistic about your own abilities, consider also being pessimistic about the accuracy of that pessimistic judgement.