It is currently Thu Dec 14, 2017 3:56 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 124 posts ]  Go to page 1, 2, 3, 4, 5 ... 9  Next
Author Message
PostPosted: Tue Sep 15, 2015 1:12 am 
Offline

Joined: Fri Aug 26, 2011 3:20 am
Posts: 41
Some of you may recall my previous thread where I wasn't happy with any of the currently-offered NES palettes on various emulators as well as the NESRGB board. I had decided to take on the challenge to generate the most accurate palette based on the NTSC-USA front-loader NES's composite video output. While I had finalized my 'eyeballed' palette, I had intended to do a more accurate direct-measure/capture of the NES composite video output, but I didn't have the equipment at the time to do it... Well I do now, and I just finished the conversion!

So here's how I went about it:

1. NES front-loader RCA-style video output jack hooked into video capture device calibrated to NTSC color bars.

2. Test ROM loaded into the NES that fills the screen with a single palette entry (advanced to the next entry via the controller).

3. Uncompressed video recorded for several seconds of each palette entry.

4. Screen caps taken of each palette entry shown in the video.

5. Screen caps cropped to the visible color shown, and then Gaussian-blurred to average the color.*

* Part 5 had to be done because the NES doesn't display solid colors with its composite output. Instead, they appear with 'fish-netted' type interference. Here's a pic showing the original captured NES color with my Guassian-blurred single color entry next to it:

Image

As you can see, the Gaussian blurring does a good job of approximating the intended color.

So when I got done generating the captured palette, I was quite surprised at how close my eyeball job was comparison:

Image


I'm calling the matter finished with the direct-captured version. If you're interested in trying it out, here's the download to the .pal file:

http://www.firebrandx.com/downloads/fbxnespalettecapture.zip


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 3:24 am 
Offline

Joined: Thu Jul 23, 2015 7:54 pm
Posts: 152
Location: USA
Very cool


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 7:39 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3968
Just a small warning, most image filters on the PC fail to account for gamma.

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


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 6:02 pm 
Offline
User avatar

Joined: Wed Oct 16, 2013 7:55 am
Posts: 130
This is great! Gonna integrate this into my graphics pipeline right away.


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 6:24 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3968
Comparison GIF showing this new palette vs Nintendulator's palette. (The Darker one is the new one)
Attachment:
nintendulator_vs_new_palette.gif
nintendulator_vs_new_palette.gif [ 10.14 KiB | Viewed 5492 times ]

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


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 6:42 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19345
Location: NE Indiana, USA (NTSC)
This capture card palette has a much greener dark olive ($08) than what I've seen on TVs.

Speaking of "dark olive", I might need to start a new topic about coming up with names of colors that programmers can use when communicating with artists.


Top
 Profile  
 
PostPosted: Tue Sep 15, 2015 7:18 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1868
Location: DIGDUG
Wow, gray $10 looks so light. Are you sure you don't have the screen brightness too high?

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Wed Sep 16, 2015 10:12 pm 
Offline

Joined: Fri Aug 26, 2011 3:20 am
Posts: 41
For me, the problem with the emulator palettes like Nestopia's YUV version is the blue-green shades on the right are far too green. I noticed it when playing the first dungeon of Zelda. They have it as pretty much half blue and half green, but the real hardware favors the blue far more than the green. I noticed this in my eyeball tests, and the capture card also detected the same thing.


Top
 Profile  
 
PostPosted: Thu Sep 17, 2015 3:23 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 928
Location: Sweden
tepples wrote:
This capture card palette has a much greener dark olive ($08) than what I've seen on TVs.

Speaking of "dark olive", I might need to start a new topic about coming up with names of colors that programmers can use when communicating with artists.

$08 looks kind of green like that on my LCD TV I think.

