Open diarmidmackenzie opened 2 years ago
See PR#14
Current data on my PC is showing:
As documented in #15 , we can shave ~1.5msecs off Ammo, which would bring it to ~3.7msecs.
That would give us a position where Ammo = ~2x PhysX and Cannon = ~2x Ammo.
This is just one benchmark, tested on just one device, and we may find that different tests & different devices reveal different performance characteristics.
This is what I'm getting on that demo page, fwiw. It keeps fluctuating significantly, though--are the same number of balls generated per-measurement-period ?
I also find watching the subtle behavior difference between the two interesting.
You can see on the left that the physx engine is more prone to have balls get 'stuck' on this simulation, like they have more friction almost? Constantly happening on left, buildup is less and less often on the right:
It does feel like it's more realistic to my eye right now.
Also, though, sometimes the newly added balls 'bounce up' as well on the physX side--they seem to do this because those 'back ups' happen at the top of the board, and so the new ball is dropped on top of an existing ball that has pushback. Doesn't seem like desired behavior.
It's interesting that Cannon behaves seems to also exhibit the same behavior as PhysX, as opposed to ammo--clumps and clumps at tops causing jumps.
On my laptop, PhysX is 3x faster than Ammo, and 6.5x faster than cannon.
Anyways, I digress, I just enjoy performance testing.
Quite likely that the different engines have different default materials, masses etc
I didn't modify anything away from the defaults, except to set restitution to 0 on cannon, as the default restitution of 0.3 was way too bouncy.
All the engines offer various ways of configuring friction etc. I expect work can be done to compare settings and get them better aligned with each other.
Some differences may be down to the engine itself, of course.
We have a perf test that has been used to compare Ammo vs. PhysX https://c-frame.github.io/physx/examples/pinboard/ammo-vs-physx.html
This depends on some minor updates to aframe-physics-system to report timing data, which aren't in this fork yet.
We should: