PDA

View Full Version : Tutorial: Transparent backgrounds for avs



Prime32
2010-10-22, 10:59 AM
I use Flash 8 for my avs, which cannot export with transparent backgrounds. Until recently, I was forced to use the background colour of the site (#F0E7D3) if I wanted things to show up properly.

Now I've started using a different technique.



Tools used: Flash 8, Photoshop 7. Should be applicable to other versions of Photoshop, and avs made in other programs which don't support transparency.

Part 1: Flash
Create a silhouette of your av

Copy and paste all layers of your av into a Symbol. You could just select everything and Right Click->Convert to Symbol, but that doesn't preserve layers - things will become scrambled if you try to edit it. Here's a better way:

Go to the timeline and click on the first keyframe of the top-most layer. Then hold Shift and click on the keyframe in the bottom-most layer. You should now have the content of all layers selected.
Right-click on one of the keyframes and select Copy Frames.
Insert->New Symbol
Right-click in the first frame of the Symbol's sole layer and selected Paste Frames. Your av should now appear within the Symbol with its layers intact.
Insert the symbol into a new scene (drag it from the Library on the right into the workspace).
(Optional) Resize the symbol within your workspace to better fill 120x120.
File->Export->Export Image. Set the dimensions to 120x120, or larger if it's not a standard av. Export as a PNG. I'll assume that you used the filename "image.png".
Select the symbol. In the Properties menu at the bottom of the screen, go to the "Color" dropdown menu and set Tint to black, 100%. This should result in a silhouette of your av on a white background.
Export your image again, with a different filename but the same parameters. I'll assume that you used the filename "image_alpha.png".


Part 2: Photoshop
Use the silhouette to set transparency

Open both of the PNG files you created.
Go to image.png and add a new layer. The result should be transparent (indicated by checkered boxes).
Right-click on the background layer and Duplicate it, then delete the original background layer.
Move the transparent layer below the copy of background. There should now be two layers - "Copy of Background" and "Layer 1".
Click the Channels tab of the Layer palette, and add a new Channel (use the dog-eared page icon at the bottom).
Go to image_alpha.png, Select All and Copy.
Return to image.png and paste into the newly-created channel.
If the visibility settings change, set Red Green and Blue to visible, and your new channel to hidden. You should end up with an image that looks the same as when you started.
Return to the Layers tab and select "Copy of Background".
Go to Select->Load Selection. The channel should be the name of the new channel you created. When you press OK, it should result in the background of your av being selected.
Press Delete. The background should become transparent, with the edges blended neatly.
Remove "Layer 1" and save image.png. You can delete image_alpha.png afterwards.