- Home /
Best way to load high volume of particles.
Hi,
I am having an issue where I want to load in about 1 million different particles into my project. I have a text file which includes all of the positions, sizes and colours of the particles, but im having an issue creating them. They do not need to be rendered all at the same time, but optimally a large amount and they only need to be "default particle" texture.
So far I have tried creating a particle system, where each particle has the given position, but this has the issue where they all have to be rendered at the same time so I am capped to about 300,000. I have also tried creating sprites, but each sprite needs their own renderer created which crashes unity when I go too high. My final test was creating 3D spheres, but they seem to be too complex and also crash the system.
Is there a way to have the spheres simplify down to act like single particles? Or is there a smarter way to do this?
Any help is appreciated!
If your target platform supports it, I'd look into geometry shaders. I'd build a mesh with all those points, no triangles, just vertices. Then I'd try passing this to a geometry shader to render whatever part of that point cloud.
Answer by richardkettlewell · Oct 04, 2018 at 12:40 PM
Maybe look at this:
https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstancedIndirect.html
You can modify the args compute buffer to control which meshes are rendered.
Your answer
Follow this Question
Related Questions
Turning my grid of particles into a sphere 0 Answers
GameObject keeps acting like gameObject. 1 Answer
How to create countries objects in a Sphere? 2 Answers
Distribute terrain in zones 3 Answers