Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: fovmester on Thu 14/04/2005 07:26:17

Title: Problem with making a shadow/importing w alpha-channel
Post by: fovmester on Thu 14/04/2005 07:26:17
Hi.

I want my characters to have shadows, and the easiest and most nice-looking way of doing that would be to draw the shadow into every character-sprite. So I've done that (in Graphics Gale). I drew the shadow using grey color and an alpha-channel so it's transparent.

But now to my problem: How can I import these sprites into AGS and preserve that transparency?

I exported my images from Graphics Gale to PNG-format with alpha-channel. And when I import them into AGS the editor asks me if I want to use the alpha-channel so I answer yes. But when I test the game the shadow is not transparent!

What am I doing wrong!?
Title: Re: Problem with making a shadow/importing w alpha-channel
Post by: Gilbert on Thu 14/04/2005 07:28:58
Did you setup your game to use 32-bit colour? Alpha channels won't work in 16-bit colour games.
Title: Re: Problem with making a shadow/importing w alpha-channel
Post by: Darth Mandarb on Thu 14/04/2005 14:49:26
This is the same method I use to give characters shadows!

Make sure that each frame uses BLACK as the shadow color.  Only make it grey in the Alpha Channel (other wise you'll get a washed out looking shadow when it becomes transparent).

Like this:
(http://www.twin-design.com/ags/help/fov_help01.gif)
(obviously in the actual image the alpha would be in the same spot over the image rather than side by side)

The Alpha channel is where the transparency must be determined, not in the main frames themselves!

Aside from that, was Gilbot said would be my second suggestion!
Title: Re: Problem with making a shadow/importing w alpha-channel
Post by: Kweepa on Thu 14/04/2005 15:33:21
Darth, shouldn't those feet be cut into the shadow?
Otherwise the feet will be semi transparent.
Title: Re: Problem with making a shadow/importing w alpha-channel
Post by: Darth Mandarb on Thu 14/04/2005 15:43:26
Yes, of course :)  I made my example too quickly it would seem!

(http://www.twin-design.com/ags/help/fov_help02.gif)

[yoda] To Steve you listen ... yes! [/yoda]
Title: Re: Problem with making a shadow/importing w alpha-channel
Post by: fovmester on Thu 14/04/2005 20:28:51
Quote from: Gilbot V7000a on Thu 14/04/2005 07:28:58
Did you setup your game to use 32-bit colour? Alpha channels won't work in 16-bit colour games.

Yes it uses 32-bit colour.

Darth:
In Graphics Gale you can't view the alpha-channel independant of the rest like you have (i think) but I'm sure I've done it like you have.