Experimental Atari STE image enhancement website online

GFA, ASM, STOS, ...

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3468
Joined: Sat Jun 30, 2012 9:33 am

Re: Experimental Atari STE image enhancement website online

Postby dml » Thu May 01, 2014 8:01 am

dma wrote:How could this work with sprites? Would those also be two-images-flickering based or not?


Good question! :)

I tried some full experiments (on the other thread) with scrolling game background demos from Arcade boxes and had started on sprites after that, but didn't complete the work on sprites (distractions!). I worked out some patterns and preshift rules and a mocked-up test - but that's about as far as it got.

Anima has been looking into this also - managing flicker while things scroll/move - so there could be some additional ideas/conclusions appearing here soon. :)

BTW if the connection hasn't been made already, this project has also been using the technique since quite an early stage in its development - so we know it works on 3D stuff too.
viewtopic.php?f=4&t=16682&start=250#p239166

Sprites have special issues since they will be moving at 25 or 50hz and potentially in the opposite direction to the scrolling, unlike 3D graphics like this which take a few frames to compose an image, and the interlace is highly decoupled - not so fussy. Although converting the textures was painful.

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Thu May 01, 2014 9:38 am

evil wrote:Hello,

very nice tool, well done! I have a couple of suggestions and questions, don't take it as critisism please :)

Thanks. This thread is for exactly that purpose. ;)

evil wrote:a) Would it be possible to support other resolutions than 320x200 and still output in two files just not .pi1? Some of us enjoys coding in fullscreen and then bigger pics would be great :) A simple format could be: palette+rawdata, 16px alignment for width is of course needed.

That's a good idea and I'll keep that in mind for the tool improvement.

evil wrote:b) Supporting ST palette would be neat as well

Quite easy to implement in the current path but beware: the results won't be as good as having access to 4096 colours (quite obvious).

evil wrote:c) Would using two palettes (one for each frame) improve the results?

Well at least the number of colours in the resulting image will not improve. Probably the result might look better in some cases!? I need to check that but probably Doug has an answer for this question? ;)

evil wrote:d) Will this tool be released stand-alone? dyndns doesn't sound comforting for the future

The website won't be online forever for sure so I'll prepare the tool as a standalone package soon.

Cheers
Sascha

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3468
Joined: Sat Jun 30, 2012 9:33 am

Re: Experimental Atari STE image enhancement website online

Postby dml » Thu May 01, 2014 9:58 am

Anima wrote:
evil wrote:b) Supporting ST palette would be neat as well

Quite easy to implement in the current path but beware: the results won't be as good as having access to 4096 colours (quite obvious).


This is an interesting one - it does work, and the results can be better than expected in some cases - but not with all images. There is less competition to generate a 12-bit palette than to generate a 15-bit palette, but shading obviously isn't so nice.

One area which doesn't work so well on ST is the desaturation trick, and the shading which results.

Desaturation helps by keeping target colours away from the RGB 'pegs' of 0 and (7 or 15) so the chance of being able to simulate a colour from two others increases significantly. Using saturated colours steals disproportionately from the pairing budget. While desaturation generates nice, subtle shading on STE - it will be less subtle on ST, quantized to 12bit and easier to see artifacts.

In most cases you can't fiddle with the lower end (0) but upper end works fine for most colours except whites.

Anima wrote:
evil wrote:c) Would using two palettes (one for each frame) improve the results?

Well at least the number of colours in the resulting image will not improve. Probably the result might look better in some cases!? I need to check that but probably Doug has an answer for this question? ;)


Another interesting one. I tried it, and didn't have much success - mainly because both palettes are present in both images and are perfectly complementary. It would only provide benefit if you didn't have to interlace the two images together 50/50. So even if you let the palettes diverge to error-correct each other, they automatically try to converge and its a zero sum game.

However if anyone else tries it and gets further, that would be interesting.

I also tried generating raster-split images. i.e. pay a few % CPU to divide the image into blocks, and generate complementary palettes for each block. You get results closer to a palette-switching system at a fraction of the cost, but you can't move things like sprites up and down through the rasters, without heavy-handed trickery :) You also need extra cost metrics to avoid nasty banding problems.

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Experimental Atari STE image enhancement website online

Postby Zamuel_a » Thu May 01, 2014 6:44 pm

Why is it the same palette that is used on both frames? Changing palette for each image wouldn't take much extra CPU power and feels like it should give a better result.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Thu May 01, 2014 7:00 pm

Zamuel_a wrote:Why is it the same palette that is used on both frames? Changing palette for each image wouldn't take much extra CPU power and feels like it should give a better result.


Due to the anti flicker methods like alternating pixels you need to exchange the colours of each frame on every other pixel. Obviously this is only possible due to the fact that both palettes are identical. You cannot do that when the pixel colour is from a different palette.

