Page 1 of 1

Can we create black particles?

Posted: Sat Jun 13, 2015 3:41 pm
by MrChoke
After over a month off from modding, I am back in the saddle.

I am having trouble using black in any particle-based object. A fireball for example. I can modify the two flame textures and the particle colors to anything I want, except black. It is an issue of course since the texture background color is black. But even setting the "color0" values for the particles to (0, 0, 0) seems to if anything make them invisible it seems. I did try changing "blendMode" from Additive to Translucent. Black starts showing then but it also creates awful blockiness which is not good.

Any ideas or is black the no-no color?

Re: Can we create black particles?

Posted: Sat Jun 13, 2015 7:18 pm
by minmay
Additive blend mode adds the RGB values to the ones already on screen. For black, these values are 0, so nothing will happen with black pixels. Additive blending cannot create any amount of black, it will always lighten the colours behind it, or leave them the same.
Translucent blend mode uses alpha blending.
If you look at the flame particle textures, you'll see that their backgrounds are black, and every pixel has full alpha. This is because they are designed for additive blending, where black pixels will be completely transparent. If you want to use alpha blending, you need to make an image with a transparent background, not a black one. (Any decent image editor will have a "colour to alpha" function). The results are never going to look like additive blending unless the texture is completely white, since the blend modes are fundamentally different.

Re: Can we create black particles?

Posted: Sun Jun 14, 2015 10:04 pm
by MrChoke
Thanks Minmay. That works.