shadows and png files.

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

shadows and png files.

Post by sbtamu »

When I took on this project I had no idea something so simple could kick my rear like it did.

Shadow fx from a layer that happens to fall in the invisible part of a png file do not work.

http://www.youtube.com/watch?v=-wv1nUc4WEA
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
2ner
Posts: 171
Joined: Wed Aug 04, 2004 1:14 pm

Post by 2ner »

Did you select "do not premultiply alpha" when exporting png?
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Post by sbtamu »

2ner wrote:Did you select "do not premultiply alpha" when exporting png?
I did not? Is that how to fix it?
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
2ner
Posts: 171
Joined: Wed Aug 04, 2004 1:14 pm

Post by 2ner »

I just tried exporting a drop shadow on transparency to png with that selected and it worked fine.
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Post by sbtamu »

2ner wrote:I just tried exporting a drop shadow on transparency to png with that selected and it worked fine.
I just rendered all 72 frames with the patch I made removed and selected the ''do not premultiply alpha'' but it still shows the problem in the animated gif. The shadow problem does not show up in the individual png images, it only shows up when i put them in GIMP and play the animation.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
2ner
Posts: 171
Joined: Wed Aug 04, 2004 1:14 pm

Post by 2ner »

Do the png exported images look normal before you convert to gif?

Oh, it's before you export a gif from Gimp that you see that already. Right in Gimp it looks like that? I used Gimp for my test. I don't understand.

"when I play the animation" - I think it's the conversion to gif that does it. Maybe Gimp is cropping out transparent areas. I've seen it do that. It sort of looks like it's doing that at the top of your image.
User avatar
2ner
Posts: 171
Joined: Wed Aug 04, 2004 1:14 pm

Post by 2ner »

Yes, I think it's a weird side effect of the gif auto-cropping in Gimp. You know that gif quantizes the pixels, so maybe those semi-transparent shadow pixels are converted to opaque black.
User avatar
2ner
Posts: 171
Joined: Wed Aug 04, 2004 1:14 pm

Post by 2ner »

I just tried exporting a gif animation from Gimp and it doesn't give options for the quantization. Maybe there's a setting in preferences or you can modify the script or something.

I used to use a program called Microsoft Animated Gif Creator or something like that. It gave you control over how many indexed colors you created. There may have even been options for partial transparency. I can't remember.
sbtamu
Posts: 1915
Joined: Tue Dec 15, 2009 5:05 am
Location: Texas
Contact:

Post by sbtamu »

Import your images into gimp and go to filters/animations/play and it even shows the shadows messed in there.

I just sent the gif file that has the patch in it to the band and it looks good enough for them. The next time I'll try and avoid shadows that drop down into the transparent part of the image. I was so ready to be done with this head ache.

Thanks for all help.
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
2ner
Posts: 171
Joined: Wed Aug 04, 2004 1:14 pm

Post by 2ner »

After a little research, it appears gif can't handle semi-transparency.
Post Reply