Posts: 3,964
Threads: 107
Joined: May 2008
09-09-2012, 12:53 PM
(This post was last modified: 09-09-2012, 12:59 PM by Davy Jones.)
Just tried to recolour a few sprites, but then I got this:
Edit: It seems like they have to be exactly in the same spot within the boxes. I actually managed it to recolour one single sprite, but the rest of the animation has still the old palette.
Posts: 3,787
Threads: 75
Joined: May 2008
Yep, since it compares the relative pixel positions, the frames should be at the same position inside the box. It's best to align the top and left with the sprite's pixels (you can use the zoom for better precision).
The one single correct sprite there results from the oridinal source frame (pink) being copied ovet to the destination frame's position (blue) after recolouring.
While it would be possible to add frame recognition, it's require a lot of work and would probably be rather slow (due to checking many pixels) aaand I don't really have the time at the moment :<
Posts: 3,964
Threads: 107
Joined: May 2008
Ok, but I've tried to recolour a whole sheet and the only thing it does is switching the colours between these two sprites. The other sprites on the sheet remain unaffected. Did I overlook something or is it supposed to be like this?
Posts: 3,787
Threads: 75
Joined: May 2008
The pink one is the original colour you want to get rid of, blue is the new colour. Then it should replace all colours found in the pink one with those of the blue frame on the whole sheet. Colours not found in the source frame will remain unchanged.
Posts: 8,812
Threads: 131
Joined: May 2008
Just wondering, can you not just open the sheet in mspaint and then use the reverse eraser trick with an extremely large brush size...? That always works for me.
Palettifier 1.2
After failing horribly at my own attempt, it appears AS3 has a function that can automatically shrink the rectangle to fit around the sprite, and extremely quickly and efficiently too. This should make it much easier to select the frames.
By the way, it recognizes the background colour (i.e. the colour to ignore) by getting the dominant colour of the sheet. This should work with most sheets, but if it's a problem please say so.
Other than that I've added a few other things. You can now drag rectangles in any direction, previously you could only drag it from the top-left (this was surprisingly difficult to get working), added border colours like Recolour, plus a few minor changes.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Posts: 3,787
Threads: 75
Joined: May 2008
(09-15-2012, 02:32 PM)puggsoy Wrote: After failing horribly at my own attempt, it appears AS3 has a function that can automatically shrink the rectangle to fit around the sprite, and extremely quickly and efficiently too.
. . .
Cheater
Version 1.3.1 of Recolour has an auto-fit option which will reduce the size of the source selection and position the destination selection. For source, you should draw the rectangle around it, afterwards, just clicking on the destination frame (with Shift held down) should suffice to place the rectangle properly around it.
I may work on a simple just-click-anywhere-on-the-frame another day.
(09-15-2012, 04:21 PM)Previous Wrote: afterwards, just clicking on the destination frame (with Shift held down) should suffice to place the rectangle properly around it.
rageface.jpg
Although I wonder why you made auto-resizing an option. I mean it's not bad or anything but when would somebody not want it?
also it isn't cheating it's called using a good language
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Posts: 3,787
Threads: 75
Joined: May 2008
(09-15-2012, 04:55 PM)puggsoy Wrote: Although I wonder why you made auto-resizing an option. I mean it's not bad or anything but when would somebody not want it?
also it isn't cheating it's called using a good language Because I have something else on mind I will do later (this here was just a quick thingus) but currently, DIG demands some care and attention.
Don't get me started on "good" languages. Don't. Either way, you're the one missing out on fun
Posts: 3,787
Threads: 75
Joined: May 2008
I'm sorry puggsoy but
Simply click anywhere on a frame to select it. Whether source or destination frame will be set depends on the option in the top-left corner. "From" is the source frame, "To" the destination. "From Bg" and "To Bg" are there to set the frame background colour (I don't know how well the auto-detection for it works). The chain icon defines whether source and destination use the same background colour. The background colour is important for the frame detection as it stops looking when finding it.
Buttons [1] to [4] are shortcuts for this option. [R] is a shortcut for recolouring, [Ctrl+O] for opening, [Ctrl+S] to save, [+] and [-] will zoom.
Download from the usual place.
uyiagddjs
fbhjjdafkjadh
Jeez now my program's totally obsolete. I don't even know if I would be able to do that, checking for the borders from within the sprite is a totally different deal. I might give it a go (along with the choosable backgrounds) although if I ever manage it you'll probably override it with something even cooler.
At least you finally had the sense to add some shortcuts though
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Posts: 3,787
Threads: 75
Joined: May 2008
I've... been having shortcuts since forever?
This is how I do it:
Start with minimal X and maximalX equal to clicked X, minimal Y and maximal Y equal to clicked Y.
Until a turn passes without any size change,
- assume no changes will occur
- Iterare over the current width (minimal X to maximal X),
-- check each column up and down if the next pixel is of the background colour - if not, adjust minimal and maximal Y values (take a note that a change occured)
- Iterare over the current height (minimal Y to maximal Y),
-- check each row left and right if the next pixel is of the background colour - if not, adjust minimal and maximal X values (take a note that a change occured)
Hope this helps?
Yeah I figured that's how it'd go, I'm just not sure how quick it is in AS3. Either way it's more complicated than last time I will give it a go though, maybe I think up something even better along the way.
(09-16-2012, 08:58 AM)Previous Wrote: I've... been having shortcuts since forever?
Ah OK, nah just because you mentioned them just now I thought you didn't have them yet.
You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down, but the staying down. -Mary Pickford
Posts: 3,787
Threads: 75
Joined: May 2008
Since I mentioned the (new (since that part didn't exist before)) [1] to [4] shortcuts, I thought I'd list the other ones, too, just to make sure they're known. >:I
Posts: 3,964
Threads: 107
Joined: May 2008
Oh my god I just tried it on some Terranigma NPCs, it works so well and is so easy to use, it's just awesome =D
Many many thanks =)
|