Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: meneldor on Tue 08/09/2009 14:48:56

Title: tranparency issues while importing sprites
Post by: meneldor on Tue 08/09/2009 14:48:56
When importing PNG sprites from photoshop, I can't get the space around the sprite to be properly transparent. The transp. works fine when viewed in the sprite import dialogue, but once it's inside AGS, it shows its ugly self.
Anyone had this issue? Have tried using both png, jpg and gif, same everywhere.

(http://farm3.static.flickr.com/2529/3899733397_2676b71290_o.jpg)
any answers will be given virtual pints as thanks!
Title: Re: tranparency issues while importing sprites
Post by: ThreeOhFour on Tue 08/09/2009 14:54:36
Make sure you check the sprite in game.

The sprites look strange in the previews in the Sprites and Views sections, but once you actually run the game they should look normal :)

Also, if you import them as objects into a room, they should look normal in the room editor!

If you still have problems, make sure that you've set the colour depth to 32 bit and saved the .png properly out of Photoshop.
Title: Re: tranparency issues while importing sprites
Post by: meneldor on Tue 08/09/2009 15:01:31
Yeah, transparency doesen't work in-game either.

i use 16-bit colors, and of course my photoshop documents are set to 16-bit as well... Still no dice!
Title: Re: tranparency issues while importing sprites
Post by: Khris on Tue 08/09/2009 15:05:06
So... did you try switching to 32bit?
Title: Re: tranparency issues while importing sprites
Post by: ThreeOhFour on Tue 08/09/2009 15:05:26
Yeah, 16 bit doesn't support the alpha channel, so that is most likely your problem. Switch the colour depth to 32 and you should be right to go!

Edit: Gah, Khris is too quick!  8)
Title: Re: tranparency issues while importing sprites
Post by: meneldor on Tue 08/09/2009 15:18:36
Wow, thanks! I'll give that a shot =)

By the way, when importing, does AGS support several levels opacity, like PNG, og just on-or-off, like gif?
Title: Re: tranparency issues while importing sprites
Post by: ThreeOhFour on Tue 08/09/2009 15:21:51
It supports different levels of opacities within an image, so you can have smooth edges and the like.
Title: Re: tranparency issues while importing sprites
Post by: meneldor on Tue 08/09/2009 15:22:48
S-W-E-E-T-!
Title: Re: tranparency issues while importing sprites
Post by: Khris on Tue 08/09/2009 16:28:26
It does, but only if you use 32bit :=