Psd with alpha & batch conversion

Hey,

I am looking for a way to convert through command line some PSD files which contains an alpha channel.
The reason for that is that 3ds Max seems to not load the alpha channel from PSD files, and this is a problem as some of our facial shaders are needing the information contained in that channel. PSD being our intermediary format it seemed ideal to be able to reuse them directly, which doesn’t seem to be possible anymore. Hence why I am trying to find ways to do some automatic conversion on the fly when needed.

I was hoping to find some command line tools for that, the one on top of my list was nconvert (from xnview), but it seems it doesn’t recognize the alpha channel from PSD either.

anyone had to deal with that same issue before?
I suppose I could have the artists convert the required psd to tga with alpha manually, but I would rather manage all this through scripts.

imagemagick should fit the bill.


convert yourPSD.psd[0] -alpha extract targetImage.png
// [0] tells IM to get the "main" alpha channel (otherwise it will output a series of files with the transparency of every layer in the PSD)

thanks!

after playing a little bit with it, it seems I am able to extract some alpha data from a psd.
However it seems there’s an issue while reaching the alpha information when the bottom layer of the psd is set to ‘background’ (with the lock icon). In which case the [0] layer doesn’t contain any alpha information.
As soon as I convert this bottom layer to a non ‘background’ layer, then the [0] layer contains everything I need.
Which now makes me wonder if that was my issue with the converter from Xnview as well.

There might be some way to work around this, I’ll have to look into the many command line options.

e: indeed nconvert works similar to image magick. somehow the background layer obfuscate the alpha information.