Search code examples
particle-systembabylonjsculling

Babylon.js disable frustum culling for SolidParticleSystem?


I'm attempting some simple data viz of a point cloud. My scene contains nothing but a 40K particle SolidParticleSystem and a small ground plane used for a visual reference when moving the camera. Every time world 0,0,0 goes out of the view frustum (by rotating or moving the camera), the entire SolidParticleSystem ceases to render.

It took me a long time to figure out why my particles kept disappearing for no apparent reason, until by trial and error of moving the camera around I figured out what was going on. The reference plane continues to render as expected.

Is it possible to defeat this behavior?


Solution

  • It is:) Just call mesh.alwaysSelectAsActiveMesh = true and this way the frustum test will be disabled