Page 1 of 1
blend mode?

Posted:
Thu May 14, 2009 8:11 pm
by naoh
Is there a function that can change image blend mode? Like blend mode add?
Normal fire sprite:

Fire sprite with blend mode add

Re: blend mode?

Posted:
Thu May 14, 2009 8:18 pm
by Hblade
This could be possible using tons of canvases. For each fire sprite, have a canvas be created, then you could use the setpen function... like this: setpen(255 + firesprite.r, 255 + firesprite.b, 255 + firesprite.g, 50). I think you could use that way to make an Add effect, but it will look boxy. Look up in the tutorials built in game editor to find out how to use the setpen function.
Re: blend mode?

Posted:
Thu May 14, 2009 8:39 pm
by naoh
I'm not sure I will be able to do that, and it's too much work. Any idea how i can change this sprite to png removing only black color like in this blend mode?
Re: blend mode?

Posted:
Thu May 14, 2009 9:36 pm
by Hblade
Yes there is. Theres a method you can use, just click the Event Commands inside the script editor, then mess around with everything. You should find a funtion called Remove Pixel. Set the pixel color to 0, 0, 0. It'll then remove all black pixels from that actor.
Re: blend mode?

Posted:
Thu May 14, 2009 9:59 pm
by naoh
You dont understand me.
I want do remove black like in this blend mode.
Re: blend mode?

Posted:
Thu May 14, 2009 10:14 pm
by Hblade
I do understand you. I gave you a method. To remove the "Black", you need to remove the "Black Pixels"... >< Other then that, there is no blend mode for game editor.
Re: blend mode?

Posted:
Thu May 14, 2009 11:56 pm
by skydereign
Is there any advantage or reason to having the picture initially black? Your sprite can use transparency, that way it automatically blends. You can achieve that effect, or at least a better result, if the image does not contain black, but rather transparency. If you don't understand, please post the pic and I can show you.
Re: blend mode?

Posted:
Fri May 15, 2009 2:23 am
by pyrometal
You can also use software which allows you to save 32-bit bitmaps which themselves support an alpha channel. This would be your best bet. Now, I do not know which of these softwares to recommend since I do not use these myself (I keep my graphics retro and low-res). Search around to find these.
Re: blend mode?

Posted:
Fri May 15, 2009 2:37 am
by Hblade
Hey cool pyro

. I tried Gimp to make a BMP file with an "add" layer... didn't work. Tried to save it as PNG with an Alpha channel, it worked... I think :O.
Re: blend mode?

Posted:
Fri May 15, 2009 2:47 pm
by pyrometal
Good stuff! This is probably the easiest method to use in my opinion.
Re: blend mode?

Posted:
Sat May 16, 2009 11:45 am
by naoh
It's hard to belive, but I was not able to do it with photoshob. In gimp it is very easy. Just right click on layer>add layer mask>copy layer in grayscale