I am currently trying to write a Point Cloud renderer to display a series of points that are supposed to dissolve and fizzle jitter around over time, but I am currently stuck at the decision of whether to use a procedural mesh or a Shuriken particle system to store all of my points.
I am leaning towards trying to use a particle system to store my points since I can apply a variety of effects to the points, but I am worried that particle systems will cause more lag than using meshes.
Is there any way to get particle system style effects on a procedural mesh? Or is it better to just use a particle system?
(PS, currently the renderer is run on a CPU script, but I am planning to convert it into a compute shader).
I’m not entirely sure what you are trying to do. Are you doing this solely for a visual effect, or do you want the shape to be some form of terrain?
For creating terrain from a point cloud the fastest way would be a compute shader, followed by a CPU based DOTS implementation. However, if you want to change the actual mesh for your effects, recreating the mesh will eat up lots of performance and require a decent implementation to run in real time.
If this is only about a visual effect, then use a shader. That’s what they are supposed to handle and thus what they are good at. Introducing jitter, for example by deforming vertices, is fast compared to actually recreating the mesh. If this is just about how to store these points… i believe that’s up to you. A mesh, a texture, an array…
I cant say a lot about the particle system, but as far as i know it only runs on the main unity thread, so unless you have few data points, or its the only thing your application does, or framerate does not matter, i personally would not use it.
Edit: This looks promising for a high point count, using the new VFX graph: