PNG alpha
I have this problem with PNG alpha and cant solve it. To start with, I used to use TGA for my textures in my game, however, PNG showed out to be better on most things and I started to use that instead. Well, with TGA I used a mask-alpha, and even if PNG also has support for alpha - it's not the same type. With Paint Shop Pro you can chose "Load Mask From Alpha Channel", and with a TGA picture you now get (if you now have a mask) a black and white alpha-mask. I use this alpha-mask to make my textures transparent. However, with PNG, I just can't save it as a mask! Even if I have saved it as alpha, it says "Image does not contain alpha-channel" when I klick at "Load Mask...". So, I have to rebuild large parts of my code to make PNG work the same way as TGA did before, and I was hoping to save som time so ... anyone here who knows how to solve this problem? I need a PNG with a alpha-mask, that's it!
Dude, finally someone else who has these problems! Are you using PSP 8? Paint Shop Pro seems to save TGA files in a format that gets totally screwed up when loaded from 3D Studio or Direct3DX. Was that your problem as well? I've been filtering my transparent textures through Photoshop (by just loading and saving them) just to have them work.
Just tested this. To save as PNG, you need to leave the mask in the image. You don't need to save it to the alpha channel with PNGs. To test this out, create a new image, promote background layer, use the eraser tool and throw some lines on it, then save as PNG. You can load it back in the same way.
If you want to edit the mask like a greyscale image, you can Go Layers->NewMaskLayer->FromImage->SourceOpacity, then copy the layer and paste as a new image (Ctrl + V). Then remove all transparency from the original image and flatten it. Now you have two seperate images, mask and color. Make sure to add a layer and flatten the mask image because there are issues with that in PSP.
To put the mask back into the original image, just do the Layer->NewMaskLayer thing again on the color image, and just copy and paste the mask image into that layer (Ctrl + E). You can then save it as PNG, or you can combine the mask and color by right clicking on the mask layer and selecting "Delete", then clicking "yes" when it asks if you want to combine them.
Sorry for the overly detailed explanation, but I was somewhat figuring this out as I go. I'm definitely using PNGs from now on :)
Just tested this. To save as PNG, you need to leave the mask in the image. You don't need to save it to the alpha channel with PNGs. To test this out, create a new image, promote background layer, use the eraser tool and throw some lines on it, then save as PNG. You can load it back in the same way.
If you want to edit the mask like a greyscale image, you can Go Layers->NewMaskLayer->FromImage->SourceOpacity, then copy the layer and paste as a new image (Ctrl + V). Then remove all transparency from the original image and flatten it. Now you have two seperate images, mask and color. Make sure to add a layer and flatten the mask image because there are issues with that in PSP.
To put the mask back into the original image, just do the Layer->NewMaskLayer thing again on the color image, and just copy and paste the mask image into that layer (Ctrl + E). You can then save it as PNG, or you can combine the mask and color by right clicking on the mask layer and selecting "Delete", then clicking "yes" when it asks if you want to combine them.
Sorry for the overly detailed explanation, but I was somewhat figuring this out as I go. I'm definitely using PNGs from now on :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement