It is currently Thu Nov 23, 2017 10:52 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 69 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: NES Styled Pixel Art
PostPosted: Wed Dec 17, 2014 6:17 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6450
Location: UK (temporarily)
If I take that whole cube, it works out to something like a weird variant of the websafe 216-color palette:
Attachment:
218--.png
218--.png [ 1.58 KiB | Viewed 1788 times ]
For any given value of any two components, the third has 0, 4, 6, or 7 represented values.


Top
 Profile  
 
 Post subject: Re: NES Styled Pixel Art
PostPosted: Wed Dec 17, 2014 6:32 pm 
Offline

Joined: Thu Aug 12, 2010 3:43 am
Posts: 1589
I wonder if this thread should get split? All this discussion definitely has nothing to do with NES-like artwork =P

Anyway, here's how the scheme I proposed looks like:
Image

(the format there is RRGGGBBZ, where I had absolutely no idea what letter to use to represent the LSB of red and blue)

lidnariq wrote:
The other way you can "fix" RRRGGGBB is to duplicate the blue MSB to make a 3-bit DAC again, expanding {0,1,2,3} to {0,2,5,7}.

Er, how does that help matters? Now not only you still have too few shades, but you also completely screwed over the linearity. I guess the only advantage is that you get both grays and white, but otherwise colors still take a severe hit.


Top
 Profile  
 
 Post subject: Re: NES Styled Pixel Art
PostPosted: Wed Dec 17, 2014 6:59 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6450
Location: UK (temporarily)
Sik wrote:
no idea what letter to use to represent the LSB of red and blue
Tentatively, "V" for violet?

Quote:
lidnariq wrote:
The other way you can "fix" RRRGGGBB is to duplicate the blue MSB to make a 3-bit DAC again, expanding {0,1,2,3} to {0,2,5,7}.
Er, how does that help matters? Now not only you still have too few shades, but you also completely screwed over the linearity. I guess the only advantage is that you get both grays and white
It's still lousy in comparison to a full 9-bit palette. But it's easier to use than nonorthogonal mixing. It gets you all four shades with zero saturation (black, white, two greys), and since the output goes through a layer of gamma correction anyway I'm skeptical that this nonlinearity is particularly problematic? {0,1,2,3,4,5,6,7} becomes {0,3,16,39,74,121,182,255}.

Also, note the "scare quotes". :)


Top
 Profile  
 
 Post subject: Re: NES Styled Pixel Art
PostPosted: Wed Dec 17, 2014 9:38 pm 
Offline

Joined: Mon Sep 27, 2004 2:57 pm
Posts: 1248
Just for fun, I came up with a palette generator for the thing I came up with. As a bonus, you can come up with different ways to expand the 2 bits into 3 bits. Here it is


Top
 Profile  
 
 Post subject: Re: NES Styled Pixel Art
PostPosted: Wed Dec 17, 2014 11:42 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5838
Location: Canada
Sik wrote:
Yeah, but 5.6.5 is not as problematic since it's 64 vs 32 shades. At that point the eye starts having difficulty telling apart the levels (it still can, especially in non-dithered gradients, but the difference is small enough to not make it so obvious). With 3.3.2 it's much worse since it's 8 vs 4. To put into context: with 5.6.5 it may be at worst ~1.56% off from the intended color, with 3.3.2 it would be 12.5%. (btw, 5.6.5 was the most common format for 16bpp on PC)


It's not often a problem, but there are still situations where it comes up. When rendering a texture, we're not just putting the colour directly on the screen; there's all sorts of transformations that can magnify the error (harsh lighting, gamma correction, tone mapping, post processing, etc.). Also, because it happens on 4x4 texel boundaries, the problem looks a little like a patchwork quilt made of grey, green, and magenta squares. It would be less noticeable if it was just a per-texel error (especially with linear filtering).

It's way better than 3:3:2, yes. That's a given.


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Fri Dec 19, 2014 9:32 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2369
All this talk about palettes make me impressed how Nintendo were able to find such a nice looking palette with such simple technology they had. Several other systems used YC palettes, but NES did the best job balancing saturation with luminance. I can't think of any way to improve upon it without adding a lot of colors that are too far out of bounds.


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Fri Dec 19, 2014 10:36 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3951
Not only a nice palette, but one generated entirely by square waves for composite output.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Sat Dec 20, 2014 12:36 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6450
Location: UK (temporarily)
I do like the 2600/7800's palette a little better. I don't know how many of its shades are technically out of gamut, though.


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Sat Dec 20, 2014 9:43 am 
Offline

