Page 1 of 1

31-Color Dual Plane Images

Posted: Sat Oct 12, 2019 8:16 am
by hotrodx
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

Re: 31-Color Dual Plane Images

Posted: Sat Oct 12, 2019 1:47 pm
by SegaTim

Re: 31-Color Dual Plane Images

Posted: Sat Oct 12, 2019 7:34 pm
by Chilly Willy
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).

Re: 31-Color Dual Plane Images

Posted: Sun Oct 13, 2019 12:18 pm
by KanedaFr
Hi,

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

Re: 31-Color Dual Plane Images

Posted: Mon Oct 14, 2019 1:15 pm
by hotrodx
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.

Re: 31-Color Dual Plane Images

Posted: Sat Feb 15, 2020 8:36 am
by astrofra
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.