evil
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 139
Joined: Sun Nov 12, 2006 8:03 pm

Re: Experimental Atari STE image enhancement website online

Postby evil » Thu May 01, 2014 9:06 pm

Anima wrote:
evil wrote:a) Would it be possible to support other resolutions than 320x200

That's a good idea and I'll keep that in mind for the tool improvement.

evil wrote:b) Supporting ST palette would be neat as well

Quite easy to implement in the current path but beware: the results won't be as good as having access to 4096 colours (quite obvious).

evil wrote:c) Would using two palettes (one for each frame) improve the results?

Well at least the number of colours in the resulting image will not improve. Probably the result might look better in some cases!? I need to check that but probably Doug has an answer for this question? ;)

evil wrote:d) Will this tool be released stand-alone? dyndns doesn't sound comforting for the future

The website won't be online forever for sure so I'll prepare the tool as a standalone package soon.



Thanks for the quick reply :)

I understand that the ST-palette would not fare as good, but seeing stuff from for example Aggression (check the Overdose demo) that have numerous images like that with great results, gives me hope. Although those palettes are hand-picked.

As for using two separate palettes; I did not think of the inter-frame dithering for flicker reduce. Scrap the dual-palette idea :)


Thanks again, and looking forward to the updates, especially the arbitrary resolutions :)

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Tue Aug 12, 2014 8:16 pm

Anima wrote:
evil wrote:d) Will this tool be released stand-alone? dyndns doesn't sound comforting for the future

The website won't be online forever for sure so I'll prepare the tool as a standalone package soon.


"soon"... well... :D

Ok, I was hoping that ImageMagick has been ported to JavaScript but unfortunately it seems that it has too many dependencies so the "convenient" standalone solution is still not available yet. :(

Attached you will find an ST disk image and the same files as a ZIP archive containing an STE slideshow. The images are created using the image enhancement website tool, concatenated and compressed with the LZ4 archiver. The LZ4 format is really nice since the decompression is very simple and fast.

The slideshow runs on a Falcon as well but you need to select low- or mid-res first before starting it. Please note that it's strongly recommended to run the slideshow on real hardware.

Cheers
Sascha
You do not have the required permissions to view the files attached to this post.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3468
Joined: Sat Jun 30, 2012 9:33 am

Re: Experimental Atari STE image enhancement website online

Postby dml » Wed Aug 13, 2014 11:10 am

Good to see work continues on this.

The challenge I found with doing this standalone is providing a good cost function while also trying to do it exhaustively across the colour space. Most of the complexity went there. Nearly all of it in fact. Of course one option is to use a simpler cost function and be more exhaustive. This works best for merged images (not viewed on real HW) but for best results on HW the cost function becomes more important.

I think it also depends a lot on the input material - sometimes a good cost function makes a big difference and sometimes it doesn't seem to matter at all. After a while you get a feel for which things convert well for viewing on HW and with what settings etc.

Anyway, good stuff!

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Wed Aug 13, 2014 12:52 pm

dml wrote:Good to see work continues on this.

The challenge I found with doing this standalone is providing a good cost function while also trying to do it exhaustively across the colour space. Most of the complexity went there. Nearly all of it in fact. Of course one option is to use a simpler cost function and be more exhaustive. This works best for merged images (not viewed on real HW) but for best results on HW the cost function becomes more important.

I think it also depends a lot on the input material - sometimes a good cost function makes a big difference and sometimes it doesn't seem to matter at all. After a while you get a feel for which things convert well for viewing on HW and with what settings etc.

Anyway, good stuff!


Thanks Doug,

I agree. Finding the best conversion path depending on the input material is still missing in my solution and so I would say the tool is still not complete without it. While converting many images using my tool I also got an eye for the best choice of the colour space but there's always a "black sheep" which proves me wrong with my prediction. Still there are some really good results and others are quite awful.

However, I hope to find some time to add some movement to the images. This is where this colour enhancement approach makes the most sense. ;)

Cheers
Sascha

P.S.: your Falcon Quake 2 tests are awesome. :cheers:

evil
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 139
Joined: Sun Nov 12, 2006 8:03 pm

Re: Experimental Atari STE image enhancement website online

Postby evil » Sun Aug 17, 2014 8:44 am

Anima wrote:
Anima wrote:
evil wrote:d) Will this tool be released stand-alone? dyndns doesn't sound comforting for the future

The website won't be online forever for sure so I'll prepare the tool as a standalone package soon.


"soon"... well... :D

