Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Anteater on Thu 23/04/2009 15:29:47

Title: Problem with importing sprites with alpha channel
Post by: Anteater on Thu 23/04/2009 15:29:47
While using the latest version of AGS, importing .pngs with alpha channels doesn't give the option to import the sprite with an alpha channel. The closest I can get is using the top/bottom/left/right pixel for the transparent color, which results in an ugly halo around the sprite. What am I doing wrong?
Title: Re: Problem with importing sprites with alpha channel
Post by: GarageGothic on Thu 23/04/2009 17:13:54
Are you importing multiple .PNG's at once or just a single one? At least when importing them individually, I get a message box saying:

QuoteThis image appears to have an alpha channel. Do you want to use it?

When importing multiple sprites (using "Quick import"), I believe the transparency setting will be identical to that of the last individual sprite you imported.
Title: Re: Problem with importing sprites with alpha channel
Post by: Anteater on Thu 23/04/2009 18:14:43
I'm importing them one at a time.
Title: Re: Problem with importing sprites with alpha channel
Post by: Pumaman on Thu 23/04/2009 19:54:26
Are you sure the images actually have alpha channels? What graphics program are you using to create them?
Title: Re: Problem with importing sprites with alpha channel
Post by: Anteater on Thu 23/04/2009 21:18:41
Gimp. I'm pretty darn sure that the images have alpha channels.
Title: Re: Problem with importing sprites with alpha channel
Post by: monkey0506 on Thu 23/04/2009 23:02:03
It sounds like somewhere between editing the file and saving it your PNGs are getting flattened...you may need to check your source files. I can personally guarantee that alpha-channel PNGs import properly in the latest version of AGS. Provided they have an alpha channel of course. ;)
Title: Re: Problem with importing sprites with alpha channel
Post by: Anteater on Fri 24/04/2009 02:32:37
Okay I'll check that.
Title: Re: Problem with importing sprites with alpha channel
Post by: RetroJay on Mon 27/04/2009 07:13:03
Hi Anteater.

This may seem like a silly question but is your games color depth 32bit (true colour)?
Cos if its not then it needs to be to allow alpha channels.

I know this cos I had exactly the same prob. Mind you I still can't get alpha channels to work but this is cos
I am doing them all wrong with my paint program. ::)

Title: Re: Problem with importing sprites with alpha channel
Post by: Anteater on Mon 27/04/2009 20:22:52
Yeah I'm sure of that. I think I'm doing something very wrong with my image editor.
Title: Re: Problem with importing sprites with alpha channel
Post by: Gilbert on Tue 28/04/2009 01:48:47
Can you upload a small PNG file that exhibits this problem for us to investigate?
Title: Re: Problem with importing sprites with alpha channel
Post by: Anteater on Tue 28/04/2009 04:27:49
(http://img410.imageshack.us/img410/1474/testpng.png)
Here's a simple test pattern I was using.
Title: Re: Problem with importing sprites with alpha channel
Post by: Gilbert on Tue 28/04/2009 04:32:29
It works for me. Upon importing the image the editor asked me whether I want to use the alpha channel and it's displayed perfectly in game.

Can you double check to make sure your game is in 32-bit?
Title: Re: Problem with importing sprites with alpha channel
Post by: Anteater on Tue 28/04/2009 04:50:07
Holy cow it was set to 16 bit.   :-[
Mods, feel free to get rid of this topic.
Title: Re: Problem with importing sprites with alpha channel
Post by: Badger on Thu 07/01/2010 11:49:23
Thank you for keeping this one open..was a real help :)