Posté le 04/10/2017 à 20:26 Membre depuis le 23/10/2015, 50 messages
Hi Blastar!

The NGFX tools kick ass!

One small observation is that "Palette > Save as" the window prompt that opens says "Open" when it should say "Save"...The functionality works perfectly just saying...

Now on to the big questions.....

Seen below is your typical NGFX GUI as a reference point.

tromb Fichier joint : uYoS

Often when I import an image I will need to use the drag and drop feature to match the palette of the imported image to the palette I have loaded in NGFX.
1. By adjusting the the drag and drop to be vertical and a little larger it would be much easier to do manual palette matching. (It is small now and you are comparing vertical to horizontal all the time)
2. A feature called "Match to Current Palette" if checked the palette in your imported image would shuffle to best match the palette that is currently loaded in NGFX.

If you look at my example you could A) Manually drag and drop palette entries or B) Just check "Match to Current Palette" and the computer would do its best to line up palette entries using the current NGFX palette as the reference.

See a mockup for a better visualization of feature requests.

tromb Fichier joint : h6El

Thanks a million for creating this great tool! king
Posté le 05/10/2017 à 17:33Edité par blastar le 05/10/2017 à 18:54 Membre depuis le 07/07/2015, 122 messages
done! smile

thanks for compliment and creating a mockup - this helped a lot!
- open/save-typo fixed
- palette is now vertical
- new option: match current palette

download here

the new 'match current palette'-option replaces the actual color with the closest color from current palette, I hope this works like expected.

when importing a photo using standard-palette it creates stylish retro-art, cga-like! fou
Posté le 05/10/2017 à 18:40 Membre depuis le 23/10/2015, 50 messages
Hi Blastar

This is wicked! Thanks so much for making the change and enhancing the functionality! rotfl
My goal is to make a project that you would be proud of and actually get to see! top (I am in a good spot I do not think we are talking about a pipe dream here)

I got a slam dunk! As soon as I loaded the image with the disorganized palette entries the match feature lined the disorganized palette entries up.

tromb Fichier joint : aZpI

I noticed when I turned off "Match to Current Palette" several of my Palette entries disappeared....

tromb Fichier joint : VnEa

Now bottom line you went above and beyond and I couldn't be more happy but...If the functionality worked like...

1) "Match to Current Palette" (Neatly organizes entries to match the current palette that is loaded....more times than not this will be all you need)
2) If you toggle "Match to Current Palette" OFF the reorganized palette entries remain exactly where they are but the bad ass "drag and drop" feature is re-enabled to give you an additional layer of control.

With the technique described above you could combine the two features to get a specific result.

From an aesthetic point of view you could align the buttons if you felt so inclined.... just saying

1) Way one is no hassle.

tromb Fichier joint : VefD

2) Way two requires the font of the "Palette - sort by Drag & Drop" to be adjusted.

tromb Fichier joint : mDm4
Posté le 05/10/2017 à 20:19 Membre depuis le 07/07/2015, 122 messages
I noticed when I turned off "Match to Current Palette" several of my Palette entries disappeared....
that's correct, if you uncheck the 'match..'-option the palette will be recreated. when you modify the 'matched' palette you will also change the current palette... because of this I disabled the drag'n'drop-feature.

I think you need this for some kind of color-swaps!?
Posté le 05/10/2017 à 23:42Edité par Mega Shocked le 06/10/2017 à 23:06 Membre depuis le 23/10/2015, 50 messages
Hi Blastar,

Ideally both of these scenarios would produce the same result.

1) "Drag and Drop" gives the desired result. Please see annotation in the image.

tromb Fichier joint : OWyq

2) "Match to Current Colour Palette" does not give the desired result. Please see annotation in the image.

tromb Fichier joint : he0q

I am starting to see that you are creating a new palette. Although very cool I do not need to import images with an incorrect number of colours or generate palettes for images based on the NGFX palette.

I am looking for an alternative to "sort by drag and drop" to help automate the process of sorting an imported image's colour placements to match the NGFX palette.

I guess maybe a more proper title might be...
"Auto Sort Palette (Best Guess)".....I am very sorry Blastar I used a poor choice of words when describing the feature initially.

This feature would be a great start then the "sort by drag and drop" could be used for clean up / discrepancies.
If the program mismatched the palette orders I could then resort to "sorting by dragging and dropping" palette entries to correct the issue.

Typical Process Flow

1) Create an image 15 colours + knockout (external application)

2) Import the image into NGFX. Usually I organize the like colours to appear as a gradient with "sort by drag and drop" so it is easier for me in the future.
(The above colour order in the images has this gradient thing I speak of)

3) Test the rom. Oh snap! I made a mistake!!!! EX: Graphics alignment is off. Frame does not animate smoothly etc...

4) Edit the image (external application)

5) Re-import the image overtop of the old image that was previously imported.

(This would be the first image above because I am importing over the same gfx for the purpose of making a small variation) Now I need to use "sort by drag and drop" again to ensure my palette matches the palette I have loaded in NGFX because I previously grouped like colours together as gradients.

(Remember before today I was using the horizontal small entries to get the job done...I needed a technique to group the colours to keep things square in my mind...there is also another angle to this method described below)

6) Rinse and repeat over and over until the GFX are just right.

If you are following this post you may say to yourself...Man! This guy is just basically reloading the same image over and over again until he get's it right!
(You would be right that is gist of what I am describing above)

