The VG Resource |Sprites |Models |Textures |Sounds |Login |
|Muscle Tower |DidYouKnowGaming? |VGFacts |
The VG Resource
    Chat
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register
The VG Resource › Other Stuff › Questions, Info, and Tutorials v
« Previous 1 2 3 4 5 6 ... 27 Next »

Palette changer tools?




User(s) browsing this thread: 1 Guest(s)
Pages (3): 1 2 3 Next »
Post Reply 
 
Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Palette changer tools?
Davy Jones Offline
Spaghetti Ripper
***

Posts: 3,194
Joined: May 2008
Reputation: 36
Post: #1
Palette changer tools?
Is there a tool which analyzes identical sprites (but with different colours) and swaps the palettes?

For example the alternate palettes for Blanka from Super Street Fighter 2:
http://www.spriters-resource.com/snes/su...sheet/5550

Not sure if something like that even exists, but asking shouldn't hurt.

[Image: dariC.png][Image: i1TMg9L8fwpQp.gif][Image: b0KxM.gif]
07-24-2012 03:25 PM
Find all posts by this user Thank this post Quote this message in a reply
[-]
Login or Register to remove these ads!
Goemar Offline
The Slug-Copter Sucks
***

Posts: 1,849
Joined: Jul 2008
Reputation: 31
Post: #2
RE: Palette changer tools?
Photoshop can do this pretty easily. I'm guessing there's a few free graphic programs which can a well. But you still have to do it manually (click the colour you want, click the colour you want to replace (it will replace ALL of that colour in every sprite) and so on until you've done them all).

If something which can just do a "compare and replace" function exists I'd be interested in it, as it would be handy and save a bit of time.

This isn't a "whenever you feel like offer" but if there's a palette swap you want pretty desperately I'll be happy to do it if you don't have Photoshop or something (and if no one knows of any piece of software which can do this).

[Image: randomimage.cgi]
07-24-2012 03:39 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-]
Davy Jones Offline
Spaghetti Ripper
***

Posts: 3,194
Joined: May 2008
Reputation: 36
Post: #3
RE: Palette changer tools?
No problem, I can do this by myself. Still, it's pretty time-consuming, annoying and can produce mistakes.

It would be cool if there's a tool just for easy palette swaps.

[Image: dariC.png][Image: i1TMg9L8fwpQp.gif][Image: b0KxM.gif]
07-24-2012 04:14 PM
Find all posts by this user Thank this post Quote this message in a reply
[-] Thanked by1 user thanked this post
redblueyellow (07-24-2012)
puggsoy Offline
Tastes like chicken
***

Posts: 2,220
Joined: Dec 2011
Reputation: 31
Resource - Sounds Resource - Sprites Resource - Textures Steam YouTube
Post: #4
RE: Palette changer tools?
I was wondering if there was a way to do this too, I think I remember Googling a bit but not coming up with anything. However I haven't needed to do it much so for now I'm content with swapping them manually with GIMP.

However, now that I think about it, a tool for this is probably doable in AS3. If nobody knows of a program that can do this already I'd probably look into making one.

[Image: dailydilbert.axd]
Stuff you can click on (Click to View)
Get in chat! It gives me a reason to go too!

-What I support-
[Image: qjGOacY.png]

-What I do-
Bottomless Top Hat of Rips ~ Sound Booth ~ Texture Park ~ My Bunch of Apps

Ref
|------------------------------------------ Love ------------------------------------------|
Lexou Duck, Shade, Previous, recolorme, MoneyMan, Trollerskates, Vic, alexmach
(This post was last modified: 07-24-2012 04:20 PM by puggsoy.)
07-24-2012 04:20 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-]
Previous Away
Posting Freak
***

Posts: 3,645
Joined: May 2008
Reputation: 81
Resource - Models Resource - Sounds Resource - Sprites Resource - Textures
Post: #5
RE: Palette changer tools?
If you give me like a few days, I might be able to make you such a thing.
I suppose it'd require two identical frames with different palettes to define what shall be changed. Like you define X1, X2, Y1, Y2, Width and Height for positions of two such frames on the sheet, one with palette A, the other with B, and then it'd replace all colors found in frame Awith those from frame B at the same relative pixel position for the whole sheet.
Shouldn't be too hard.

Avatar courtesy of Axle the Red
07-24-2012 05:12 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-] Thanked by3 users thanked this post
Axle the Red (07-24-2012), Davy Jones (07-24-2012), Kami (07-24-2012)
Davy Jones Offline
Spaghetti Ripper
***

Posts: 3,194
Joined: May 2008
Reputation: 36
Post: #6
RE: Palette changer tools?
That would be extremely awesome =D

[Image: dariC.png][Image: i1TMg9L8fwpQp.gif][Image: b0KxM.gif]
07-24-2012 06:07 PM
Find all posts by this user Thank this post Quote this message in a reply
[-]
puggsoy Offline
Tastes like chicken
***

