PDA

View Full Version : Get alpha from Psd file?


f97ao
12-18-2008, 08:40 AM
Im trying to get the alpha channel from psd files but it's not working.
I use:

bitPath="filePath.psd"
display (BitmapLayerManager.LoadLayer bitPath 2 true)
And then I click on the alpha buttin in the viewer.

What I'm getting here is the transparency (if you erase your image in Photoshop the bitmap will become transparent), but Im after the alpha channel since that is where we store our information for our opacity in the games. If I try
theBitmap.channels I get #() as a reply.

Does anyone know if this is possible?
/Andreas

ZeBoxx2
12-18-2008, 10:57 AM
I only have limited experience with the PSD file bits, but are you perhaps just looking for
display (openBitmap bitPath)
?

f97ao
12-18-2008, 02:45 PM
Hiya!
No that will only show the bitmap. But I'm looking for the bitmap channel of a bitmap and and when I import from Photoshop the alpha is just empty because its reading the transparency instead...

Cheers
/Andreas

S-S
12-18-2008, 03:34 PM
Hi Andreas

As far as i know, alpha channel from PSD hasn't worked ever in Max. It doesn't matter if you save in PSD compatibility mode or have one or multiple alphas (whatever it's called), alpha channel is always white...

My solution has been to use tiff, (it also saves all photoshop layers, which is nice for work-in-progress stuff) alpha channel reads ok.

EDIT: This is just based on loading textures manually.. but i guess it's same for scripts.

f97ao
12-19-2008, 07:45 AM
Ahh, that is too bad, but not unexpected I guess.

Mmmm, maybe I will do do a MaxScript extension but from what Im seeing psd files are not that much fun to read.
Cheers!
/Andreas

CGTalk Moderation
12-19-2008, 07:45 AM
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.