New Problem

Started by Aarikku, January 31, 2009, 08:56:41 PM

Previous topic - Next topic

Aarikku

I started over, using the kfm template. This time, I don't have any errors during the testing, but everything's glitchy beyond imagination. There's a pink box around all of my character's sprites, though none of them appear in Fighter Factory and the character blinks invisible constantly during the walking animation, though the walking animation is two sprites that appear fine in Fighter Factory, and the character is entirely invisible while standing, though again, it appears fine in Fighter Factory.

Could someone offer some advice? I'd appreciate it.

Byakko

#1
First things first, you may as well ignore Fighter Factory when you have a problem. It's just better to understand what's going on and then fix it yourself.

Speed palette course.
When Mugen looks at the sprites and the palette, it considers that the color #0 (in Paint Shop's .pal palette format) or #255 (in PhotoShop's .act palette format) (not sure about Fighter Factory) is transparent - it doesn't display anything associated with that color slot.
For the "pink box", it's an area that is associated with a color slot that isn't the correct one. Usually people use that pink, but it's not necessary, you can make it bright green or anything that you can easily recognize as long as you put that color in the right slot.
For the animation that blinks, a first guess would be that these sprites don't have the right palette. They have the right colors, so you don't see it, but if you try to look at their palette, these colors are not in the right color slots. So when Mugen tries to forcibly apply the regular palette on these sprites, it will go wrong.
With palettes, each pixel is associated with one of the available 256 color slots, on your current sprite the palette has these slots correctly filled, but when Mugen applies the "real" palette from the first sprite, these same slots become empty in the actual palette, so the pixels associated with these now-empty color slots will show up incorrectly.
The solution for that would be to take the sprite out, take the first sprite of the SFF, extract its palette (many image editing programs can do that), apply that palette on the faulty sprite (with the method "nearest color matching" or anything similarly named if you are offered the choice, you'll see it works if the color don't get fucked up on your sprite) and then reinsert the new corrected sprite into the SFF.
This solution should normally fix both of your problems at once, do that on all the sprites that have either of your problems.

I don't know how exactly Fighter Factory works, but I guess it shows up correctly in Fight Factory because it doesn't force the palette even when it's shared, it displays the palette of the sprite ? In that case you wouldn't see it because it's fine in the palette of the sprite, but it still would happen ingame when Mugen does apply the palette on the sprite.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Aarikku

All right! That was informative. What I don't understand is why some sprites act differently than others if I imported them the same way. Since the transparency seems to be my main problem, would you recommend I make a new palette?

Byakko

I edited my previous post with what should be the most straightforward solution.
You may have imported the sprites the same way, but they might not have been made the same way. If the sprites you imported didn't have the right palette right from the beginning, then it'll still show in Mugen. Simply, when you're getting all your sprites, they must have all the same palette right from the beginning before insertion in the SFF (this is for the character and any effect that you want to affect with the palette, it isn't necessary with stuff like dust effects and whatever, they can have their own palette - but this is getting a little further than you need to know right now so you don't have to mind that right now)
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Aarikku

Okay, so I take a healthy sprite and a dead sprite, open the healthy sprite's palette (though it's the same as the dead one) and apply that to the dead one?

All the sprites were made the same way - I made them.

Byakko

Should be. If it doesn't work... Post the sprites (normal and broken) so we can see what's wrong with it ?
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Aarikku

Can do.

A good sprite in Fighter Factory. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/healthysprite.png

A bad sprite in Fighter Factory. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/badsprite.png

This only happened to one sprite. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/ohgodwhatdidido.png

A sprite that looked good in Fighter Factory, but fails in testing. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/thebox.png

The standing sprite in Fighter Factory, which doesn't appear in testing. http://i277.photobucket.com/albums/kk73/TheFrogSage/Other/standingFF.png

First three are full-screen.

Byakko

I meant posting the sprites themselves - as the original pcx files. But right like that, I can see that you have two "pink" color slots in your palette. The ones that appear with the box around probably have their pink color associated with the wrong one.
Try replacing the pink in the middle by, say, black or green or whatever. Do that in the palette itself, then make sure the palette is applied to all the sprites. Then, see all the sprites that were affected : they are associated with the wrong slot. These pixels have to be associated with the pink in the lower right corner.

I don't use Fighter Factory, usually it seems like it's dealing with the palettes in an odd way. For example, do you actually use that many shades of red and black ?
Also, it might help too to post the very first sprite in the sff - instead of sprites 51, 55 etc. If all the sprites have a "shared" palette, they're all referring to the palette of that first sprite.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Aarikku

They should've been the same pink, considering I used the same pink for all the backgrounds. Okay... sprites.

http://www.4shared.com/file/83458816/db59a318/pcxes.html

There's only about 64 now - I wanted to make sure this was gonna work before I started making every last one of 'em.

Cyanide

FF does things like that if you screw your sprites up in the first place. See it has some pallete functions, and you can make your original pallete with it, but it does so very very imperfectly and can cause some major headaches if you rely on it.

