How can I use LOD with SPS? I have 1.8 M cubes and I want to optimize it with LOD

Hello everyone

I want to show 1.8 cubes with the help of the SPS and here is my PG:

for increasing the render speed I want to. use LOD and here is my LOD code for my SPS:

SPS.mesh.addLODLevel(15, SPS2.mesh);
SPS.mesh.addLODLevel(30, SPS3.mesh);
SPS.mesh.addLODLevel(45, SPS4.mesh);
SPS.mesh.addLODLevel(60, SPS5.mesh);
SPS.mesh.addLODLevel(75, SPS6.mesh);
SPS.mesh.addLODLevel(90, SPS7.mesh);
SPS.mesh.addLODLevel(105, SPS8.mesh);
SPS.mesh.addLODLevel(120, SPS9.mesh);
SPS.mesh.addLODLevel(135, null);

but it doesn’t work. how can I use LOD with SPS
and I want to know is it anyway to increase the render speed?

This might help.

There is no real LOD in the SPS, but you have control over all the particles so there is nothing stopping you from making your own LOD system.

1 Like

Thank you so much for helping and answering to my question. :pray: :pray:

Is it possible let me know, is there any way to increase the rendering speed for huge number of block model ?

To an extent yes, depends. Can you be more descriptive of your end goal? Its hard to visualize solutions without knowing what you are attempting to do.

Just have 1.8 mill blocks be displayed, umm that might be a tough one. Have you tried implementing an Octree with this many meshes it might get you some improvement.

There is also Thin Instances, you could look into. But 1.8 million blocks woooo buddy… that’s 28.8 million vertrices… I mean its possible but most people are not going to have enough vRam to support that big of buffers.

actually I should show 3.6 Million blocks :sweat_smile: but at first I want to work on the half of them. these data is for mining engineering and AutoCad cannot run such data. so I decided to show them on the babylonjs.

I just want to show the blocks and get the coordinates of them.

is Octree suitable for my project? I didn’t work with Octree yet. But I can try it.

Yes with that many meshes it might be absolutely necessary. Ummm webGL might be out of scope for this but you can try!

Possibly a combination of thin instances, octree, and aggressive obfuscation culling might get you close.

1 Like

Thank you so much for all of your help and recommends. :pray: :pray:

:thinking: it would be amazing to see a sneak peak of what you came up with @Arash_Bagheri

1 Like

Hey @MarkBevels
definitely I will repro the demo of my work on the PG, when I complete it. :slightly_smiling_face:

1 Like