Posté le 18/09/2016 à 07:41 Membre depuis le 28/01/2003, 160 messages
Here's a little something I've been toying with.

The issue:

Considering a large scroll section, like the following:
160918073904832619.png

Current tools work out the palettes to the best of their ability, but palettes count can quickly rise to large numbers. As they have to sit in palette RAM, it can be a problem to have room left for other elements.
Above example end up taking 228 palettes.


The solution:

We know a scroller displays max 21 sprites, so the solution is to rework the tilemap and add a palette management to move palettes in/out the palette RAM depending on requirements for currently displayed data.

So instead of having to reserve 228 palettes, you shrink palettes usage to the highest count required at any time.

For the above example we shrink down from 228 to 71 palettes:
160918074451298329.png

The solution is fairly light on CPU, takes up some more ROM space, but it is a good trade off for more palettes RAM ressources.


And it actually works triso
Posté le 18/09/2016 à 11:31 Membre depuis le 21/03/2014, 187 messages
Very cool stuff cool - will this new colorStream feature be added to the next DATlib version?
Posté le 18/09/2016 à 16:50 Membre depuis le 27/04/2006, 59399 messages
Nice smile
avatarZeroblog

« Tout homme porte sur l'épaule gauche un singe et, sur l'épaule droite, un perroquet. » — Jean Cocteau
« Moi je cherche plus de logique non plus. C'est surement pour cela que j'apprécie les Ataris, ils sont aussi logiques que moi ! » — GT Turbo
Posté le 18/09/2016 à 19:06 Membre depuis le 28/01/2003, 160 messages
NeoHomeBrew (./2) :
Very cool stuff cool - will this new colorStream feature be added to the next DATlib version?

Yep, but not sure when
Posté le 20/09/2016 à 04:33 Membre depuis le 23/10/2015, 48 messages
HPMAN YOU JUST KILLED IT! pam

I have been working tirelessly on converting a bunch of footage to a project. I wanted to show you guys when it was complete.
I realized that each 320x224 image was costing me valuable palette space and that was contributing to inflating the P rom.

I made up my own little method I like to call the "FilmStrip method"

1. Pictures were no good because each picture gets analyzed separately...losing on tile and colour compression here....
If there were identical tiles between frames they were being added to the project again and again.
I noticed that each scene had groups of colors and that more likely than not I was re-saving the same damn palettes again and again because each frame was so similar.

