From everything I have read, I understand that particles are rendered after opaque meshes. If you look at this, https://compatiblestronginitialization–ghandijones.repl.co/, and rotate the camera to where the planets are between the camera and the sun, you will see what I am dealing with. I am trying to figure out a way to hide the particle sets behind the object. Do I need to calculate the depth from camera and hide affected particles? Otherwise, I can’t quite understand how particles would ever be useful for a 3D game in Babylon (think candle inside a room and your player is outside the room).
If someone could explain what I am doing wrong, how to fix this, or a different particle system (SPS for example) that could provide a solution I am looking for, I would be grateful.
If you need to look at the code, it is under lib/js/app.js, Repl.it - CompatibleStrongInitialization.
Thanks guys, any help or references are appreciated.
So in your case, I suspect that your planets are considered as transparent and thus they do not write into the depth buffer. So an easy fix is just to make sure they are opaque
Please repro in the Playground if that does not work
I updated and tested in the playground. I cannot figure out how to set the opaque nature on the “planet” to accommodate hiding the “sun” particle system. I have reproduced in the playground, as requested.