216 colors with one palette

Announce (tech) demos or games releases

Moderator: Mask of Destiny

User avatar
kubilus1
Very interested
Posts: 221
Joined: Thu Aug 16, 2012 2:25 am
Contact:

216 colors with one palette

Post by kubilus1 » Mon Jun 06, 2016 1:58 am

No highlight or shadow was used either, so theoretically this could be increased a bit using those techniques.

Image

Just some simple fun playing around with NTSC color artifacting: https://github.com/kubilus1/blast/raw/m ... st/out.bin

Obviously, this will need to be run in composite mode (as Sega intended). What's kind of interesting about this approach is that it doesn't require any real tricks or cpu cycle heavy on-the-fly palette changing techniques.

Possible uses could be for stuff where a single palette is required/convenient. Sprites, video or bitmapped stuff, the 3D stuff in SGDK, etc.

User avatar
Stef
Very interested
Posts: 2774
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: 216 colors with one palette

Post by Stef » Mon Jun 06, 2016 7:31 am

Dithering (I guess that is what you refer here, doing 216 colors by using 2 blended colors with mesh pixels) was used a lot back in time but also have its limitations. Does not look good on RGB systems and cannot be used for edges (need at least 2 pixels wide). Still it help a lot for 3D or bitmap rendering as you said where you are limited to 1 palette = 15 colors (Starfox on SNES uses it a lot for instance)

User avatar
TmEE co.(TM)
Very interested
Posts: 2307
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: 216 colors with one palette

Post by TmEE co.(TM) » Mon Jun 06, 2016 10:43 am

On real hardware you'll be seeing plenty rainbow artifacting, depending on what RGB encoder is used. It won't look all that great in the end because of that unfortunately. Also doesn't work at all in PAL and RGB.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

User avatar
kubilus1
Very interested
Posts: 221
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Re: 216 colors with one palette

Post by kubilus1 » Mon Jun 06, 2016 1:00 pm

Not dithering, but horizontal striping.

On my system, I don't see rainbow artifacting, maybe I would in larger swaths of colors, but some of the colors do not match exactly what I see on the emulator, which is not a surprise.

This technique was used quite a lot on older computers, along with quite a few Genesis games to add more colors and transparency effects. You aren't going to see this used 100% of the time usually, but more of a sprinkle here and there.

In regards to RGB, I look at it like this. Your Genesis or Megadrive was never intended to be used like that. It's fine that we can hack them nowadays, but you do lose some of the effects you are supposed to be able to get out of your sega: http://nerdlypleasures.blogspot.com/201 ... osite.html

User avatar
TmEE co.(TM)
Very interested
Posts: 2307
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Re: 216 colors with one palette

Post by TmEE co.(TM) » Mon Jun 06, 2016 1:11 pm

French never got to see RF or composhit, the MDs came with RGB cables by default :P
And the horizontal striping technique doesn't work for the most part in PAL anyway, it is pretty much useful only for NTSC. On most of my machines even in NTSC the blending doesn't work too good, mostly due to rainbow artifacts.

http://www.tmeeco.eu/BitShit/DukeNTSC.jpg
http://www.tmeeco.eu/BitShit/DukePAL.jpg
http://www.tmeeco.eu/BitShit/DukeRGB.jpg
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

User avatar
kubilus1
Very interested
Posts: 221
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Re: 216 colors with one palette

Post by kubilus1 » Mon Jun 06, 2016 4:18 pm

PAL actually doesn't look as bad as I thought it would there.

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

Re: 216 colors with one palette

Post by SegaTim » Wed Jun 08, 2016 12:30 pm

Image

CVBS (RF):
Image

Good method!

User avatar
Sik
Very interested
Posts: 705
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: 216 colors with one palette

Post by Sik » Wed Jun 08, 2016 5:57 pm

I think the problem is that most people will be running those ROMs in emulators with the default set up (i.e. filters turned off), and from those running on real hardware, it's likely most of them are already using RGB output for starters by this point since they'd care about picture quality. In other words, this method isn't really that good for homebrew :/
Sik is pronounced as "seek", not as "sick".

Moon-Watcher
Very interested
Posts: 117
Joined: Sun Jan 02, 2011 9:14 pm

Re: 216 colors with one palette

Post by Moon-Watcher » Thu Jun 09, 2016 6:21 pm

Hey in CVBS mode look great! so just thinking... what about a protocol to communicate with the emulators out there to force them to set this or that option on/off :!:

User avatar
kubilus1
Very interested
Posts: 221
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Re: 216 colors with one palette

Post by kubilus1 » Sat Jun 11, 2016 4:03 pm

I mean, I started off like that as well. (S-video modded Genesis 2 "3/4" board) But some of the effects you see in a variety of games (see above link) show that the intention of the hardware is to *not* be in RGB mode and to utilize color artifacting to some degree. Is this used as a primary means of display, no not really, but it's there in a number of games.

