0
votes

I have an app that uses a Three.js ParticleSystem to render on the order of 50,000 points. I have spent a lot of time searching for efficient ways to do picking (ray-casting) so as to be able to interact with individual points but have not found a good solution. I am considering changing to just using an array of Particles instead of ParticleSystems.

My questions are:

  1. Am I missing something; is there a good way to do picking with the ParticleSystem?
  2. Will I suffer a performance hit using an array of Particles instead of the ParticleSystem, especially since I am taking advantage of the ability to pass several arrays of attributes into the shader.

Thanks for any insight anyone can provide!

1

1 Answers

0
votes

You're checking 50,000 points every time. That's a bit too much.

You may want to split those points into different ParticleSystems... Like 10 objects with 5000 particles each.

Ideally each object would compose a different "quadrant" so the Raycaster can check the boundingSphere first and ignore all those points if not intersecting.