If you are following this post you may say to yourself...Man! This guy is creating work for himself! If he never bothered with using his "gradient" method he would be better off! He is upsetting the natural order of the colours in his image's palette! If he never reorganized his palette in the first place he could just re-import his image over and over again with no need to reorganize his palettes on every import!

(This is true! Why bother reordering the palette entries at all? The reason is the rom has gfx in very interesting places. Sometimes you can replace a large chunk of gfx and in that case you may have all 15 of your colours present. Sometimes you are isolating a small piece of a graphic and replacing that with a small image. In that case the image you import may only have 5 of the 15 colours loaded in NGFX leaving 10 blank spaces.

EX: If you organized all the yellows together you will be able to see the progression between your light to dark yellow's and will easily be able to align one of your 5 palette entries into the right slot opposed to having your yellows scattered throughout the 15 slots. It is much easier to misplace a colour if your colours are not organized...I have gone down this road many times)

Posté le 06/10/2017 à 22:38 Membre depuis le 07/07/2015, 122 messages
Please check again: download here

- Calculation of color-distance is now done via Euclidean distance, this should work better with sprites.
- I also changed the 'Match..'-option, I believe a Button works better than a Checkbox.
- Palette Drag'n'Drop is now always enabled.
- Only used colors from 'current palette' will by copied to import-window... BUT all colors (also empty entries) will be copied back! <- I'm not sure about this!
Posté le 07/10/2017 à 06:29 Membre depuis le 23/10/2015, 50 messages
Hi Blastar!

Thanks so much for listening to my ramblings and for taking the time to incorporate these new features!

My findings....

Scenario 1: All colours in the imported image match the NGFX palette

The image you import has the exact same 15 colour palette as your NGFX palette. "Match to current Palette" seems to work perfectly!
I have not tested extensively but as it stands I cannot see any degradation to the imported image!!!
Side Note: More often than not this will be the ideal way I work. "Match to current Palette" will definitely help stream line the process! THANK YOU! Blastar!

Scenario 2: All colours in the imported image match the NGFX palette

The image you import matches the colours in your NGFX palette but only contains a fraction of the 15 colors.
"Match to current Palette" identifies the exact matches and leaves the other entries as blank entries.
Very useful because the imported image will have the correct sort upon import.
Side Note: This is a very common occurrence that is forced on you from time to time. This is the jigsaw aspect of what we are up to.
"Match to current Palette" will definitely help stream line the process! THANKS AGAIN! Blastar!

Scenario 3: Some colours in the imported image match the NGFX palette

The image you import has some of the colours in your NGFX palette as well as a few others.
Side Note: This can happen...generally operating in the space of Scenario 1 and 2 is ideal but accidental colours sneak in from time to time. Random GFX edits, colour tweaks etc..
These colours are not noticeable to the naked eye but are indeed different than the NGFX palette.

I purposely adjusted one colour in an image not to match the NGFX palette to replicate this scenario. I then imported the image.
"Match to current Palette" identifies the exact matches and leaves the other entry that did not match as blank. Good so far...
Upon importing the image the new palette with the blank entry was imported into NGFX. Good so far...
I figured all I need to do is load the previous palette and the blank palette entry will be corrected. I did load the previous palette and the proper colour was loaded into the blank spot. Good so far...
Upon reviewing the graphic, the colour that was loaded in from the new palette was not inserted into the graphic! This is is where things fall apart.

If the blank palette entry still represented the colour that did not match it would just be a simple palette load to remedy the problem.
Better yet instead of putting blank entries when a palette entry does not match it would be ideal if the entries that don't match still remain in the import window's colour list.
At this stage "sort palette by drag and drop" could be used to better organize the palette entries that are not recognized as matching.

I realize you have purposely made it very obvious to users what colours match and the blanks represent how many colour's don't.
In my case I always need all colours that I am importing so blanking out colours and assigning new designations does not help me.
This is why I was always big on the "sort by drag and drop" being enabled because of situations like these.
*Ideally if 1 or more colours do not match the user still has access to the non-matching colours and can manually correct the sort order before the import is processed.

If you were to tackle this issue a suggestion would be to give the unmatched colours a light red outline to help the user implicate the discrepancies.
Alternatively, if the outline does not exist the user will still be able to compare the NGFX palette against the import palette visually so the identifier is not the biggest deal.

**Edit - Here is an example of a highlight of some obvious unmatched colours...Typically the unmatched colours wouldn't be as obvious because they would generally be slightly different shades of the existing NGFX palette but this is just a quick visualization to demonstrate what an outline might look like...1 pixel black, 1 pixel red, 1 pixel black - If done in this way black and reds would still read clearly as unmatched.

tromb Fichier joint : gec7

Scenario 3 is fixable....but it would be really slick if the process described below could be avoided with process described above.

1) Cancel an import as soon as you notice there are blank palette entries generated by "Match to current Palette"
2) Re-import the same image but use the manual method "sort palette by drag and drop"
3) Upon import save the newly imported palette and use it moving forward.


There you have it! Blastar has done some really cool feature enhancements and you have all 3 described scenarios covered. Is there more to this story? Only time will tell. Many thanks Blastar for the Awesome NGFX Tool set!
You are making dreams come true! classe
Posté le 22/10/2017 à 15:36 Membre depuis le 02/01/2003, 1647 messages
good job