How to make a bitmap to be blend-compatible ?

Started by MetalZelda, August 06, 2016, 02:21:57 AM

Previous topic - Next topic
Greets !

So, I was about to implement a light effect (used by wrightmat in his project) and started to make the thing.
Problem is, the old lighting system use a very basic bitmap



Wrightmat's one use this one in addition to his lighting effect



Is there's a way to "revert" the picture, so I get the same effect
I don't know what and how blending picture are computed, and I greatly suck at image editing so any help would be welcome
I'm using GIMP if you're asking.

Thanks

I just created a new image with a transparent background and used a brush to place the large white dot in the middle, which faded into the background.

I don't know the exact option right off the top of my head, but you should be able to convert the black in your first image into the transparent color and that would give an image that you could use for the light effect.

your lighting affect looks a lot better than using a large overlay that is larger than the screen.  By using a bitmap that is blended on top of a shader cuts down on image size
My tilesets page can be found here:
http://absolute-hyrule-tutorials.solarus-games.org/

December 22, 2016, 03:46:25 AM #3 Last Edit: December 22, 2016, 03:49:58 AM by Diarandor
Quote from: MetalZelda on August 06, 2016, 02:21:57 AM
...
Is there's a way to "revert" the picture, so I get the same effect
...
I think that there is no way to do it with several drawables blendered at the same time on the same surface, although it will be possible someday when Christopho adds new functions to modify pixels. So if you want to use that light effect on the hero lamp and also on other torches at the same time, that probably cannot be done yet.

However, if you only want that light effect for the hero lamp, I think you could use the blend mode of type "none" to draw your transparent/semitransparent image above the black overlay; that would replace all the corresponding pixels, including the alpha channel, which should solve the problem in this case.

Quote from: MetalZelda on August 06, 2016, 02:21:57 AM
...
I'm using GIMP if you're asking.
...
I recommend that you use Aseprite, if you have time to learn it. It is much better to create/edit sprites and pixel art. If you are already good enough with gimp, then maybe it is better that you keep using it.
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."

Oh speaking of that I found the solution, using photofiltre, long time ago, you just have to copy the alpha channel and paste it on a new layer ...
I feel dumb now ...