Ok, I was hoping that ImageMagick has been ported to JavaScript but unfortunately it seems that it has too many dependencies so the "convenient" standalone solution is still not available yet. :(

Attached you will find an ST disk image and the same files as a ZIP archive containing an STE slideshow. The images are created using the image enhancement website tool


Hi!

Nice converted images there, it shows great potential.
However the site is always offline when I try to load it (probably tested over 20 times the last few months).

To get it into a more permanent state, would if be of any help if I offer a bit more robust hosting? I'm one of the guys running Atari.Org and could create an account there for you.

Is there any specific software needed apart from ImageMagick?

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Sun Aug 17, 2014 10:15 am

evil wrote:Hi!

Nice converted images there, it shows great potential.
However the site is always offline when I try to load it (probably tested over 20 times the last few months).

To get it into a more permanent state, would if be of any help if I offer a bit more robust hosting? I'm one of the guys running Atari.Org and could create an account there for you.

Is there any specific software needed apart from ImageMagick?


Hi evil,

sorry for the inconvenience the offline website has caused. Thanks for your offer to host the tools online but I think that's not necessary anymore.

Actually I am working on a new JavaScript tool which already works quite well. It will also support the ST palette (512 colours). The PI1 image export is still lacking but I hope to put it online tomorrow.

While ImageMagick is great for converting images I still felt unconfortable using it just for some simple things like dithering or color quantisation. You also have not the complete control over the internal functions so it was not the "perfect" solution.

Here are some examples using the ST palette (original image on the left and ST enhanced image on the right):

Image Image
Image Image
Image Image
Image Image
Image Image

Cheers
Sascha

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Sun Aug 17, 2014 9:35 pm

The (new) Experimental Atari ST(E) image enhancement website is online. The original post was updated as well. It's not quite perfect.

Recommended browsers are the most recent versions of Firefox and Chrome.

Cheers
Sascha

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Fri Aug 22, 2014 4:37 pm

Just a short update: the website now supports creating LZ4 compressed images as well.

evil
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 139
Joined: Sun Nov 12, 2006 8:03 pm

Re: Experimental Atari STE image enhancement website online

Postby evil » Sat Aug 23, 2014 5:32 pm

Anima wrote:Just a short update: the website now supports creating LZ4 compressed images as well.


Great stuff, it looks good.
Only waiting for the arbitrary image size so we can have fullscreen graphics :)

And to prepare a little for that day, I made a simple viewer for fullscreen files. I took your example pic and filled it up for fullscreen 416x273 resolution (should work on any ST/STe, no code path for Falcon or TT made). Download it here: http://files.dhs.nu/files_gfx/duo_v1.zip

The file format for the .duo file is:
palette (32 bytes)
screen 1 (208*273 bytes)
screen 2 (208*273 bytes)

I know it should probably have a header with x/y resolution, but as the viewer expects nothing else, it'll pass for now.

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Sat Aug 23, 2014 7:38 pm

evil wrote:Only waiting for the arbitrary image size so we can have fullscreen graphics :)

Good point. Support for arbitrary resolution has just been added to the tool. ;)

evil wrote:The file format for the .duo file is:
palette (32 bytes)
screen 1 (208*273 bytes)
screen 2 (208*273 bytes)

I know it should probably have a header with x/y resolution, but as the viewer expects nothing else, it'll pass for now.

Thanks for the details. I'll add download options for the "duo" format later on.

Cheers
Sascha

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Sat Aug 23, 2014 8:59 pm

Ok, DUO format added for overscan images. Just checked the output and it works great with your viewer.

Here is an example (click on the image to download the DUO image):
Image

Cheers
Sascha

User avatar
CiH
Atari God
Atari God
Posts: 1093
Joined: Wed Feb 11, 2004 4:34 pm
Location: Middle Earth (Npton) UK
Contact:

Re: Experimental Atari STE image enhancement website online

Postby CiH » Sat Aug 23, 2014 9:08 pm

Sascha, awesome work! :cheers:
"Where teh feck is teh Hash key on this Mac?!"

evil
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 139
Joined: Sun Nov 12, 2006 8:03 pm

Re: Experimental Atari STE image enhancement website online

Postby evil » Sun Aug 24, 2014 9:49 am

Anima wrote:Ok, DUO format added for overscan images. Just checked the output and it works great with your viewer.


Thanks a bunch for the quick update :-)

I've put it through some tests and the results are often quite good. Previously I've used 320x273 dual-screen Spectrum 4096 graphics in our demos, and I was curious to see how your tool would compare with only one 16 colour palette. The results are not that far off the much heavier Spectrum tech :)

Original - Spectrum 29k - Enhanced
ImageImageImage

Original - Spectrum 29k - Enhanced
ImageImageImage

Original - Spectrum 29k - Enhanced
ImageImageImage


