Advertisement

PhotoShop: Properly exporting 2D frames to a sheet

Started by April 06, 2006 11:20 PM
6 comments, last by greenwire 18 years, 10 months ago
Alright, the artist on my team has rendered us a whole bunch of animations for our 2D game via blender. They're all in png format, with transparency already in. However, we've got a problem. When we use the batch functionality of photoshop to put everything on a single texture sheet for use in the game, we lose the transparency information. Use of the magic wand tool can remove the majority of it and render it usable, but this leaves ugly white fringes around the artwork. My question is this: how can we get these prerendered frames all on the same texture sheet, quickly and efficiently, without losing our transparency information?
If you explained or posted your Photoshop action I could probably help more. But try changing the action to select the Alpha 1 channel (ctrl+click the thumbnail) on the original PNG image, create a new layer from selection (ctrl+J), THEN drag that image onto your texture sheet. On the texture sheet, delete the background layer, and Merge Visible layers, so you just have your images on the checkerboard background. Select the contents of that layer (ctrl+click), go to your channels palette, create a new alpha channel (should be the only one), then fill your selection with white ('d' to reset colors, 'x' to invert them, and 'alt+backspace' to fill). Now save your file, and you will have the alpha channel intact. I think the step you were losing/missing/messing up on was transferring only the image, and not the background, from the individual files to the texture sheet, by dragging over the entire image and not just the contents of the alpha channel.
-------------www.robg3d.com
Advertisement
have you considered ImageMagick (http://www.imagemagick.org/script/index.php), a simple command-line image tool?

with ImageMagick, it's as simple as:

convert frame1.png frame2.png ... frameN.png +append new_img.png

drag the layer from the png's layers box into your new sheet.

if you want them to be regularly spaced try this:
make an action that adds a layer behind your png layer, clears it to some color, and groups it with the png layer.

then drag the group in to your sheet.
then you can hide the background layers.

it might not be totally automated, but as long as you use actions, its pretty quick.
Quote:
Original post by greenwire
drag the layer from the png's layers box into your new sheet.

if you want them to be regularly spaced try this:
make an action that adds a layer behind your png layer, clears it to some color, and groups it with the png layer.

then drag the group in to your sheet.
then you can hide the background layers.

it might not be totally automated, but as long as you use actions, its pretty quick.


Unless you select the contents of the alpha channel before you move the png file, you're not going to get a proper alpha channel on the final image. You'll still have it on a white BG, and have to get rid of the white background by hand (magic wand, expand a pixel, feather a pixel, delete, also try layer->defringing->remove white matte).
-------------www.robg3d.com
Quote:
Unless you select the contents of the alpha channel before you move the png file, you're not going to get a proper alpha channel on the final image. You'll still have it on a white BG, and have to get rid of the white background by hand

why would a transparent png have a white background?
it's transparent, thats kinda the point isnt it?

Advertisement
The transparency is saved in the alpha channel. Simply dragging the layer/image does not preserve the alpha channel.
-------------www.robg3d.com
works for me.

This topic is closed to new replies.

Advertisement