pouët.net

Go to bottom

Amiga OCS vs Amiga AGA (020)

category: general [glöplog]
I use Photoshop for stills but for palette generation it's rubbish. I'd recommend pngquant which produces much better results. We also use Blender for 3D.
added on the 2017-05-04 17:31:26 by dodke dodke
pngquant looks really good! It also got a library which may be useful.

I'm writing my own color reduction routine that incorporates that N color changes can be made per line using the copper. Currently it can just reduce colors.

What I do is:
1 - Collect all unique colors of an image in an array
2 - Check which two are most similar
3 - Merge them together.
4 - Goto 1 until there are the wanted number of colors are present in the image
5 - Remap image to the new unique colors

:D

By removing a few low bits of the color values first it can speedup a lot.

By allowing N color changes per line I plan to do the above and then for each line switch the 6 colors which have the worst error per line.

Hoping I will not encounter horizontal stripe artefacts.
added on the 2017-05-05 07:00:19 by rloaderro rloaderro
I have only been lurking on Pouet over the last 7 years or so, but now I am no longer lurking I would just like to say that Loaderror: you rock. It's always nice to see some practical commentary among all the noise.

And just so I am not guilty of doing the very thing that might annoy me I might just like to add some ascii data from a tutorial I am writing for a magazine about AHX/HVL

Square Power Chord
Quote:

0 F#4*4 320 020 <Set 3xx & 0xx>

1 C-3 3 234 411 <LFO and "Thump">
======
2 C-2 0 F02 000 ROOT <Leave yourself some room to move>

3 G-2 0 000 000 7TH <7th>

4 C-3 0 502 000 +OCT <Loop>


I will be checking to see if anyone has seen Dave (Ript) but I honestly have no interest in participating on the BBS further, as you were :) dodke, I don't suppose you have heard from him. There is another thread where I might like to be notified, because I know that you know my mate personally I thought that maybe you had not seen that he is unreachable.
The bit field instructions were useful for cpu rendering directly to chip.
Dual OCS/AGA demos with beefed up effects for when running on AGA? any been done? I seem to remember Sanity Roots perhaps had stuff that was not shown when running on OCS

But would be cool to have a demo that does the same effects on both, just with better higher quality on the AGA machines
added on the 2017-05-05 20:27:12 by DanLemon DanLemon
How to skin a cat had some beefed up effects. You can check the linked video for direct comparision.
added on the 2017-05-05 21:35:30 by noname noname
@loaderror, thats quite a naive sounding approach for color quantization, how does it perform? ?
added on the 2017-05-05 23:21:35 by Oswald Oswald
@oswald : the performance is awful. If quantizing the number of bits per color then the conversion takes several seconds. If not quantizing we're talking a minute or so per picture IIRC. It depends on how many unique colors there are in the image.

This is the absolute simplest thing that can work though.

I first used it to reduce a normal map image of 640x256 into an image where every scanline has ~12 unique AGA colors representing the normals. Then I use these normals to compute a simple directional light per scanline and set the colors using the copper every scanline. The result is a directional light bump which is quite fast because the resolution to shade is effectively 12 x 256 normals.

Problem is that it didn't look any good because of discontinuities between two lines where the colors got reduced differently. If increasing to ~64 colors changed per line it looked seamless though.. Too bad the copper is not fast enough to change that many AGA colors per line.

Then I used it to generate a normal map + ambient occlusion map reduced to just 256 unique normals for the whole image. Then just shade the palette. This looked ok and is now in the Neonsky demo (mandelbulb image).

I now want to revisit the effect with a starting base palette of 256 now and additionally 12 possible color changes per line. This way I can per line select a new color or from the 256 already set. Whatever generates the least error.
added on the 2017-05-06 07:50:47 by rloaderro rloaderro
I mean how good it quantizes colors, not how fast :) median cut sounds better, tho no idea how to do that efficiently wit hundredthousands of colors.

the need to restrict colors per line, and also not to have horizontal banding is quite specific tho.
added on the 2017-05-06 21:15:10 by Oswald Oswald
@loaderror. Your method is pretty similar concept to LBG (except the collation and clustering) What you can try is..

1. Select x amount of colors at random

