Draw particles on top of specific mesh?

I would like to draw the sparkly particles in this playground on top of the black sphere (press space to toggle the sphere on and off to see the particles), but I’m not sure how to do that.

I considered using renderingGroupId, but the sphere and hexes have to be in the same group, so the particles would be drawn on top of the hexes, which isn’t desirable.

https://www.babylonjs-playground.com/#PH1GJF

Thanks c:

edit: The particle system is made on line 148, and the sphere on 185.
edit: The reason I don’t want to simply put them on the sphere’s surface is to give depth to the effect

Hey this is going to be tricky :slight_smile:
You may need to think about having a clone of the hexs on renderingGroupId2 as well but with disabled color write (so we don’t see them)

1 Like

That’s perfect, thanks! I implemented the fix in the playground.
The effect works and looks just how I wanted, great. c:

https://www.babylonjs-playground.com/#PH1GJF#1

2 Likes