Objects with shadows?

Started by SilverSpook, Wed 15/04/2015 12:02:11

Previous topic - Next topic

SilverSpook

What's the best way to go about adding objects that cast shadows?  I have a monitor that sits on a desk for example, casting a to the side.  The shadow is painted in Photoshop with brush opacity set around 30-50 percent.  The file I saved as a PNG.  When I add it to the game, the shadow areas are just black.

Is there a way to have part of the object semi-opaque?

Snarky

#1
This should work fine, if:

0) The PNG of the object sprite is saved with an alpha channel and no opaque background
1) Your game color depth is set to 32 bit
2) When you import the sprite and it asks whether you want to import the alpha channel, you say yes
3) ... and on the sprite import window, you select "preserve existing" transparency

(I don't have the editor in front of me and don't remember exactly what the UI options are called in the last two steps, but it's something to that effect.)

Monsieur OUXX

Quote from: Snarky on Wed 15/04/2015 12:14:32
0) The PNG of the object sprite is saved with an alpha channel and no opaque background
1) Your game color depth is set to 32 bit
2) When you import the sprite and it asks whether you want to keep the alpha channel, you say yes
3) ... and on the import window, you select "keep existing" transparency

...And you didn't change the game color depth to 32-bits after importing your background and sprites (e.g. your background was imported as 24-bits). In that case, re-import your background and sprites to be sure they're 32-bits.
 

SilverSpook

Ok thanks guys, that seems to have worked!

SMF spam blocked by CleanTalk