So certainly there is some colour loss, both compared to the original and the Spectrum 29k versions. However It doesn't suffer from the Spectrum horizontal colour spans that can sometimes be spotted and especially for the last image, it's a smoother looking picture despite lack of some colours.

However, these Spectrum 29k images are not optimal, the converters of today (Cyg, Doug, Zerkman) do a much better job than what I got back then, especially the last picture from Cernit Trandafir used less optimimal conversions which I refined for the Drone demo (first two pictures). So I think if I re-did the Spectrum 29k files now, would outclass both the Spectrum 29k and Enhanced versions.


Anyhow thanks a bunch for the converter, it worked fine to download it locally as well!

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Sun Aug 24, 2014 11:04 am

Hi evil,

thanks for the interesting comparison.

evil wrote:So certainly there is some colour loss, both compared to the original and the Spectrum 29k versions. However It doesn't suffer from the Spectrum horizontal colour spans that can sometimes be spotted and especially for the last image, it's a smoother looking picture despite lack of some colours.

Colour banding is a problem with having "only" 31 shades per RGB channel. That was the reason why I've added dithering to the conversion pipeline. However, dithering works best on high resolution images and tends to produce color bleeding pixels which are really annoying on lower resolutions. So that's the reason why the tool still provides the enhanced image without dithering.

evil wrote:However, these Spectrum 29k images are not optimal, the converters of today (Cyg, Doug, Zerkman) do a much better job than what I got back then, especially the last picture from Cernit Trandafir used less optimimal conversions which I refined for the Drone demo (first two pictures). So I think if I re-did the Spectrum 29k files now, would outclass both the Spectrum 29k and Enhanced versions.

I think the Spectrum 29k still does a good job here.

evil wrote:Anyhow thanks a bunch for the converter, it worked fine to download it locally as well!

I think it's important to have a tool which runs locally as well. So I wasn't really happy with previous version. Note to others: you only have to copy the following files to a folder on your PC (right click on the links and select "save link as..."): index.html, main.js and lz4.js.

Cheers
Sascha

evil
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 139
Joined: Sun Nov 12, 2006 8:03 pm

Re: Experimental Atari STE image enhancement website online

Postby evil » Sun Aug 24, 2014 12:53 pm

Anima wrote:
evil wrote:Anyhow thanks a bunch for the converter, it worked fine to download it locally as well!

I think it's important to have a tool which runs locally as well. So I wasn't really happy with previous version. Note to others: you only have to copy the following files to a folder on your PC (right click on the links and select "save link as..."): index.html, main.js and lz4.js.


I got another idea for for new feature:
Would it be hard to select how many of the 16 colours to use for the output picture?
For example, it could be useful to generate a picture that uses only eight colours, then the fourth bitplane could be used for an overlay effect.
Or why not use 15 colours, then one colour could be spared for raster gradients.

Maybe a worthless idea, it might deteriorate the picture quality too much to be useful?

evil
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 139
Joined: Sun Nov 12, 2006 8:03 pm

Re: Experimental Atari STE image enhancement website online

Postby evil » Sun Aug 24, 2014 12:55 pm

Managed to get a dupe post, no idea how.
Last edited by evil on Sun Aug 24, 2014 1:33 pm, edited 1 time in total.

evil
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 139
Joined: Sun Nov 12, 2006 8:03 pm

Re: Experimental Atari STE image enhancement website online

Postby evil » Sun Aug 24, 2014 12:57 pm

And even a tripple post? What the hell..

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Sun Aug 24, 2014 2:27 pm

evil wrote:I got another idea for for new feature:
Would it be hard to select how many of the 16 colours to use for the output picture?
For example, it could be useful to generate a picture that uses only eight colours, then the fourth bitplane could be used for an overlay effect.
Or why not use 15 colours, then one colour could be spared for raster gradients.

Maybe a worthless idea, it might deteriorate the picture quality too much to be useful?

You may check the website again to see the new functions. ;)

So now choose from 4, 8 or 16 colors for the Atari images. You can also select 32 or more colours but this is just for fun. Maybe the 32 colour quantisation is useful for an Amiga!?

Cheers
Sascha

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Experimental Atari STE image enhancement website online

Postby Zamuel_a » Tue Aug 26, 2014 8:54 am

Is there a picture viewer that use medium resolution? It feels like the higher resolution should improve the quality. Dither looks better and also interlace. The 4 color limitation can't be such big issue since constantly changing the palette must result in alot of colors for each scanline.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 642
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Experimental Atari STE image enhancement website online

Postby Anima » Tue Aug 26, 2014 11:48 am

The website has been updated: support for monochrome (640 x 400) and mid-res (640 x 200) resolutions has been added.

Cheers
Sascha


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 2 guests