Joined: Thu Aug 12, 2010 3:43 am
Posts: 1589
psycopathicteen wrote:
All this talk about palettes make me impressed how Nintendo were able to find such a nice looking palette with such simple technology they had. Several other systems used YC palettes, but NES did the best job balancing saturation with luminance. I can't think of any way to improve upon it without adding a lot of colors that are too far out of bounds.

To be fair, the NES is using 6-bit for defining colors while most other systems at the time used 4-bit (and systems that had more usually would opt for going with RGB instead).

lidnariq wrote:
I do like the 2600/7800's palette a little better. I don't know how many of its shades are technically out of gamut, though.

Don't they have different palettes for NTSC and PAL? (at least the 2600, no idea if the 7800 messed with the palette)


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Sat Dec 20, 2014 9:48 am 
Offline
User avatar

Joined: Mon Oct 20, 2014 1:50 pm
Posts: 94
Well...the NES DID have a rather nice palette, but from an artist's perspective I think it could have been a lot better. I'm not sure how much of this was the result of technical limitations or the fact that I've changed a YPbPr colorspace into an RGB one, but...

Image

A. Why does the NES that these two pairs of grayscale? They're essentially right next to each other, and isn't enough contrast between them to make a ramp of four grays.

B. Two whites and two blacks? I know there's a veeery dark gray tucked next to the black, but it's practically useless.

C. I very, very rarely ever find myself using these blues. The ones to the left are much more vibrant and have much better contrast. The space used up by these could have been used to add more...

D. Reds! The most frustrating part of the NES palette. Depending on what palette you're using, these 8 colors might not look red at all. With certain settings, sometimes you won't be able to ever use reds.

E. I always found this column of color very...undependable. On most screens it takes on a yellowish hue, but sometimes it'll be pushed so far towards green you won't ever be able to use yellow. That's two colors (red and yellow) you could potentially loose with the wrong settings.

F. Like the grays and blue-violets, there's no contrast between these two columns. I often find myself constantly switching them in projects and only seeing a slight difference in color temperature. Like C, I think the colors here could have been used elsewhere (like the yellows).

G. Wait! Before you say anything...I actually LOVE these two colors! They're my favorite colors in the entire palette! If you don't want to use black for your outlines, these two colors are dark enough to give your sprites some much-needed contrast. The only problem is...they're the only two colors in the entire palette that work this well. Every time I try using another color for outlines or shading, it turns out too bright or too saturated, like the darkest blue above the C.

H. Last but not least, these colors. Why?

Sorry if this sounds like a big whiny list of complaints, but this seemed like the best place to vent my years of frustration I've had with this palette. I'm also curious to see why these colors are this way.

_________________


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Sat Dec 20, 2014 10:45 am 
Offline
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7273
Location: Chexbres, VD, Switzerland
Quote:
I'm also curious to see why these colors are this way.

The reason is video signal generation. As you may know, the NES' PPU generates video directly in composite and does not, ever, use RGB internally.

I am not very knowledgeable about video signals myself, but the colour information is added onto luminosity information in order to be retrocompatible with old monochrome displays. The colour information is a high-frequency sine wave. The amplitude of the wave is the colour's saturation, and the phase of the wave is the colour's hue. Thanks to this it was possible to broadcast TV on channels that were supposed to be black and white without changing any hardware. Whoever came with this idea is pure genius by the way, but that's another topic. (With todays' policy I'm sure they'd ask everyone to trash their old TVs and force everyone to update to colour, and change all their cables, etc...)

The NES generate colours with an ADC with really few possible output voltages : There is only like 5 possible voltages (not counting the synchronosation voltages).

The colours are generated with a johnson counter that will create a square wave, "high" for 6 cycles then "low" for 6 cycles and repeat, for a period of 12 cycles. The phase of the counter correspond to the hue, so those 12 cycles corresponds to the 12 hues available. Column "$x0" correspond to the "high" voltage level and column "$xd" to the low voltage level. All other colours are synthetized by switching between the "$x0" and the "$xd" voltage, at different phases.

This also explains why it's not possible to control saturation, and why colours $2d is identical to $00 and $3d identical to $10. $0d is "blacker than black" and should never, ever be used, if you use it the video signal is invalid and the results are unpredictable.

Sure the palette could have been better if there was 15 different hues (this would have implied either a higher frequency crystal), and if the "$xd" column wasn't accessible, with the same # of bits. Unfortunately, whoever at Nintendo designed the PPU didn't make this choice.

