Way back in 2010, I added a command to OpenBOR called
, where you can use an image called an "alpha mask" to give each pixel of a sprite its own alpha/transparency value from 0 to 255. But there was no tool to actually create usable alpha masks, so it hasn't been too useful to most people.
I've given up on trying to make a nice GUI application to do this. Instead, I'm releasing a very basic command line application that does it. Its name is SpriteBuddy, and you can find it here on GitHub. If you just want the Windows exe, you can download it from the releases page.
Here's a basic usage example. Let's say you have spritebuddy.exe in the same folder as an image idle0rgba.png, which is 24-bit RGB with an alpha channel. Also in the directory is palette.png, the image you use with the "palette" command in the model text file.
Open a terminal in the directory - you can do this by right-clicking in the directory in Windows Explorer and selecting "Open Terminal Here". Now type:
Afterwards, idle0.png will be an indexed PNG with the palette applied, just like PalApply would do. And idle0mask.png will be a grayscale image that you can use with the "alphamask" command. Note that it idle0.png and idle0mask.png will be overwritten without a prompt if they already exist, so be careful!
You'll have to run the command again for each alpha mask you want to make. It's cumbersome if you need to make a lot, sorry! Hopefully, someone better at UI stuff than me can make a nice frontend for it in the future, or integrate its source code into a program with a graphical interface.
Anyway, sorry to provide such a bare-bones tool after so long! But it should be better than nothing.
Oh, and here is an archived version of the old wiki page documenting the
command.
Code:
alphamask
I've given up on trying to make a nice GUI application to do this. Instead, I'm releasing a very basic command line application that does it. Its name is SpriteBuddy, and you can find it here on GitHub. If you just want the Windows exe, you can download it from the releases page.
Here's a basic usage example. Let's say you have spritebuddy.exe in the same folder as an image idle0rgba.png, which is 24-bit RGB with an alpha channel. Also in the directory is palette.png, the image you use with the "palette" command in the model text file.
Open a terminal in the directory - you can do this by right-clicking in the directory in Windows Explorer and selecting "Open Terminal Here". Now type:
Code:
spritebuddy palette.png idle0rgba.png idle0.png idle0mask.png
Afterwards, idle0.png will be an indexed PNG with the palette applied, just like PalApply would do. And idle0mask.png will be a grayscale image that you can use with the "alphamask" command. Note that it idle0.png and idle0mask.png will be overwritten without a prompt if they already exist, so be careful!
You'll have to run the command again for each alpha mask you want to make. It's cumbersome if you need to make a lot, sorry! Hopefully, someone better at UI stuff than me can make a nice frontend for it in the future, or integrate its source code into a program with a graphical interface.
Anyway, sorry to provide such a bare-bones tool after so long! But it should be better than nothing.
Oh, and here is an archived version of the old wiki page documenting the
Code:
alphamask