Hello all
I’m trying to play with particles systems (water pressure effect on my Hovercraft project) but I can’t figure out how colors are actually working.
As far as I understood :
- Birth color is random between
color1
andcolor2
- Dead color is
colorDead
Now, my problem is that, I can’t manage to have actual RGBA colors.
For example having a look at colorDead
:
particleSystem.color1 = new BABYLON.Color4(1,0,0, 1.0);
particleSystem.color2 = new BABYLON.Color4(1,0,0, 1.0);
particleSystem.colorDead = new BABYLON.Color4(0, 0, 1, 0.2);
colorDead
is a slight alpha blended bluish color like the color selector previews :
But result is hard blue color :
(playground)
Now at the opposite :
particleSystem.color1 = new BABYLON.Color4(1,0,0, 1.0);
particleSystem.color2 = new BABYLON.Color4(1,0,0, 1.0);
particleSystem.colorDead = new BABYLON.Color4(0, 0, 0.2, 1.0);
colorDead
should be a dark blue color, with alpha 1.0, like the color selector previews :
But result is light alpha blended blue :
(playground)
In my researches, I came accross this topic which gives as a solution to tweak the particleSystem.blendMode
param, but after testing all of them, it appears that either it enables or disables alpha (ending up with squares rendered instead of blended balls like the flare.png texture), but non of them actually uses a alpha blend mode. It keeps using alpha add mode, which basically means dark RGB is transparent…
What if I want my particles to actually be dark ?
Thanks
++
Tricotou