Fiddling with blendmodes


(TaylorAnderson) #1

Hey. So I’m not entirely sure if this is totally a Flashpunk issue, but this is a great forum and I’m not really doing anything outside of the Flashpunk framework, so…

I want to have 3 colored circles on a white background that use Blendmode.ADD (which is to say, they disappear against the white when they combine).

The problem with this is, when I use Blendmode.ADD, the circles disappear, presumably because they are also being affected by the white background. Is there a way to not include the white background when doing the blendmode stuff? (if this sounds silly its cuz I’m totally out of my depth here, I just want to make some nice effects :P)

Thanks, Taylor Anderson


(Ben Pettengill) #3

If I’m understanding you correctly, you want something like a red, green, and blue circle, that when overlapped will blend to white.

If you want to do that against a white background, I think the easiest way to do it would be to draw the same three circles in black, but draw the black ones in the normal blend mode, and put them behind all 3 additive-blended circles… So draw all 3 black circles first, each one the same size and position as its corresponding colored circle, then draw the colored circles in additive blend mode.

I haven’t tested this and I don’t know if I explained it very well, but I hope it helps!


(TaylorAnderson) #4

Sounds like it would work! The game I was using this for has changed dramatically in the few days since I’ve posted this, so I’m not using this effect anymore, but I think regardless this might be helpful for other people / me in the future :smile: