My Character sprites have a nasty white outline

Started by Matt_J95, Sun 07/02/2021 09:59:12

Previous topic - Next topic

Matt_J95

Hello,

I created character sprites in gimp, and when I import them into AGS, I select the correct colour for the alpha channel. It blends in not too badly, but there's a fair amount of white outline around the sprites. Any idea how I can clear this up?

Many thanks

Matthew

Crimson Wizard

#1
Quote from: Matt_J95 on Sun 07/02/2021 09:59:12
I created character sprites in gimp, and when I import them into AGS, I select the correct colour for the alpha channel. It blends in not too badly, but there's a fair amount of white outline around the sprites. Any idea how I can clear this up?

What kind of image do you use?

Normally for sprites with alpha channels you do not select any colour, but tell it to "import alpha channel" (topmost checkbox) and choose "leave as is" for transparency.
The transparent colour selection is for sprites without alpha channel which use some precise colour (like magenta, etc) to define transparent areas.

Matt_J95

#2
I have tried both BMP and PNG, same result. If I check 'leave as is' the image retains it's huge white square background in-game. I have to select the colour from top left pixel, then it works, albeit with a white outline around the edges.  I think the problem may be with using such small sprites, my game resolution is 320x200, and my character sprites are 30x60. When I scale it down in GIMP, it seems to leave alot of faded pixels around the edges, there's not much definition. Is it possible AGS is having a hard time finding the edges?  :-X  <<<<< How ironic, what is happening to this cup is what it happening to the spirets, lol!!

Crimson Wizard

#3
AGS does not look for the edges at all, it looks for pixels with the certain colour, and that colour must be precise. The resolution does not matter.

What matters is whether in the original image you define transparency with alpha channel or special colour. And in the latter case, is this colour precise everywhere, or there are several similar colours because of the way GIMP resized it with anti-aliasing, or because you drew it with anti-aliased brush, and so on.

I think the rule of thumb there is: if you draw with anti-aliasing (smooth edges) then you use alpha channel for transparency. If you want to have 1 exact colour for transparency then you should not use anti-aliasing, at least not automatic one, because that will create sort of "transition" between your sprite and background colour. Maybe this is what happening, but I cannot tell for certain because I don't see your sprite.

Matt_J95

Problem solved! You were right - it was GIMP's antialiasing. Ironically, not on the brush, this is what had confused me as I deliberately turned that off. It was the MAGIC WAND tool that had aliasing enabled. For the existing sprites, I had to edit them close up and get rid of all the aliased pixels around the edges. now it looks perfect.  :grin:

Thanks again !

SMF spam blocked by CleanTalk