Attached is a basic spherical billboard / particles implementation for volumetric particle visualisation.
Can anyone advise how to set the blending to stop them ‘popping’ when the view order changes? I’ve sorted the particles back to front and set to basic blend with no depth buffer active. SP Fog Test.zip (17.6 KB)
blending is pain, there are few ways:
Most basic is to make alpha really low, like 0.9.
also there is alpha to coverage on blend node advance you can try…
And one I did’t test yet you render Color and alpha to separate texture and combine them in the post with everything else…
Thanks for the tips. None of those suggestions are suitable for this unfortunately.
Does anyone else have any ideas? There must be a ‘proper’ solution for this as soft particles / spherical billboards are a reasonably popular technique
In the above unity example the blending is described as - ‘Blend SrcAlpha OneMinusSrcAlpha’ which will be SourceAlpha and InverseSourceAlpha but I haven’t managed to use these successfully with the blend advanced node yet.
First off - sorting as not needed as we’re not using the depth buffer for the particles (but rendering an opacity map to allow us to composite instead.
Because the depth buffer is off we don’t have the issue of draw order changing blending results
My problem was actually that I was culling particles based on particle position and view frustum. this meant that whenever a particle centre position was off screen, the whole particle would disappear. I was confusing this with the z order of the particles changing.