Posts: 2,220
Joined: Dec 2011
Reputation: 31
Resource - Sounds Resource - Sprites Resource - Textures Steam YouTube
Post: #7
RE: Palette changer tools?
I don't want to kind of push Previous out of the way or anything, but I have had a go at this using ActionScript 3.0 in an Adobe AIR application and it's working OK. What I've done is grabbed 3 sprites, A, B and C from the sprite sheet. A and B are identical, but with different palettes, and C is a whole different frame with the same palette as A. What I can do is change C's palette to that of B by comparing the colours of A and B.

Here's the result, I was using the Blanka sheet (Click to View)
[Image: ixYH1Oy1ZtJna.png]

The problem is that this took about 8 seconds, which seems a bit long. If I were to do the entire sprite sheet it'd take ages. I think the problem is that I have to go through every single pixel in the sheet and replace it (unless it's the background colour, which is defined in the program). Unfortunately I don't know of any other way to do it, though.

But then again I don't know if AS3 is fit for stuff like this. Maybe whichever language Previous is using has a more efficient method.

EDIT: Discovered a CPU-wasting flaw in my code and found a workaround. The time it takes to change the palette of C is now just 1 second. Not instantaneous just yet, but it's much faster than before.

[Image: dailydilbert.axd]
Stuff you can click on (Click to View)
Get in chat! It gives me a reason to go too!

-What I support-
[Image: qjGOacY.png]

-What I do-
Bottomless Top Hat of Rips ~ Sound Booth ~ Texture Park ~ My Bunch of Apps

Ref
|------------------------------------------ Love ------------------------------------------|
Lexou Duck, Shade, Previous, recolorme, MoneyMan, Trollerskates, Vic, alexmach
(This post was last modified: 07-24-2012 10:19 PM by puggsoy.)
07-24-2012 09:32 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-] Thanked by1 user thanked this post
Previous (07-25-2012)
Goemar Offline
The Slug-Copter Sucks
***

Posts: 1,849
Joined: Jul 2008
Reputation: 31
Post: #8
RE: Palette changer tools?
Seems cool. Though I was really hoping that "C" would be the "the whole sheet" and not just a single sprite. Unless this is just proof of concept?

[Image: randomimage.cgi]
07-25-2012 02:06 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-]
puggsoy Offline
Tastes like chicken
***

Posts: 2,220
Joined: Dec 2011
Reputation: 31
Resource - Sounds Resource - Sprites Resource - Textures Steam YouTube
Post: #9
RE: Palette changer tools?
Well, I already stated that A, B, and C were 3 sprites from the sprite sheet.

(07-24-2012 09:32 PM)puggsoy Wrote:  What I've done is grabbed 3 sprites, A, B and C from the sprite sheet. A and B are identical, but with different palettes, and C is a whole different frame with the same palette as A.

And yes, this is just testing the concept. I tried doing the entire sprite sheet, but even after finding the flaw and bringing the conversion of C down to 1 second, it was taking way too long. However, I got an idea today that could possibly make the conversion of C near-instantaneous, so I'll see how that goes. Although, either way any released version would probably need some sort of progress bar.

EDIT: Ooh yeah, it worked. Changing C's palette is now (practically) instantaneous, and I can convert the entire sheet in 1 second.

Result (Click to View)
You can't see the entire sheet since it doesn't fit in the window but it did convert everything, not only what's visible.
[Image: iTJKEaXi5uLQ6.png]

I had a bit of trouble getting it to work though. The thing is that my new method had a different way of comparing palettes. Because of this, if C contained a colour that A didn't, the colour to convert to would simply be black. I discovered this because C happened to have some bits of almost-pure white (a hex value of f8f8f8) on his back and hair, which A didn't contain, resulting in this:

Stuffed up result (Click to View)
[Image: iDmLnc4l0FYTb.png]

I fixed this by simply skipping colours that weren't present in A, so the white in C stayed. In this sheet that's fine, although in other cases it might not, so the palettes used for comparing should have every colour in the sheet.

[Image: dailydilbert.axd]
Stuff you can click on (Click to View)
Get in chat! It gives me a reason to go too!

-What I support-
[Image: qjGOacY.png]

-What I do-
Bottomless Top Hat of Rips ~ Sound Booth ~ Texture Park ~ My Bunch of Apps

Ref
|------------------------------------------ Love ------------------------------------------|
Lexou Duck, Shade, Previous, recolorme, MoneyMan, Trollerskates, Vic, alexmach
(This post was last modified: 07-25-2012 03:24 PM by puggsoy.)
07-25-2012 02:36 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-] Thanked by1 user thanked this post
Previous (07-25-2012)
Previous Away
Posting Freak
***

Posts: 3,645
Joined: May 2008
Reputation: 81
Resource - Models Resource - Sounds Resource - Sprites Resource - Textures
Post: #10
RE: Palette changer tools?
CLASH OF THE TITANS!!

Spoiler (Click to View)
[Image: MIVcY.png]

[Image: jjTE7.png]