2. look through each pixel color in the image and map these to the nearest set of random selected colors (do not merge yet)

3. one the whole image pixels are read, then merge each set of color entries (which contain the closest matches) and then repeat step 2 and 3 a few times

You may have some orphan entries, this can be further refined and then the clustering repeated a few times.

To reduce banding, you would somewhat need to analyse the current line and to change the least occurring color entry(s) instead (or those that are not consecutive color pixels)
added on the 2017-05-07 00:21:47 by algorithm algorithm
Fast & furious: Build a random palette from [n] randomly chosen pixels for [n] colors every frame; mod [n] every (linear addressed) pixel into your palette, voilà. Hefty noise and horrid pseudo quantization rolled into one. ;)

(oh, and because no-one mentioned it so far: The "usual" method is to divide and multiplicate by the same value. The integer division reduces precision due to rounding errors; the multiplication gets it "back up" with the rounding error blown up to "not really, but hey" sorts of quantization)
added on the 2017-05-07 08:31:43 by tomaes tomaes
here is an example of a 4-5 second conversion. first 4 bits get chopped off and random dither applied then the remaining colors are reduced like above.

Original:
BB Image

Reduced to 256 color (4 bits cut off each channel)
BB Image

Same reduction using Gimp and Floyd Steinberg dithering
BB Image

Clearly the method in the middle adds a more manly mustache while Gimp's is merely pre-pubertal. Who would the female normal map faces like to take to prom eh??
added on the 2017-05-07 10:29:07 by rloaderro rloaderro
Here is what it looks like if I reduce to N colors per line.

12 AGA colors - heavy artefacts
BB Image

64 AGA colors - not too bad
BB Image
added on the 2017-05-07 11:14:49 by rloaderro rloaderro
OCS dynhires 12 colors per line with dithering:
BB Image
added on the 2017-05-07 13:57:43 by bifat bifat
@bifat Looks really great! And it is just OCS colors. It says tekUI so this is your own tool. Did you use it any demo yet?

Do you do anything to avoid discontinuities between two consecutive horizontal lines or does it just get remedied by good dither settings?

I should consider dropping resolution to lowres and OCS colors.
added on the 2017-05-07 15:18:57 by rloaderro rloaderro
rloaderro: yes, here: http://www.pouet.net/prod.php?which=68255 and to a lesser extent here: http://www.pouet.net/prod.php?which=68903. In the first thread I wrote something about how the converter works. For the slideshow I twiddled with the sliders for hours to get the best results out of it, this here worked quite well with the default settings.
added on the 2017-05-07 17:57:55 by bifat bifat
Nicely off topic with this colour quantizing discussion.. well done :D
added on the 2017-05-07 18:43:08 by DanLemon DanLemon
I missed Elevation totally first time. Looks really good! Hope to see more of this in upcoming demos.

Now back on track.. AGA vs OCS. Discuss!
added on the 2017-05-12 16:17:49 by rloaderro rloaderro
Quote:
Nicely off topic with this colour quantizing discussion.. well done :D

Isn't "effects enabled by AGA which don't need a fast CPU" exactly what this thread is about? :)
added on the 2017-05-12 16:48:06 by Blueberry Blueberry
Amiga - where colorcycling still counts as effects. \:D/
Quote:
Isn't "effects enabled by AGA which don't need a fast CPU" exactly what this thread is about? :)


I guess.. but the colour reduction discussion is worthy of it's own thread :)


Quote:
Amiga - where colorcycling still counts as effects. \:D/


If it looks cool?... why not :D I did some colour cycling in the intro for Chiperia 6, and it gave a great effect ;)
added on the 2017-05-12 17:07:13 by DanLemon DanLemon
@Dan: I definitely didn't mean that it shouldn't be done. ;)
there are no rules :D and the "cheaper" the effect (cycle-wise).. the better...
added on the 2017-05-12 17:39:35 by DanLemon DanLemon
If you wanna see how good colour cycling can be, check out britelites entry from datastorm 2014 called cracktro
added on the 2017-05-13 10:03:04 by djh0ffman djh0ffman
I want to see it. Give us a link, please!
added on the 2017-05-13 12:39:34 by noname noname

login

Go to top