2. Sprites were no good because I must use the framer and animator tools making for too much work.
(Don't get me wrong these tools are absolutely amazing just not for this purpose)

3. Scrollers all the way! I made vertical strips "Film Strips" that contained what I believed to be frames that had similar colours.
I then compressed and sometimes recompressed the frames with a little app I found called pngquant. https://pngquant.org/
This little program was sick because you can drag and drop your .png image on a .bat file and it will compress it for you without the need for the command line.
I then learned that if you make a .bat file and add this line "datimage %1 -mtc15" you can have your own little quick and dirty DATimage that outputs a Neo Format image without the use of the command line.

A. Create Vertical .png containing several full screen 320x224 images
B. Quantize (pngquant) and format with DATimage. My goal was to always have no more than 180 pals per film strip at compile time.
(This part is fussy and several tests were performed to ensure the images still look good you may often second guess your groupings and redo them roll)
C. In your code increment your scroller image Y coordinate by 224 to move to the next frame.

The savings here were incredible I went from covering 3 banks to 1 bank with tons of room to spare.

-Maximum tile compression because several images are analyzed together.
-1000's of palettes to 180 or below per filmstrip
-Placement is perfect. Meaning frames are muddied but they are ready for an artist to do a number on them and remaster them using the existing colours.
-The trade off is quality here because each strip is quantized.

This method can still be used in conjunction with colour streaming!
1000's of palettes are too much per filmstrip but now you can exceed 180 palettes and compress your images less getting better results!

Did encounter a little snag I am hoping someone can point me in the right direction on.

For example I have two 180 palette images.
I want to display both images at the same time.
The plan is to allocate image one to pal bank 1 and to allocate image two to pal bank 2.

I read the DATlib documentation and noticed there is only room for the 'Base Palette', 'Total Palette Number', and 'Pointer to PalData' in the palJobPut function.
Is there a way to force an image to display it's palette using the second palette bank through DATlib?

I did this because...some images were too complex...so I cut portions of them out to make for better compression per image.
My idea was less colours per image makes for better compression per image. I layer the two images on top of each other they will appear rich to the eye and complete the frame.

Well I am foaming at mouth now that I saw this crazy ass new feature!!!!!!!!! Hats off HPMAN! chapo

In the meantime I will continue with my experiment and post the results when I have something nice to share.
Doing this is driving me crazy but I can't seem to stop.

HPMAN and who ever is interested....
I uploaded some filmstrip samples. Hoping that maybe you could perform some tests with your colour stream monster!

https://www.dropbox.com/s/m4xequbgrzdviv0/FilmStripExample.zip?dl=0

**Edit I re-uploaded the link above with some better organization

RAW = FilmStrips that have not been quanitized or have been modfied with DATimage.
NeoGeoFormat = FilmStrips with various levels of quantization there is always one that has 256 pals or below and of course they are Neo ready.
Folder titled 'Face and Eyes' is my attempt at separating images in hopes of layering them using the different palette banks for a richer image.
This is alternate attempt at the colour rich "Face" FilmStrip.

Filmstrips are animated from the bottom up .txt was included to save you the math basically you set your Y coordinate and y-=224 until you reach '0' then you move on to the next strip

The big questions....

Can ColorStream support vertical scrolling?
Can ColorStream support jumping? EX: incrementing y by 224 per vblank
Can ColorStream palette counts beyond 256? EX: We are streaming now so is there wiggle room to load a massive palette list.
Posté le 21/09/2016 à 21:15 Membre depuis le 28/01/2003, 160 messages
Yeah your work would benefit from this kind of palette management, I'd have to adapt the code to optimize for full screen jumps rather than single tile tho.

256+ total palettes is no issue as long as you can store them. It's currently horizontal only but that's not final.
Posté le 22/09/2016 à 12:47 Membre depuis le 23/10/2015, 48 messages
Hi HPMAN!

Crazy exciting stuff you've got going on!
Whatever you decide I'm sure it will be dynamite enflamme

The whole idea is a game changer!

I'm glad I could offer a little bit of a different perspective on the potential uses of the scroller.

Scrolling in all directions horizontal, vertical and diagonal with streaming is the dream! lol
(I see platformer games and elaborate intros benefiting big time)
Palettes exceeding 256 is crazy!!!!!!!! Great for maintaining high detail
Jumps would be awesome for the cinematic stuff!!!!! Helps when processing frames

I know I just repeat myself too excited!
Posté le 18/04/2017 à 18:51 Membre depuis le 23/10/2015, 48 messages
Hi HPMAN

I recently got hyped when I viewed the new SNK logo seen here:

https://youtu.be/zzBt6Raq4P8

I decided to try and port it to Neo Geo. I know with image catalogs and DATimage it can be done happy

But if the 'Filmstrip' method could be utilized instead with your streaming technology that would be really cool.

I made a dropbox file that contains the original image and the original image reduced to 15 colours per tile.
I know you might not be interested but I figure it is a great little file to perform tests on If you felt so inclined.

https://www.dropbox.com/s/6ipjn65aaf0pdua/New_SNK_Logo.zip?dl=0
Posté le 20/04/2017 à 15:50 Membre depuis le 28/01/2003, 160 messages
I'll give it a go, but I need to add a few features first to parse vertical files and steps larger than 1 tile.
Posté le 26/04/2017 à 01:12 Membre depuis le 23/10/2015, 48 messages
Hi HPMAN

This is great news! boing

In my haste I provided a sub par filmstrip. I remember you saying no more than 180 Palettes per image. Most likely the filmstrip I provided has frames that have more than 180 Palettes in them.

I created a new drop file.

Frames Folder
RAW_FRAMES - All the frames I exported complete with original colour data.
Frames_15_Colours_Per_Tile_180_Pal_Max_Per_Frame - The title of the folder says it all there is a .xml in there and the result should be all frames when compiled have less than 180 pals.

FilmStrip Folder
FilmStrip_15MTC_Less_Than_180_Pals_Per_Jump.png - The title says it all this filmstrip was made from the formatted frames.
CompiledPals.png - A screenshot indicating when compiled the image is 4497 pals

Picture
SNK_48_176.png - formatted (maybe used in conjunction with some fade magic)
The_Future_Is_Now_16x176.png -formatted (maybe used in conjunction with some fade magic)

Jingle Folder
SNK.mp3 - 192kps rip of the new jingle...

SNK CORPORATION - SOUND LOGO.mp4 - Source file used to get the frames and jingle.

I am not convinced that my method to quantize the colours was the best...Hoping one day to discuss possible solid ways of compressing images for use with the Neo with you.
In the meantime these files should be a good start.

The frames I quantized for the example were handled like this...

1. Datimage -mtc15
2. pngQuant
3. Datimage -mtc15
4. Compile....problem frames 62 and 64 were quantized again due to both being over 180 pals

https://www.dropbox.com/s/j1kxj7rk98y5kf2/NEW_SNK_LOGO.zip?dl=0