Havok: huge number of spheres?

hi!

I have an idea which requires a huge number of spheres (150-200k) with Havok.

My experiments show that above 1000, well, things get noticeably slower.

Is there a way to use that huge of a number of spheres aggregates ? thin instances don’t show what I need,

https://playground.babylonjs.com/#MZKDQT#2

I just increased the number of cols to 100 for a total number of boxes of 100 *2 * 2 = 400. Look by yourself (warning, it’s very slow).

Bottom line: do we have a way to handle a huge number of spheres with distance contraints and physics?

I think it’s a bad idea in the current shape of it; and that I should find a different solution altogether.

But maybe someone has a way to make it work.

1 Like

Unfortunately, I don’t know that method, but if it’s feasible, I would also like to know.

In the method I tried previously, a practical limit was about 4000 entities when combining Instancing with Havok.

Instansing + Havok = 4112 Duck(s)

Instansing + Cannon.js + 843 Duck(s)

love the intent but the scale seems huge :slight_smile: It would be fun for fluid sim though

cc @carolhmj and @Cedric

I recall even native physics engines being slowed down around 10k objects. You will need to use a gpu particle system. Probably some nbody compute example might be a good starting point.

2 Likes

Thanks!

I changed my way and got a satisfying result with 1000 spheres
:smiley:

3 Likes