View Full Version : Convert grayscale to alpha gradient PNG in Photoshot ?

03-14-2012, 09:31 AM
Sorry, question is not directly LW but Photoshop.

I have a grayscale image in Photoshotp CS 5.5.
Idea is, to convert the gray shades into alpha values (e.g. white = transparent / black = opaque / the other gray values are something in between). I want to use the alpha values of the image later on, to drive a surface color in LWs node editor.

Problem is, I don't get an "alpha" PNG out of PS.
E.g. if I go to channels in PS and create an alpha channel there (tip from google search), and then save the result as a PNG, I get a normal opaque bitmap. I used "save for web and devices" with transparency activated.

Tried to ask this in the CGSociety PS forum, but my thread does not get published for a reason I don't know.

Thanks for any tip.

03-14-2012, 09:40 AM
I believe your image should be 16 or 32 bit png to show transparency.

03-14-2012, 09:44 AM
You don't need to convert to PNG with alpha channel, if you want to use it in Node Editor..

f.e. load your grayscale image, and plug Color to Mixer node as Opacity, and output from Mixer to Surface's Color or something else.

03-14-2012, 09:55 AM
I tried with changing to 16 and 32 bit, but in 32 bit "save for web and devices" got grayed out and normal save did not offer PNG anymore. In 16 bit PNG is available but still I can't get a transparent PNG. It always becomes an opaque file. Also tried with TIF now but still the same result. Maybe the alpha channel idea is wrong? (I must admit, I don't have a real clue what to use when in PS - tried to find an answer in the book I have, unfortunately with no luck).

03-14-2012, 10:00 AM
Semsei, thanks for that hint. I will try that. My idea to create the trans-bitmap was also to learn how this could be done (say, killing two birds with one stone - solving the surface idea in LW and learning how to make a transmap in PS).

03-14-2012, 10:04 AM
16 bit PNG is not transparent, it's just 16 bit gray scale. Maybe you're talking about 16 bit per channel? So 48 bit total?

You must not have background layer in Photoshop to save PNG with alpha channel.

load some image, make layer from bg layer, then Layers > Add Layer Mask > Reveal All. It will make alpha channel. Pick up Alpha in channels, turn off RGB. Use Gradient f.e.
Then Save 24 bit PNG + 8 bit alpha..

03-14-2012, 11:00 AM
You can copy all image, make new layer in channels (alpha), paste and save like *.TGA 32 bit.

03-14-2012, 11:42 AM
Thanks all,
made a first try with blending instead of alpha. I have a starting point at least. Will try transmap next.

03-14-2012, 12:03 PM
It doesn't have to be so complicated.....

03-14-2012, 12:09 PM
select the image
copy (or copy merged if you have more than one layer)
go to channels tab
click new channel icon

03-14-2012, 01:18 PM
is it just me, why would anyone need an alpha channel in their grey scale image to create an alpha in LW when just a grey scale image alone will work fine as it's only purpose is to supply values from zero to one, LW create the alpha transparency not the image. Are you sure your not getting confused with the trick of loading 32bit images with embedded alphas so as to use the colour output for the colour channel and then use the embedded alpha for a clip map or transparency.