Retro Graphics Toolkit

Talk about development tools here

Moderator: BigEvilCorporation

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Tue Jun 04, 2013 8:54 pm

The wrong colors is caused by you using update dither all tiles instead of dither tilemap as image. The reason you are only getting 2 rows is because of the image try a different one. I did slightly change the rgb values to be based on the table provided by HardWareMan on this topic
viewtopic.php?t=1389

Ti_
Very interested
Posts: 97
Joined: Tue Aug 30, 2011 7:50 am
Contact:

Post by Ti_ » Tue Jun 04, 2013 9:19 pm

I got 4 rows, with other image. But, pals in tilemap still not saved.

Also how can I see, how much different colors generated?
I can't save as png, will you add this option?

As I understand you algorithm without any 'loses', so it doesn't make many colors, but in some cases it better than 16...

You can try to give the user to manual define the palette, and than make program to generate closest colors. It's only one really good method that I know to make really good picture in 1 layer.

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Tue Jun 04, 2013 11:18 pm

Good news I fixed the tilemap glitch and have added the feature to manully define palette previously it would just automaticlly pick a row based on hue but now it will ask you if you want the palette rows to be picked automaticlly or not. I have a new build system that allows me to build the windows binaries on linux so expect up to date windows binaries. The windows binaries are now hosted on github https://github.com/ComputerNerd/Retro-G ... kit.exe.7z
To download click View Raw

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Tue Jun 04, 2013 11:35 pm

Such user unfriendly tool. It took me half of hour to make sense how to import bitmap. And one more half of hour, to realise possibilities.

I don't want to discuss about current version of program.
I just want to say, how I imagine good retrographic tool.
1) Any size of palette. for example, may be I want 20 colors.
2) Three types of color:
a) free: image can use this color, and can change this color
b) locked, known: image can use this color, but can't change it.
c) reserved unknown (optional): means, that image can't use this color, because it will be changed by game with some logic. (needs if palette size will be fixed)
3) Ability to break into layers by palette. It is very usable to be able split image to two or even three layers.
Image

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Wed Jun 05, 2013 12:20 am

r57shell Those are some very good ideas and they appear to be easy to add so expect them soon. I already have added loading and saving of palettes of any length done.

Ti_
Very interested
Posts: 97
Joined: Tue Aug 30, 2011 7:50 am
Contact:

Post by Ti_ » Wed Jun 05, 2013 6:35 am

sega16 wrote:Good news I fixed the tilemap glitch and have added the feature to manully define palette previously it would just automaticlly pick a row based on hue but now it will ask you if you want the palette rows to be picked automaticlly or not.
UUhh. I don't understand.
First I open pal, after image. After I tried to 'generate pal with 4 rows' - with pressing YES and with pressing NO., ang progress bar with pallette generation goes both times, and pal changes.

Pals in tilemap still doesn't saved.
They only saves when if you make "remove tiles after duplicate", but not after palette and image generated.

Ti_
Very interested
Posts: 97
Joined: Tue Aug 30, 2011 7:50 am
Contact:

Post by Ti_ » Wed Jun 05, 2013 6:39 am

r57shell wrote:Such user unfriendly tool. It took me half of hour to make sense how to import bitmap. And one more half of hour, to realise possibilities.

I don't want to discuss about current version of program.
I just want to say, how I imagine good retrographic tool.
1) Any size of palette. for example, may be I want 20 colors.
Good idea - to make console program that reduces colors PNG-to-PNG 9 bit, with color count specified by user.

convert.exe in.png out.png -48

Someone can make that?
:D

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Thu Jun 06, 2013 5:06 am

Ok I added all the features that were suggested by r57shell and about the tilemap not saving palette glitch I think you may be running an old binary I updated the windows binary please redownload https://github.com/ComputerNerd/Retro-G ... kit.exe.7z

Ti_
Very interested
Posts: 97
Joined: Tue Aug 30, 2011 7:50 am
Contact:

Post by Ti_ » Thu Jun 06, 2013 7:37 am

sega16 wrote:Ok I added all the features that were suggested by r57shell and about the tilemap not saving palette glitch I think you may be running an old binary I updated the windows binary please redownload https://github.com/ComputerNerd/Retro-G ... kit.exe.7z
Okay, pals saved.
Another bug: if open tiles, only 894 from 896 tiles loaded.
file size 28 672 bytes, so programs draws infinite errors with can't draw tile #895 at position x,y

sega16
Very interested
Posts: 251
Joined: Sat Jan 29, 2011 3:16 pm
Location: U.S.A.

Post by sega16 » Thu Jun 06, 2013 11:21 pm

Ok I fixed the bugs and added support for loading compressed tiles and tilemaps. The link is the same. Please re-download. Also thank you for the bug reports they help out a lot.

frederic
Interested
Posts: 23
Joined: Tue May 28, 2013 7:32 pm
Location: France

Post by frederic » Fri Jun 07, 2013 1:18 pm

Ti_ wrote:Good idea - to make console program that reduces colors PNG-to-PNG 9 bit, with color count specified by user.

convert.exe in.png out.png -48

Someone can make that?
:D
It already exists:
http://www.imagemagick.org/Usage/quantize/#intro

The command is even named convert.exe:
convert.exe in.png -colors 48 out.png

Dithering is enabled by default by you can disable it or chose another dithering algorithm.

To use your own color palette:
convert.exe in.png -remap colorpalette.gif out.png

It is a very powerful tool that can do many other things.

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Fri Jun 07, 2013 2:19 pm

frederic wrote:It already exists:
http://www.imagemagick.org/Usage/quantize/#intro
Can you do reduce colors into Genesis colorspace with dithering.
I don't know how to do it in ImageMagick.
Image

frederic
Interested
Posts: 23
Joined: Tue May 28, 2013 7:32 pm
Location: France

Post by frederic » Fri Jun 07, 2013 2:58 pm

r57shell wrote:Can you do reduce colors into Genesis colorspace with dithering.
I don't know how to do it in ImageMagick.

Code: Select all

convert input.png -remap colorsyo.png output.png
Input and output formats can be different, for example you can convert jpg to png.

colorsyo.png is an image that contains all the colors of the Genesis palette. You can get this image here: http://img11.imageshack.us/img11/5651/colorsyo.png (I don't remember where I got it from, it may be inaccurate). Any image will do as long as it contains at least 1 pixel of each color of the Genesis palette (and no other color, of course).

Dithering (Riemersma) is applied by default. You can specify which algorithm you want:

Code: Select all

convert input.png -dither Riemersma -remap colorsyo.png output.png
or
convert input.png -dither FloydSteinberg -remap colorsyo.png output.png
To disable dithering, these two commands are equivalent:

Code: Select all

convert input.png -dither None -remap colorsyo.png output.png
convert input.png +dither -remap colorsyo.png output.png

r57shell
Very interested
Posts: 478
Joined: Sun Dec 23, 2012 1:30 pm
Location: Russia
Contact:

Post by r57shell » Fri Jun 07, 2013 3:15 pm

It will just change quantized colors in genesis ones.
Image

frederic
Interested
Posts: 23
Joined: Tue May 28, 2013 7:32 pm
Location: France

Post by frederic » Fri Jun 07, 2013 3:57 pm

r57shell wrote:It will just change quantized colors in genesis ones.
Yes, it won't break an image into 16-colors tiles. It may be possible to write a script that combines several imagemagick commands to do that. Imagemagick may not be the best tool to do such a thing.

Post Reply