Creating a large number of meshes

Hey Everyone,
I have a question related to the visualization of a large number of spheres.
There are different ways to create:

  1. instance
  2. clone
  3. solid particle system

Is there any way to create for example 1000 000 spheres with high fps?
(ignore the material)

Depends on your use case and target machines!
Each one of those can provide you with a solution, it all really depends what you want to do with your 100K meshes.

I would say - SPS FTW - Use the Solid Particle System - Babylon.js Documentation , but it depends on many other factors.

The SPS performance is directly related to the global number of vertices (not of objects). A sphere has a big number of vertices. If used with the SPS, it should probably reduced (ex : less segments).

That said, one million objects is really a huge number and the user won’t be able to see them at once in the screen anyway. I would then recommend to manage way far less visible objects and recycle them to render them on the screen when the camera/user moves, or when the objects themselves move.

In this example, by instance, “only” 3000 different objects (solid particles) are used to render more than 70K objects from a map : Test Babylon SP Terrain
They are just recycled according to the current camera position.

100 000 spheres is a monster to render :slight_smile: You may want to think about using GPU particles at that level

1 Like