Photoshop transparency/alpha channels

Apprentice
Posts: 12
Joined: 2005.04
Post: #1
hi, sorry for an off topic post, you can delete this topic when i get an answer!

Basically i have a jpg image of a muzzle flash with a black backgorund, i want to save it is a PNG so dim3 will support this image but how do i set it so that when i save it as a PNG the black will be transparent, otherwise known as a PNG with transparecny, ive seen his before with explosions and the smoke on dim3 so how do i do that in PHOTOSHOP????? Grin

<<WIllman256>>

Annihilation Point - maCS
AP site
AP forum
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #2
You don't do it in Photoshop. In SDL for example you can set an aplha color, in this case, setting it to black will result in a transparent picture.

If you wanna do this in Photoshop, you'll need to make sure the image has an alpha channel. You can make an alpha channel in Photoshop yourself, but depending on the image this may be a lengthy process.

"When you dream, there are no rules..."
Quote this message in a reply
Member
Posts: 168
Joined: 2004.10
Post: #3
He's talking about Dim3, SDL 2D graphics are, I think, out of the question here. Wink

Why didn't you create an image with an alpha channel in the first place? Then add the picture on top?

Anyway, add an alpha channel and delete the black, I believe you add the alpha channel to the layer but I can't be sure.
Quote this message in a reply
Moderator
Posts: 508
Joined: 2002.09
Post: #4
socksy Wrote:He's talking about Dim3, SDL 2D graphics are, I think, out of the question here. Wink

I said, for example Smile

"When you dream, there are no rules..."
Quote this message in a reply
Apprentice
Posts: 12
Joined: 2005.04
Post: #5
how do you an add an alpha channel in photoshop? and which channel do i delete the black on?

<<WIllman256>>

Annihilation Point - maCS
AP site
AP forum
Quote this message in a reply
teh1ghool
Unregistered
 
Post: #6
Is photoshop use the magic wand tool and select all of the black background. Delete it. Save. Use the new flash with a little big of transparency in the game. Voila!!!
Quote this message in a reply
Apprentice
Posts: 12
Joined: 2005.04
Post: #7
ok, good idea ill use that, ill post what ive managed to do soon! and dont you mean opacity?

<<WIllman256>>

Annihilation Point - maCS
AP site
AP forum
Quote this message in a reply
jamie
Unregistered
 
Post: #8
A tutorial for creating alpha channels in photoshop was recently posted here:

http://unify.bluegillweb.com/
Quote this message in a reply
Apprentice
Posts: 12
Joined: 2005.04
Post: #9
thanks for the tutorial, thats a great help, thanks alot!

<<WIllman256>>

Annihilation Point - maCS
AP site
AP forum
Quote this message in a reply
Apprentice
Posts: 12
Joined: 2005.04
Post: #10
here what i managed to get using teh1ghools suggestions
[Image: m16flash.png]

<<WIllman256>>

Annihilation Point - maCS
AP site
AP forum
Quote this message in a reply
teh1ghool
Unregistered
 
Post: #11
You're only spose to adjust the transparency of the actual flare inside the engine. Keep it 1.0 alpha in the png. And I'd start with layers and a transparent doc in photoshop so you don't have those nasty black areas on yours.
Quote this message in a reply
Moderator
Posts: 522
Joined: 2002.04
Post: #12
A quick move to the correct forum for this question (Designer's Studio) and a simple rename to a more descriptive thread title, and "Tada!" No more off-topic and everyone is happy. Perhaps this can be done in the future! Wink

What version of Photoshop are you using? Surely the manual has something about alpha channels or transparency? You probably want to mask the image, make an alpha channel and then flatten it against a black background. This way your image will come out with "premultiplied alpha". (No hazey borders)

-Jon
Quote this message in a reply
Apprentice
Posts: 12
Joined: 2005.04
Post: #13
aarku Wrote:A quick move to the correct forum for this question (Designer's Studio) and a simple rename to a more descriptive thread title, and "Tada!" No more off-topic and everyone is happy. Perhaps this can be done in the future! Wink

What version of Photoshop are you using? Surely the manual has something about alpha channels or transparency? You probably want to mask the image, make an alpha channel and then flatten it against a black background. This way your image will come out with "premultiplied alpha". (No hazey borders)

-Jon
thanks for moving the topic i had no idea where it would go....

im using CS1 i could get CS2 but i dont have enough money for it... and id rather spend £500 on something else than a piece of software...

<<WIllman256>>

Annihilation Point - maCS
AP site
AP forum
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #14
The best way to make an alpha channel in this situation is to copy the muzzle flash image into a new channel ( "Alpha 1" ) in your channels palette. Then use the "Levels" adjuster to expand this image ( which will now be greyscale ) such that the black remains black and the grey/white goes white. You'll have to adjust it accordingly.

Then, make a layer under your muzzle flash which is mostly the color of the edges of your flash. Say a bright yellow. Then set alpha channel for your muzzle flash to the "Alpha 1" you made in your channels palette. ( do this by option-clicking the alpha channel in the channels palette and then selecting your muzzle flash and clicking the mask button on the bottom of the palette ).

You might want to gaussian blur this mask and futz a little.

Then, use the "SuperPNG" PNG exporter ( google for it ) and let it export a PNG with the alpha channel. There are two versions of SuperPNG, select the one with "Old school alpha channel support ).
Quote this message in a reply
teh1ghool
Unregistered
 
Post: #15
Couldn't you just make your flash on a blank layer and in Dim3 set the alpha in the script to be like .75 or something and have a time making it go to like 0? I'd think that would be MUCH easier.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Photoshop sizing and dpi Chamse 5 9,026 Apr 13, 2011 10:35 PM
Last Post: Anomalous Interactive
  Photoshop Sprites With Alpha Channel Nick 22 18,200 Nov 26, 2006 06:25 PM
Last Post: jarfish
  Your favorite Photoshop tutorials Carlos Camacho 6 6,054 Nov 18, 2005 04:08 AM
Last Post: Fenris
  Creating anti-aliased sprites in Photoshop Malarkey 9 11,084 Mar 7, 2005 09:52 PM
Last Post: arekkusu
  Generating Skybox Images in Photoshop Nick 9 14,166 Feb 24, 2005 08:15 AM
Last Post: jamie