How to convert a photo to NES format

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: How to convert a photo to NES format

Post by thefox » Wed Jul 15, 2015 6:54 pm

dougeff wrote:Bank swapping mid-frame?
Yeah it does mid-screen bank switches and also switches the nametable to get an 8x16 color attribute area.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

User avatar
dougeff
Posts: 2617
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: How to convert a photo to NES format

Post by dougeff » Wed Jul 15, 2015 9:43 pm

Here's another try. This time I resized to 128 high, boosted saturation to +75%, boosted constrast +40%, lightened the eyes and nose, made a special 4 color swatch set by eyedropping on 4 places on the canvas (note, these are not the final colors), mode/indexed color, use the custom swatch as the palette, dither 40%. touched up the eyes again with pencil tool.

copy. paste into YY-CHR. It looks nicer with at least 1 complementary color.
Attachments
face2.jpg
face2.jpg (74.33 KiB) Viewed 4600 times
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
dougeff
Posts: 2617
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: How to convert a photo to NES format

Post by dougeff » Wed Jul 15, 2015 9:49 pm

I also made this. An attempt at full color by rotating between red, green, and blue quickly. However, it's flickery as hell. And the color quality is lacking. Done by bank swapping and palette changes every frame. I can't post a still frame because it would only show 1 color.
Attachments
fruit.nes
(32.02 KiB) Downloaded 220 times
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
dougeff
Posts: 2617
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: How to convert a photo to NES format

Post by dougeff » Wed Jul 15, 2015 9:56 pm

thefox wrote:
dougeff wrote:Bank swapping mid-frame?
Yeah it does mid-screen bank switches and also switches the nametable to get an 8x16 color attribute area.
Thanks for responding. I may try to reverse engineer this technique, it looks great.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
tokumaru
Posts: 11469
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: How to convert a photo to NES format

Post by tokumaru » Wed Jul 15, 2015 10:04 pm

One of the best ways to display full color pictures on the NES I have ever seen is tepples' rgb121. It uses flickering to alternate between the green channel (2 bits) and the red/blue channels (1 bit each). Flickering is a sensitive topic though, since HDTVs can't agree on a standard way to handle it. The variant that alternates channels every scanline should look decent in most cases, I guess.

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: How to convert a photo to NES format

Post by thefox » Wed Jul 15, 2015 10:18 pm

tokumaru wrote:One of the best ways to display full color pictures on the NES I have ever seen is tepples' rgb121. It uses flickering to alternate between the green channel (2 bits) and the red/blue channels (1 bit each). Flickering is a sensitive topic though, since HDTVs can't agree on a standard way to handle it. The variant that alternates channels every scanline should look decent in most cases, I guess.
tepples: The link (http://pics.pineight.com/nes/rgb121.zip) you posted at that thread is broken.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

User avatar
tokumaru
Posts: 11469
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: How to convert a photo to NES format

Post by tokumaru » Wed Jul 15, 2015 10:47 pm

Actually, the rgb121 method works quite well even without the flicker. Just by alternating the green channel with the red/blue channels every scanline you can get a pretty colorful image. I tried one of the most colorful pictures I could think of, which is a Super Sentai team:
liveman-original.png
liveman-original.png (132.11 KiB) Viewed 4586 times
And here are the individual rgb121 frames generated from that picture:
liveman-a.png
liveman-a.png (9.97 KiB) Viewed 4586 times
liveman-b.png
liveman-b.png (10.07 KiB) Viewed 4586 times
In both pictures the colors of the rangers are represented accurately enough, so even without the flicker the results are pretty decent compared to approaches that use a single name table.

User avatar
tokumaru
Posts: 11469
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: How to convert a photo to NES format

Post by tokumaru » Wed Jul 15, 2015 10:50 pm

And here's the animated GIF:
liveman-flicker.gif
liveman-flicker.gif (21.01 KiB) Viewed 4585 times
It'll probably look better in a TV running at a proper 60Hz, unlike browsers do with GIF animations.

Flicker or no flicker, I'd say this is up to par with most FMV sequences found in Sega CD games.

BTW dougeff, if you can, don't use JPG for images with flat colors or retro game art in general. Not only is the final size usually bigger than that of a PNG or a GIF, but the lossy compression algorithm introduces a lot of artifacts all throughout the images.

User avatar
thefox
Posts: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: How to convert a photo to NES format

Post by thefox » Wed Jul 15, 2015 11:05 pm

It does look good. Makes me want to play around with this technique for a bit. Was there ever a ROM made that does the per-scanline nametable switch?
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi

User avatar
tokumaru
Posts: 11469
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: How to convert a photo to NES format

Post by tokumaru » Wed Jul 15, 2015 11:15 pm

thefox wrote:Was there ever a ROM made that does the per-scanline nametable switch?
Yes. I just found tepples' demo on my hard drive:
rgb121.nes
(256.02 KiB) Downloaded 237 times
BTW, the forum logged me out when I tried uploading the .zip... is this normal?

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How to convert a photo to NES format

Post by tepples » Thu Jul 16, 2015 6:21 am

thefox wrote:tepples: The link (http://pics.pineight.com/nes/rgb121.zip) you posted at that thread is broken.
Not anymore. Thank you for reporting it.

(If your monitor doesn't sync up right, compare the original pics.)

Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: How to convert a photo to NES format

Post by Sik » Thu Jul 16, 2015 9:30 am

tokumaru wrote:Flickering is a sensitive topic though, since HDTVs can't agree on a standard way to handle it. The variant that alternates channels every scanline should look decent in most cases, I guess.
This is probably the one situation where forced deinterlacing would actually be useful.

A much bigger problem would be people with epillepsy, honestly =P

User avatar
dougeff
Posts: 2617
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: How to convert a photo to NES format

Post by dougeff » Sat Jul 18, 2015 5:54 am

Here's a full screen example using MMC3 scanline IRQs to bankswap 3 times per frame. Not as impressive as thefox because I'm only using 1 palette for everything. I was getting glitches on my first few tries, when I simply counted the right number of lines and switched, so I had to subtract 1 from the scanline count, and then wait about 110 cycles so that the swap happened during h_blank.

I don't seem to be able to use scanline counting to switch nametables at every scanline, I think I'll try again with a big wait loop. Is the timing something like this...wait for v_blank, wait till not v_blank, 114 cycles switch / 114 cycles switch / 113 cycles switch / repeat. ?
Attachments
fnt4.nes
(32.02 KiB) Downloaded 215 times
stars1.gif
stars1.gif (11.49 KiB) Viewed 4498 times
nesdoug.com -- blog/tutorial on programming for the NES

ccovell
Posts: 1006
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: How to convert a photo to NES format

Post by ccovell » Sat Jul 18, 2015 6:34 am

Looks nice. 4 colours is not so bad... reminds me of what I did back when on my old page. Mine used the CNROM mapper with cycle-timed code and/or sprite 0 hit.

ImageImageImageImage

User avatar
dougeff
Posts: 2617
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: How to convert a photo to NES format

Post by dougeff » Sat Jul 18, 2015 7:00 am

Ooh, Moby 'everything is wrong'...that takes me back. Did you ever hear the DJ remix album of that, some of Moby's best work.

Yeah, 4 colors can do a lot. I like those.
nesdoug.com -- blog/tutorial on programming for the NES

Post Reply