[solved] Help with DDS mipmaps and alphas
Posted: 2016-10-01T03:20:06-07:00
I've been writing BAT files to perform operations and convert DDS files, mainly concerning a sequence of adjustments to each mipmap stage, and with great success so far. I can feed it a TGA and do things like hue-shifts and brighten/darken while resizing down by 50% each time, then combine all those files back into a DDS. The idea is to do things like make some decals more transparent at angles/distance and do things like give grass and carpet a kind of velvet appearance, and some other neat effects with ice and lava, etc.
The next step is to work with alpha channels, but I'm having a lot of trouble figuring it out. I've been grazing through the documentation and experimenting, and ended up trying to extract the alpha channel using convert color.tga -channel alpha -separate alpha.tga and then make adjustments separately, which works thus far, but can't seem to figure out how to successfully combine them back again, using -combine in various ways, I always get strange results like the image being completely white.
I've also tried to not separate, and try experimenting with -alpha type in various lines, but none of those options seem to allow me to do things with only the alpha and not affect RGB channels. I'm not entirely clear if that's the implied usage. I read that many operations won't work anyway and I'm led to believe that this isn't the right approach, and so I should be looking at an approach involving separating>operating>combining.
Finally, I realised that doing these operations on images that use alphas, despite not wanting to actually adjust the alpha, still has an effect by default, it seems. What I means is, if I want to darken an image with an alpha, then it darkens only positively or negatively, while what I need is to completely ignore the alpha without losing it. I've tried -alpha deactivate and -alpha disassociate but to no avail. I guess I may have to separate and combine the alpha, even if I don't wish to do any operations on it. I don't mind that approach.
So I guess my basic question is - what should I be looking at to 1) ONLY operate on an alpha and 2) ONLY operate on RGB channels, ignoring the alpha but without losing it?
Thanks for your time!
The next step is to work with alpha channels, but I'm having a lot of trouble figuring it out. I've been grazing through the documentation and experimenting, and ended up trying to extract the alpha channel using convert color.tga -channel alpha -separate alpha.tga and then make adjustments separately, which works thus far, but can't seem to figure out how to successfully combine them back again, using -combine in various ways, I always get strange results like the image being completely white.
I've also tried to not separate, and try experimenting with -alpha type in various lines, but none of those options seem to allow me to do things with only the alpha and not affect RGB channels. I'm not entirely clear if that's the implied usage. I read that many operations won't work anyway and I'm led to believe that this isn't the right approach, and so I should be looking at an approach involving separating>operating>combining.
Finally, I realised that doing these operations on images that use alphas, despite not wanting to actually adjust the alpha, still has an effect by default, it seems. What I means is, if I want to darken an image with an alpha, then it darkens only positively or negatively, while what I need is to completely ignore the alpha without losing it. I've tried -alpha deactivate and -alpha disassociate but to no avail. I guess I may have to separate and combine the alpha, even if I don't wish to do any operations on it. I don't mind that approach.
So I guess my basic question is - what should I be looking at to 1) ONLY operate on an alpha and 2) ONLY operate on RGB channels, ignoring the alpha but without losing it?
Thanks for your time!