In theory, the brightness of all colours from $01 to $0c is absolutely the same, compensating for the traditional "blue is darker than yellow" feeling we have (due to our eyes containing less blue captors than green and red). The YIQ colourspace was designed especially to compensate this, again for backwards compatibility to B&W monitors. The same applies too to all the other 3 lines. If you have a feeling that $0c and $08 are darker it could be either :
1) The particular RBG palette you used is a little off
2) Your eyes have a relative quantity of light captors for R, G and B that is a little off compared to what the YIQ guys designed


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Sat Dec 20, 2014 11:01 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19254
Location: NE Indiana, USA (NTSC)
DragonDePlatino wrote:
Well...the NES DID have a rather nice palette, but from an artist's perspective I think it could have been a lot better. I'm not sure how much of this was the result of technical limitations

The limitation is that the Pb and Pr components have to be sin(theta) and cos(theta) where theta is a multiple of 30 degrees offset from color burst. (Column 8 is the same hue as color burst.)

Quote:
A. Why does the NES that these two pairs of grayscale? They're essentially right next to each other, and isn't enough contrast between them to make a ramp of four grays.

B. Two whites and two blacks? I know there's a veeery dark gray tucked next to the black, but it's practically useless.

Colors on the NES were generated by alternating between a voltage in column 0 (dark gray, light gray, white, white) and a voltage in column D (blacker, black, dark gray, light gray).

Quote:
C. I very, very rarely ever find myself using these blues.

The one directly behind the letter C is $22, the iconic sky blue of SMB1.

Quote:
D. Reds! The most frustrating part of the NES palette. Depending on what palette you're using, these 8 colors [columns 5 and 6] might not look red at all. With certain settings, sometimes you won't be able to ever use reds.

Canonical red is $16.

Quote:
E. I always found this column of color very...undependable. On most screens it takes on a yellowish hue, but sometimes it'll be pushed so far towards green you won't ever be able to use yellow. That's two colors (red and yellow) you could potentially loose with the wrong settings.

Every console has the same problem with yellow. Different people see skin tones different way, and some TVs have "hyperreal" settings to boost vibrance of Asian skin tones. That's why it's Never The Same Color. Though $38 is pale, it's probably the closest to a canonical yellow that you'll get.

Quote:
H. Last but not least, these colors. Why?

After the "high signal level" column, twelve color columns spaced 30 degrees apart, and the "low signal level" column, the rest is just unassigned.

Bregalad wrote:
If you have a feeling that $0c and $08 are darker it could be either :
1) The particular RBG palette you used is a little off
2) Your eyes have a relative quantity of light captors for R, G and B that is a little off compared to what the YIQ guys designed

It is 2, specifically the Helmholtz–Kohlrausch effect. More saturated colors are perceived to be brighter.

Image
The $1x colors have the same luminance as the $00 gray behind them. Yet they look subjectively brighter due to the Helmholtz–Kohlrausch effect, except for the brown.
Illustration by Tyathalae


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Sat Dec 20, 2014 11:55 am 
Offline
User avatar

Joined: Mon Oct 20, 2014 1:50 pm
Posts: 94
Thanks for clearing that up, tepples! So colors in the 0 and D columns aren't just colors, but are combined with different hues to generate the ramps? Now that I look at it, that makes a lot of logical sense. But...if one of those colors, (say $00) were a lot darker, wouldn't it be possible to combine more colors in the darker end of the spectrum? And what about the unassigned colors? What would the NES palette look like if those were used up and 64 colors were available? Is that even possible? Has someone ever done it before?

Oh, but I will have to disagree with you on one thing...$22 may have been the iconic sky blue of SMB, but any other colors could have been used. I usually find myself using $21 or $2C for my sky colors. $21 has more of a morning/afternoon color while $2C gives me the impression of noon.

Image

_________________


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Sat Dec 20, 2014 12:03 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2369
Wikipedia screws up again with their claim that those colors have the same luminance. Since when does primary red have the same luminance as primary magenta?


Top
 Profile  
 
 Post subject: Re: Palettes
PostPosted: Sat Dec 20, 2014 12:13 pm 
Offline
User avatar

Joined: Mon Oct 20, 2014 1:50 pm
Posts: 94
While I was working with Dawnbringer on my 6-bit palette arrangement, I ran into the Helmholtz–Kohlrausch effect a lot. Don't underestimate the effect's potency!

Image

There's the image desaturated in GIMP based on luminosity. The red and magenta look about the same to me.

_________________


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 69 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: lazigamer and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group