I like the idea of agreeing on names of the colours.
I've made colour labels in my program to make it easier to remember what colour is what. I just made up names based on how they looked like in the Family BASIC CGSET chart and the Nintendulator palette. If better names was agreed on, I'd love to use those instead.
Here it is (also includes some comments of what games are using what colours):
Code:
;Colour constants:
;Only the 52 unique/safe colours out of the 64 possible colours are included.
;Excluded colours are: The "forbidden greyscale" ($0D, $1D, $2D and $3D), the
;white $20 (since it's identical to $30) and all of the blacks that are
;identical to $0F (the $0E-scale, $1F, $2F and $3F).

;Colour scales goes from 0-3 (darker to lighter).
;Colour names should only be seen as a general guidance.
;For example waterblue and skyblue may both be used for water or sky,
;yellow may also contain orange and purple may contain pink and so on.

;-------------------------------------------------------------------------------
;Black and White

col_black = $0F ;classic black backdrop colour
col_white = $30 ;most commonly used white

;-------------------------------------------------------------------------------
;Grey

col_grey0  = $00 ;dark grey, DQ mountains
col_grey1  = $10 ;light grey, DQ mountains

;-------------------------------------------------------------------------------
;Blue

col_waterblue0  = $01 ;FF menu blue
col_waterblue1  = $11 ;DQ water/sky, Rockman armor (dark part)
col_waterblue2  = $21 ;FF sea, thief hair
col_waterblue3  = $31 ;FF sea

col_skyblue0    = $02
col_skyblue1    = $12 ;DQ hero blue armor
col_skyblue2    = $22 ;Super Mario Bros sky
col_skyblue3    = $32

col_plumblue0   = $03
col_plumblue1   = $13
col_plumblue2   = $23 ;Akumajou Dracula whip
col_plumblue3   = $33

col_purple0     = $04
col_purple1     = $14
col_purple2     = $24 ;Lady pink (Donkey Kong)
col_purple3     = $34 ;Akumajou Dracula whip

;-------------------------------------------------------------------------------
;Red

col_pink0      = $05
col_pink1      = $15
col_pink2      = $25 ;Lady pink (Family BASIC), cursor (Donkey Kong)
col_pink3      = $35 ;Lady skin (Family BASIC), DQ common skin

col_red0       = $06 ;Donkey Kong brown
col_red1       = $16 ;Mario red
col_red2       = $26
col_red3       = $36 ;Mario skin, FF common skin

col_yellow0    = $07
col_yellow1    = $17 ;Lady hair (Family BASIC), barrel brown (Donkey Kong)
col_yellow2    = $27 ;Samus yellow, Lady hair (Donkey Kong), DQ tree stem
col_yellow3    = $37 ;Zelda I ground, DQ desert/hill

col_brown0     = $08
col_brown1     = $18 ;FF monk hair, MetaFight bush
col_brown2     = $28 ;FF thief/monk skin, MetaFight bush
col_brown3     = $38 ;Rockman face and rockbuster beam

;-------------------------------------------------------------------------------
;Green

col_grassgreen0  = $09
col_grassgreen1  = $19 ;Luigi green, FF forest
col_grassgreen2  = $29 ;Link green (Zelda I), DQ grass, FF forest
col_grassgreen3  = $39

col_leafgreen0   = $0A ;MetaFight bush
col_leafgreen1   = $1A ;DQ tree/grass, FF grass/tree/forest
col_leafgreen2   = $2A ;Link green (Zelda II), R.O.B screen flash
col_leafgreen3   = $3A

col_bluegreen0   = $0B
col_bluegreen1   = $1B
col_bluegreen2   = $2B
col_bluegreen3   = $3B

col_turquoise0   = $0C ;DQ title screen backdrop, DQ slime
col_turquoise1   = $1C
col_turquoise2   = $2C ;FF stream, Rockman armor (light part)
col_turquoise3   = $3C

;-------------------------------------------------------------------------------
;64 Famicom colour chart:
;
;  ^    Hex:
;  |------------------
;  |    00  10  20  30  GREY ~ WHITE
;  |------------------
;  | B  01  11  21  31
;  | L  02  12  22  32
;  | U  03  13  23  33
;  | E  04  14  24  34
;  |------------------
;  | R  05  15  25  35
;  | E  06  16  26  36  EXISTING COLORS
;  H D  07  17  27  37
;  U    08  18  28  38
;  E------------------
;  | G  09  19  29  39
;  | R  0A  1A  2A  3A
;  | E  0B  1B  2B  3B
;  | E  0C  1C  2C  3C
;  |-N----------------
;  |    0D  1D  2D  3D <----- Forbidden greyscale (0D, 1D, 2D, 3D)
;  |    0E  1E  2E  3E  BLACK
;  |    0F  1F  2F  3F
;  |------------------
;  v
;   <-DARK-----LIGHT->


Top
 Profile  
 
PostPosted: Thu Sep 17, 2015 5:49 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1868
Location: DIGDUG
Funny, I always thought of the x7 column as oranges and the x8 column as yellows.

And why are the xD grays 'forbidden' ?

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Thu Sep 17, 2015 6:08 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19345
Location: NE Indiana, USA (NTSC)
$0D has a voltage lower than black and can confuse the sync parsing in some TVs.
$1D is equal to $0F.
$2D and $3D are unavailable on 2C03 RGB PPUs, but they're so close to $00 and $10 that they're not too useful anyway.

And I too was about to assign the name "orange" to column 7 and "yellow" to column 8. I guess I need to finish my proposal and post it.


Top
 Profile  
 
PostPosted: Thu Sep 17, 2015 6:39 am 
Offline

Joined: Tue May 28, 2013 5:49 am
Posts: 928
Location: Sweden
dougeff wrote:
Funny, I always thought of the x7 column as oranges and the x8 column as yellows.

And why are the xD grays 'forbidden' ?

Ninjad by Tepples about the "forbidden colours". Also any of these forbidden colours may fade into the bad $0D (if you fade by subtracting with $10) unless your fading routine is designed to work around it. So there's so many reasons not to use them I thought.

I named the x7 column from col_yellow2 since it's the colour of Samus armor and it's known to be yellow. Colours are generally named after one colour in their column not their "actual colour". And for names like bluegreen and turquoise, I'm not sure which is closer to blue and which is closer to green or if they are words with identical meaning even.


Top
 Profile  
 
PostPosted: Thu Sep 17, 2015 9:11 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5898
Location: Canada
What about the 7 emphasis states, Firebrandx?


Top
 Profile  
 
PostPosted: Thu Sep 17, 2015 2:59 pm 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3968
Emphasis isn't used all that much by games, pretty much a few games that run in deemphasize all colors mode for some reason, Final Fantasy 1 during battle transitions, and Noah's Ark.

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


Top
 Profile  
 
PostPosted: Thu Sep 17, 2015 3:06 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5898
Location: Canada
We have an imcomplete list of emphasis-using games, but I would presume that a "quest for the most accurate NES palette" shouldn't ignore 87.5% of the colours it can produce just because not many games use them.


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 9 guests


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