Far better to do the pallete in photoshop or whatever. Apply it to all your sprites there (so you know you've done so) then load them into FF under the correct format. FF does have a batch convertor for pcx files as well. For that matter it has batch apply pallete too, but many people don't twig to that.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Aarikku

How do I make a palette in Photoshop? ...That sounds like something in one of the FAQ's; I'll go read those.

Byakko

#11
QuoteThey should've been the same pink, considering I used the same pink for all the backgrounds.
The thing is, currently you have sprites that are displayed with a pink background. That can only be because that background isn't associated with the correct color slot (the last one), because that slot will be considered as transparent by Mugen no matter what.
Now, seeing that you have a second "pink" in your palette, it can only mean that those that display the box have that area associated with that other pink. It's a simple deduction - it's the only way you can have what you have, so that has to be the reason.
From there, you can only conclude that Fight Factory messed up something. All you have to do is remove that other pink, and then check the sprites that had it wrong to make sure they use the right pink again.

Personnally, I would suggest Paint Shop Pro over PhotoShop ; if you save the palette in .pal format, you can just open it with a text editor and reorganize the colors from there. A simple look lets you understand how it works - otherwise, feel free to ask. Once that's done and you have a clean palette, you have Mugen tools available to turn a .pal to a .act useable with Mugen - called pal2act. It can be used in conjunction with one of the other Mugen tools - pcxclean, it allows you to forcibly apply a palette to all your sprites at once, once you have a clean palette it automatically applies the palette and associate all your colors with the correct color slot in the palette. Here too, feel free to ask how to use it when you get there.
I believe those tools are available at RandomSelect.
So in order, the steps would be to
-get a clean palette with an external tool (I personnally suggest Paint Shop Pro in conjunction with a text editor if you have it), with only the right colors once and the background color (pink) in the correct slot, only once as well
-get the tools, pal2act (only needed if you used Paint Shop Pro, PhotoShop already gives a .act file) and pcxclean
-ask how to use them.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Aarikku

Actually, I may be able to explain that second pink. You see, when I used Fighter Factory's palette maker, it made a base palette out of every colour available in one of my sample sprites. It didn't take up the whole box, so instead of replacing the Background Box, I just copied the pink colour and put it into that box, leaving the original. ...Actually, could that be the source of my problems?

Byakko

Yeah, most likely, since the sprites where the area was associated with the wrong pink were left as such since it was still there :P
Well, that's for the pink. I still suggest one clean palette (it seems like the FF palette has too many doubled colors, or do you have that many shades ?) and apply that palette to all sprites once and for all (with pcxclean if you can) so you'll be absolutely sure nothing's wrong.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.

Aarikku

No... that can't be. I imported all the sprites at the same time. If one exploded, they should all explode.

Cyanide

No, not if they all have a slightly different pallete at the time of entry. Also, they may be shared or linked to a really broken sprite. Hence why each sprite should share the exact same pallete setup.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Aarikku

#16
I don't really understand much of what you two have been advising me, but it seems like the problem's in the palette and thus I will try redoing that part and get back to you.

EDIT: I have done so, and the broken sprites seem to possess their own palette. Changing it turns them into the horrifically disfigured sprites (a la picture #3).  --;

Cyanide

Hence you need to follow what was written above. You create 1 pallete that works correctly. You save it. You apply it to all your sprites. All character sprites should share the same pallete.


In M.U.G.E.N there is no magic button

They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.

Aarikku

I did try.

Whoa, Byakko edited. Okay, I'll try opening the .act files in Notepad, and try and find pcxclean.

Byakko

#19
QuoteWhoa, Byakko edited.
Yeah, sorry, I do that a lot when I think of more stuff to say :P
Not the act file with notepad, I don't think it works, only PSP's .pal files. Well, if you have a totally clean .act file, it's already good, the "opening with text editor" is only to edit the palette until you have a clean one, it's just that it's a little easier to edit it. If you already have it totally clean, it's good. PCXClean is the important part, it helps you load the unique palette onto all your sprites so you're absolutely sure they're all the same. That's the part you're missing.

What PCXClean does, more specifically, is :
-take every single pixel one by one
-if it is of a color that is present in your palette, associate the pixel with that color clot in the palette (it must be the exact same color in RGB value)
-if it's a color that isn't in your palette (e.g. green, or even a slightly different shade of red that shouldn't be here) then it associates it with your background color - making that pixel transparent in Mugen.
So when you load the sprite in Mugen, you'll immediately see the result : if all sprites work, it's fine, and if a sprite shows up with holes in it, it means that sprite had the wrong colors.
The method also makes sure that you only have one "red" and so if your palette is totally clean. Before, if you had a sprite with a pink that wasn't the right one, you wouldn't notice it and it would still be associated with the wrong pink. With this replacement, it will force that pink to be associated with your unique pink in the clean palette.

Again, when I say a clean palette, it's each color only once, and only the color that you actually have on your sprites. No green slot, no unneeded color, and only one pink slot. That's the important part.
If I struggled to the end of my determination, to the end of my way of life with my followers, if the result is ruin, then this ruin is inevitable. Grieve. Shed tears. But you cannot regret.