Hello Babylon community. I’d like to implement a force directed graph in Babylon similar to d3-force-graph. It needs to be super efficient as we’ll be displaying potentially thousands of nodes (each with image textures).
None of the physics engines in Babylon (Bullet/Oimo/Ammo/Energy?) seem to be geared to this sort of simulation (they are mostly rigid body, whereas d3-force-3d is a Verlet integration with all sorts of optimizations for large simulations) so I’d love to hear if anyone has any good advice:
- Am I missing something? (ie are Babylon’s physics engines perfectly capable/optimized for this sort of work?)
- If yes, should I be looking at WebAssembly via Energy.js to speed things up? (I can’t tell if this is actually ready/useable/integrated or not), or the WASM version of Ammo?
- If no, would it be worth trying to implement d3-force-3d (or ngraph, another similar library) as a Babylon physics plugin? (though I’m not sure if they map well to the interface/API that Babylon Exposes)
- As an alternate approach, could soft body dynamics in Ammo be a relevant option to achieve something like this (ie. forces between particles)?
- And a separate (but still related) question - should I be using SolidParticleSystem for drawing thousands of meshes with image textures once the physics part is figured out? (or is this unnecessary?)
Sorry I know that’s a lot of interconnected questions but any words of wisdom very much appreciated! Maybe someone out there has solved similar problems.