[Image: ULjB8.png]
Recolour on my Dropbox.
You can open a file with the folder button or by dropping it onto the large field. You can also just drop it onto the .EXE.
Recolour using the rainbow button, save the result with the diskette.
Also Ctrl+O, Ctrl+S and Ctrl+R (recolour).

Click the image to place the source frame. Shift+click for the destination frame. You can also set the positions using the spin edits at the top where you can also set the size (equal for both, obviously).
(The destination frame has a thicker border in the view.)

My approach was to go through every pixel of the source frame and the destination frame at once, adding each pair to a palette table (which obviously would store every source colour only once). Afterwards, I loop through the whole sheet image pixel by pixel, searching it in the palette and repacing it if the colour was found.

Avatar courtesy of Axle the Red
07-25-2012 07:54 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-] Thanked by5 users thanked this post
Axle the Red (07-25-2012), redblueyellow (07-25-2012), puggsoy (07-25-2012), Goemar (07-28-2012), Candel (08-01-2012)
puggsoy Offline
Tastes like chicken
***

Posts: 2,220
Joined: Dec 2011
Reputation: 31
Resource - Sounds Resource - Sprites Resource - Textures Steam YouTube
Post: #11
RE: Palette changer tools?
That's basically what I did too. You just came up with a GUI before me. *sniff*

Nah, it's cool, probably better than my program anyway. It was educational just trying to make it, though, I learnt a few stuff that I never knew before.

By the way, out of curiosity, what language are you using?

[Image: dailydilbert.axd]
Stuff you can click on (Click to View)
Get in chat! It gives me a reason to go too!

-What I support-
[Image: qjGOacY.png]

-What I do-
Bottomless Top Hat of Rips ~ Sound Booth ~ Texture Park ~ My Bunch of Apps

Ref
|------------------------------------------ Love ------------------------------------------|
Lexou Duck, Shade, Previous, recolorme, MoneyMan, Trollerskates, Vic, alexmach
(This post was last modified: 07-25-2012 09:21 PM by puggsoy.)
07-25-2012 09:20 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-]
Previous Away
Posting Freak
***

Posts: 3,645
Joined: May 2008
Reputation: 81
Resource - Models Resource - Sounds Resource - Sprites Resource - Textures
Post: #12
RE: Palette changer tools?
I came up with the whole algorithm before you Tongue
Of course I have a fine GUI what would you expect from me??

I used Delphi Pascal with the Delphi 6 IDE. I wouldn't recommend it to anyone today but I happen to know that one the best.

Also, you go on and finish your program alright? You wouldnÄt want to know what I'd do with you if you didn't.

Avatar courtesy of Axle the Red
07-25-2012 09:44 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-] Thanked by1 user thanked this post
puggsoy (07-25-2012)
puggsoy Offline
Tastes like chicken
***

Posts: 2,220
Joined: Dec 2011
Reputation: 31
Resource - Sounds Resource - Sprites Resource - Textures Steam YouTube
Post: #13
RE: Palette changer tools?
Yeah, I did base my algorithm off what you said, sorry. I probably would have used that anyway though, it's the most logical way Tongue

I'll finish my program, I just dunno what I'll do with it, yours is faster anyway. I might try and fit in some extra features though Wink

[Image: dailydilbert.axd]
Stuff you can click on (Click to View)
Get in chat! It gives me a reason to go too!

-What I support-
[Image: qjGOacY.png]

-What I do-
Bottomless Top Hat of Rips ~ Sound Booth ~ Texture Park ~ My Bunch of Apps

Ref
|------------------------------------------ Love ------------------------------------------|
Lexou Duck, Shade, Previous, recolorme, MoneyMan, Trollerskates, Vic, alexmach
07-25-2012 09:50 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-]
Previous Away
Posting Freak
***

Posts: 3,645
Joined: May 2008
Reputation: 81
Resource - Models Resource - Sounds Resource - Sprites Resource - Textures
Post: #14
RE: Palette changer tools?
(07-25-2012 09:50 PM)puggsoy Wrote:  I just dunno what I'll do with it
You're not supposed to ask this question. Just do it and deal with the formalities later. That just isn't the point.

Avatar courtesy of Axle the Red
07-25-2012 09:56 PM
Visit this user's website Find all posts by this user Thank this post Quote this message in a reply
[-]
Davy Jones Offline
Spaghetti Ripper
***

Posts: 3,194
Joined: May 2008
Reputation: 36
Post: #15
RE: Palette changer tools?
What would be cool:
- Recognition of the GIF format
- Loupe Symbol for zooming into the sheet
- Button for Readme and some easy-to-understand explanations

Also, what are these two red dots doing? Can I choose the sprite with them?

[Image: dariC.png][Image: i1TMg9L8fwpQp.gif][Image: b0KxM.gif]
(This post was last modified: 07-28-2012 01:39 PM by Davy Jones.)
07-28-2012 01:39 PM
Find all posts by this user Thank this post Quote this message in a reply
[-]
« Next Oldest | Next Newest »
Pages (3): 1 2 3 Next »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:


 Quick Theme:


  • Contact Us
  • The Spriters Resource
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 06-20-2013, 05:54 AM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S.