Photoshop "drop shadow" and TGA exporting

Started by
2 comments, last by Professor420 17 years, 10 months ago
CONTEXT: Currently all of my projects use the TGA file format for textures (all of them created using Photoshop CS2). Recently, I've discovered how to use layer effects, and one of those interesting layer effects is "drop shadow". PROBLEM: Until now, all of the images I've created used a simple, rectangular alpha mask, but in images with drop shadows creating such masks is not anymore a trivial task. QUESTION: How do I need to proceed so that the drop shadow is kept in the exported TGA (with the correct alpha values)? Is there a semi-automated way to create that alpha mask? Thanks a lot!
Advertisement
The easiest way is to
-Delete all layers except your active layer with the layer effects
-Create a new (blank) layer underneath your layer-effected layer
-Merge this layer down, will 'rasterize' the layer effects (there are other ways to go about this, but this is one of the easier ones to explain and understand).
-Ctrl+click on the layer thumbnail (not name!), to select the contents of the layer.
-Go to your 'Channels' palette, create a new channel (will be called Alpha 1)
-Press x to reset your colors to white and black (the default for alpha editing, for color its black and white), then fill your selection with white (using the Paint bucket, Edit->Fill, or Alt+Backspace)

The more transparent areas of the image will be less filled with white, resulting in a grey area.
If you have to premultiply your alpha, this can often be a problem with artifacts, but with TGA its not a problem generally as long as your alpha channels are correct.

EDIT: Yes, you can easily automate this task using Photoshop's actions. Look into it via the help files, its not too complicated, and very powerful.
-------------www.robg3d.com
Hi, Professor420!
I've already tried something like that, and this is the final result (note that the drop shadows kept a little of white in the exported TGA). Is this normal?

ingame screenshot
Photoshop screenshot

Thanks!

PS.: Yes, the shadows are black
The TGA looks like its pre-multiplying with white. Try putting a solid black layer under your image, and merging down (you won't be able to see the drop shadow), and make sure your alpha channel is good, and export again. Also, try taking the screenshot against a colored background (not black). Tell me if it works.
-------------www.robg3d.com

This topic is closed to new replies.

Advertisement