This was an exercise in seeing how this would look. In 320 col width mode, it's not too shabby. What I think would be cool would be to somehow utilize something like this to get more effective colors out of stuff that generally requires a single palette. Perhaps a Sega CD video using a method like this?

As far as users using emulators or modded systems, I really don't care that much. People run there genesis on LCD TVs in 16x9 stretch-o-vision mode as well. Doesn't mean I'm worried that what I do has to be wide-screen.

User avatar
kubilus1
Very interested
Posts: 221
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Re: 216 colors with one palette

Post by kubilus1 » Sun Jun 12, 2016 1:12 am

Also with something like 8088mph (https://trixter.oldskool.org/2015/04/07 ... emulators/) running CGA in composite mode is pretty much the least likely way that old DOS systems would be used now or back in the day. It's still a really cool demo and it's fun reading about how it was accomplished.

User avatar
Sik
Very interested
Posts: 705
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Re: 216 colors with one palette

Post by Sik » Mon Jun 13, 2016 6:26 am

Except CGA over composite was quite common (IBM didn't even offer RGB monitors originally), in fact Sierra games are practically unplayable on RGB monitors due to the colors they chose. (EDIT: oh and some third-party RGB monitors would ignore the intensity bit, and some don't turn ochre into brown, so essentially CGA over RGB was a crapshot no matter how you looked at it) Now, having 640KB of RAM wasn't anywhere as common, on the other hand =P

But yeah, back on topic, first of all the filter used in the first post is not recreating rainbow artifacts at all: the more contrast is there between the two colors used, the more artifacting there is, so you're pretty much forced to use close colors (which incidentally also makes it more bearable in RGB). If you really insist, do something like what Project MD does: use a checkerboard pattern, and alternate between the two combinations every frame. It practically blends into a solid color as far as the eye is concerned. (sadly, you can't easily demonstrate this in a screenshot)
Sik is pronounced as "seek", not as "sick".

User avatar
kubilus1
Very interested
Posts: 221
Joined: Thu Aug 16, 2012 2:25 am
Contact:

Re: 216 colors with one palette

Post by kubilus1 » Sat Jun 18, 2016 1:27 am

Trust me, old CGA RGB monitors were not uncommon. The cyan and magenta is permanently burned into my brain and many others.

But yeah, interesting idea about alternating the checkerboard pattern. That should get rid of the horizontal banding that occurs when checkerboard is used in composite mode, as well.

tomaitheous
Very interested
Posts: 256
Joined: Tue Sep 11, 2007 9:10 pm

Re: 216 colors with one palette

Post by tomaitheous » Wed Jul 06, 2016 4:10 am

kubilus1 wrote:Not dithering, but horizontal striping.
Same difference. It's just a different form of dithering.
On my system, I don't see rainbow artifacting, maybe I would in larger swaths of colors, but some of the colors do not match exactly what I see on the emulator, which is not a surprise.
Luma signal is not a multiple of the color burst signal, so some TVs are better at filtering this out and some are worse. Your mileage is going to greatly vary depending on the quality of the TV set (and its filters), including "rainbowing" and "muddy" colors.
This technique was used quite a lot on older computers, along with quite a few Genesis games to add more colors and transparency effects. You aren't going to see this used 100% of the time usually, but more of a sprinkle here and there.
It's only sprinkled and not heavily used for several reasons: It doesn't work in PAL land, and RGB was a valid option right on the console itself (no mod needed).
In regards to RGB, I look at it like this. Your Genesis or Megadrive was never intended to be used like that. It's fine that we can hack them nowadays, but you do lose some of the effects you are supposed to be able to get out of your sega: http://nerdlypleasures.blogspot.com/201 ... osite.html
I think you're confusing popular platform with intended platform (signal output). If RGB wasn't an option, they wouldn't have put amp'd RGB right at the back of the system for direct use. The Genesis video encoders are just a different style than dot crawl ones (each have their own advantages and disadvantages). That doesn't mean Sega purposely made the MD with this approach in mind. Matter of fact, look at the whole library - 98% games barely use it. Only late gen games start using more so. If Sega wanted a system with specific NTSC artifacting colors, they would have used a 7.159mhz dot clock and not a 6.711mhz dot clock.


If you want to see a true effect in action, check this out: http://www.youtube.com/watch?v=g51QqurGqg0
A resolution mode that's actually double the subcarrier signal. Perfect NTSC artifact colors (7.159mhz dot clock). NEC included an option to turn off the dot crawl, have this res mode, and never used it. RGB on that system was never official either (later systems don't even have a back plane to access it). By the way, that 4bit tiles/sprites and 512 RGB color just like the Genesis (just more subpalettes).

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

Re: 216 colors with one palette

Post by SegaTim » Thu Sep 01, 2016 2:09 pm

The Lion King for SMD, normal color mode:

Image

43 colors / 61 colors total.

The Lion King for SMD, CVBS color mode:

Image

268 colors!

The Lion King for SMD, RF color mode:

Image

1161 colors!!!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest