Alpha by color


#1

I have an image of a nebula by itself. The background of the nebula is black. The nebula is by nature cloud like, so black shows through it in spots.

What I want to do is tell photoshop to add an alpha channel. I want it to make it such that the closer a color is to pure black, the more transparent the pixel is.

Is there a way to do that?


#2

Sure. Press Ctrl+Alt+Shift+Tilde (` button). That will create a selection based upon luminance value. Then just press the add mask button at the bottom of the layers pallete.


#3

That operation only made a selection of the very brightest of the colors. It left about 90% of the image out.


#4

There are many ways. You might try blurring a threshold layer.


#5

I would suggest remapping the colors to a black and white only layer (to make it an alpha map) and adding it as a layer mask to the original layer. The problem may be with accurate color matching. You will have to play with curves / levels to get what you want.

To see what I mean just duplicate the layer, convert the copy into a black/white image and set the copy as a layer mask for the original layer.


#6

This post might have some useful info for you…

http://www.digitalartform.com/archives/2005/10/compositing-pre.html

…it’s a little wonky, but between the post and the comments responding to the post it might give you some ideas.


#7

…and how close does a simple screen blend mode get you?


#8

A screen blend gets me all the way, but it doesn’t do me any good. Because, I need the layer I am trying to add alpha to, to save as a texture with alpha for 3D modeling. I don’t use the 1st layer, it’s only there to see if I succeeded or not in Photoshop.

Here is the image I speak of:
ftp://christopherpisz.is-a-geek.com/pub/images/X3/entire_background.dds

It is very large. Be forewarned.


#9

I would make an alpha. In your case, the red channel would work well.

Then I would divide the RGB by the alpha using ‘unmult’ in After Effects, or by using the divide blend mode in the Gimp.

I’ll pm you with details and an example using your file. (Not sure if you want the image displayed online by me, so I won’t)


#10

You can also make a copy of the image, use black and white adjustment layer to create an alpha layer. Load one if its channels as a selection, apply it as a layer mask to the original colored-image-on-black, ‘apply’ that layer mask to ‘bake it in,’ and use layer > matting > remove black


#11

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.