31-Color Dual Plane Images

Announce (tech) demos or games releases

Moderator: Mask of Destiny

Post Reply
hotrodx
Very interested
Posts: 50
Joined: Thu Mar 21, 2019 1:23 pm

31-Color Dual Plane Images

Post by hotrodx » Sat Oct 12, 2019 8:16 am

Here's a demo of using two palettes on two planes, giving a maximum of 31 colors per tile.

We do this by optimizing an image down to 31 indexed colors. We then copy it into two files. On the first image, we convert the last 15 colors of the palette into black. On the second image, we convert the first 16 colors into black. We then reoptimize both down to have a unique 16 colors each, making sure that black is the first indexed color (and therefore the transparent color).

After that, it's just a matter of loading Image 1 into PLAN_A and Image 2 into PLAN_B.

A variant of this technique can use sprites as additional palette/layer, or adding shadow and highlights.

It's not as sophisticated as CRAM blast processing, but this is easy to set up. It lends well to certain types of images. I find the Orange+Blue+Dark Background images you see in posters work well with this.

PROS: Easy to set up; Minimized palette bleeding; Adds a bit more shading; Best for Title Screens, or cutscenes
CONS: Eats a lot of memory; 31 colors isn't that high of a color count; Might need lots of blank spaces in the image to save VRAM
Attachments
rom.zip
(142.03 KiB) Downloaded 450 times

SegaTim
Very interested
Posts: 177
Joined: Thu Nov 19, 2015 1:59 pm
Location: East Prussia
Contact:

Re: 31-Color Dual Plane Images

Post by SegaTim » Sat Oct 12, 2019 1:47 pm


Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Re: 31-Color Dual Plane Images

Post by Chilly Willy » Sat Oct 12, 2019 7:34 pm

Nice slideshow. Those images converted rather well. It's clearly better than 16 color. Even better than many images I've seen that use two palettes, but only one plane (which means only 16 colors in each tile).

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Re: 31-Color Dual Plane Images

Post by KanedaFr » Sun Oct 13, 2019 12:18 pm

Hi,

Exactly how I made HIRES plugin for GenRes
Based on ToyStory intro way

hotrodx
Very interested
Posts: 50
Joined: Thu Mar 21, 2019 1:23 pm

Re: 31-Color Dual Plane Images

Post by hotrodx » Mon Oct 14, 2019 1:15 pm

As I've used only vanilla Gimp to optimize the colors, I didn't derive it from the 512 color selection of the MegaDrive.

I use a Gimp plugin called "python-fu-palette-change". I set it to 9bit color, but some colors don't really fit the MD totall palette.

Gimp indexed palettes, on the other hand, are limited to 256 colors entries.

Does anybody know of a MegaDrive-specific Gimp plugin to "limit" the colors to the MD total palette, so that the darker colors aren't crushed when exported for the MD? While there might be external exporters, I would prefer to set the colors during editing time. That way, I can still make adjustments and correction before exporting it.

astrofra
Interested
Posts: 28
Joined: Sun Dec 14, 2014 8:50 am
Location: Orleans | France
Contact:

Re: 31-Color Dual Plane Images

Post by astrofra » Sat Feb 15, 2020 8:36 am

Nice technique :)

We used it in Masiaka, our Megadrive demo release at EVOKE 2017 :
https://www.pouet.net/prod.php?which=71543

It works really well on image with distinct clusters of colors. In the opposite situation, usually with digitized live sources, it needs lots of VRAM.
Some R&D could be done by recycling some of the tiles, on the original 31 colors image, possibly automatically.
640 polygons are enough for everyone.

Post Reply