I’ve been having some issues trying to get a particle system to look the way I want in a scene. I’m using a transparent scene clear color (0,0,0,0) so that a background can show beneath the canvas. I’ve tried to reproduce a close approximation in the playground.
The problem I’m having is that my object with a NodeMaterial always seems to show on top of the particles when they are approaching the camera. I would have figured turning off alpha blending would have caused the particles to draw on top of whatever is there based on their depth in the scene. I’m still trying to figure out how the particle draw system works. Is it drawing on top of the render buffer after everything else?
What is the best way I can make it seem like the particles are passing through the mesh? I shouldn’t be able to see the mesh through them when they are approaching the camera.
Do you mean use a particle texture with a black background and no alpha? I tried using the included flare.png and the ONEONE mode but it results in washed out white squares.
I’m wondering if I need to look at a custom shader for the effect I’m trying to accomplish. I need the particles inside the mesh to appear to be behind it but once they are outside they should be drawn over top of the mesh. Is there a way to do this without something expensive like facet depth sorting?
How come when I remove the renderingGroupId the particles have a black square around them? Could I just use a fragment shader that discards any particles outside a texture mask?
You can use the onBeforeParticlesRenderingObservable and onAfterParticlesRenderingObservable observers that are called just before/after the particle systems are rendered.
For some reason, the transparent mesh is always the last draw call even if I set it to a higher render group. I need the particles outside the mesh to appear closer to the camera.
Would a SPS be more effective here? I was hoping to use the performance benefits of GPU particles but it seems like I can’t get the same depth effects as standard mesh rendering.
Ah that makes sense, I had it correct and some point
Sadly now it’s gone the opposite way, it looks great when the particles are approaching the camera. But when I rotate and need the particles to be occluded by the mesh. Seems like I might just have to resort to planes and a custom particle solution.
Does anyone know how Overwatch handles their barrier effects? They definitely handle the alpha sorting problems I’m running into.
The image below is probably the best I could find for now, you can see that there are particle effects that are both partially occluded by the barrier and draw on top of it.