Problem with making a shadow/importing w alpha-channel

Started by fovmester, Thu 14/04/2005 07:26:17

Previous topic - Next topic

fovmester

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!?

Gilbert

Did you setup your game to use 32-bit colour? Alpha channels won't work in 16-bit colour games.

Darth Mandarb

#2
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:

(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!

Kweepa

Darth, shouldn't those feet be cut into the shadow?
Otherwise the feet will be semi transparent.
Still waiting for Purity of the Surf II

Darth Mandarb

#4
Yes, of course :)  I made my example too quickly it would seem!



[yoda] To Steve you listen ... yes! [/yoda]

fovmester

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.

SMF spam blocked by CleanTalk