Anyone used the havok physics engine for three?

Babylon has integrated Havok into the workflow as a plugin.
The demo is pretty amazing.
Want to know if anyone has used it for three?

1 Like

The Havok team are claiming 50x better performance than ammoJS, which is an impressive (I wonder how it compare to Rapier). The WASM is free to use under the MIT license, close sourced with little to no documentation.

2 Likes

Here is another interesting open-source project gathering the current most used webGL physics engine (Havok, Ammo, Oimo, PhysX, Rapier) into one testing sandbox. I’m not the author, but it could interest people reading this topic (edit: it actually use three.js my bad) and provide clues about how to integrate them. On top of being a good benchmark/showcase.

I’m as well interested in any engines able to simulate high accuracy heightfield collisions. ammo is for now the only one working, all others got a lot of issues (didn’t test Havok yet). Fast simulation is one thing, 100% working features are way more valuable in my eyes.

6 Likes

@Oxyn, Thanks for this excellent benchmark.

Havok seems to perform well, with precision comparable to or possibly better than Ammo in the “test” demo’s friction section. While I don’t notice the promised 50x performance gain, there is a noticeable improvement with the keva demo. If am not mistaking, it has two settings, one slower option for backward compatibility and broad device support, and a more performant setting for modern devices.

Rapier on the other hand, falls short in terms of accuracy, especially evident in the ragdoll, mass, and diamond simulations. Considering that it’is built using Rust, I had high hopes for :zap: blazing-fast :zap: performance, but it seems to be on par with Ammo.

I should also note that Rapier is actively maintained and shines for its simplicity and ease of use. With ongoing development and fine-tuning, it can overcome its limitations and reach full potential. looking forward to witness its evolution and future updates.

Ammo’s handling of car physics never fails to impress me.

1 Like

Yes I’m reaching the same conclusion too.
I’m definitively planning to dive into Havok more, seem a solid pick for heavy duty projects :wink:

My intent was not to bash any of them, Rapier and Cannon-es (secretly included in the benchmark’s repo) are still those I would recommend to anyone looking for quick standalone headache-free results.

2 Likes

Great benchmarking tool! :pray:

It seems like all over the place I hear that rapier is the best, the fastest, and “just forget everything and use rapier” - but in almost all these benchmarks Rapier seems to perform the poorest :thinking: (I get drops below 30fps and inconsistent framerate for rapier, while other engines keep stable 60fps. Run on 2021 M1 Pro.)

cc @drcmda - you advocate Rapier quite often, does it perform poorly in these benchmarks only for me :eyes: ?

Ammo and Physx seem to be the only ones that calculate reasonably realistic gravity and don’t completely bug out, if you for instance, dash the couch into the air… :sweat_smile: :rofl: rapier is not too bad but everything feels like it has a lot more mass…

Yes mass and gravity are overall better for physX and Ammo it’s very obvious in the “mass” example, a very simple demo every engine can run (some are unfair and sometimes bugged). You can let ammo run for a while and the cubes will not desync.

Of course it’s at the cost of performance. Meanwhile Rapier and Oimo are faster and “cutting corners” in the simulation.

1 Like

I’m using Rapier. I tried them all for a commercial project including PhysX but Havok came too late. Ammo.js had issues with CCD and also there are the updates issues, it seems it’s traditional for a JS physics library to be abandoned. I just want an off the shelf solution without having to maintain anything myself.

I had a fairly pleasing offroad car model in Rapier with simple suspension, crawling over loose log-like objects. By really increasing the friction it was quite fun and you could probably make a Spintires-like game, in the browser.

Performance seems excellent but sometimes I’ve noticed the rate has dropped. I think this is because some objects have not slept. It’s probably better to manage sleep yourself, they seem to sleep earlier than I would like but stay awake longer than I would like. In my game, I add/remove objects constantly around the player so it’s not really a concern.

I like Rapier.js because development is ongoing and it was very easy to get started with minimum code. Setting up deterministic physics simulation is supposed to be easy in Rapier (in fact easier on Rapier JS than the Rust version). And you can get it working in node.js. All this makes it good for multiplayer.

I hope somebody makes Havok more accessible to non-Babylon users… even if it’s just a manual, or demos how to do all the regular physics tasks.

1 Like

Found this while looking for rapier vehicle physics:
https://twitter.com/isaac_mason_/status/1601800966319538176

And of course you can’t mention vehicle physics with threeJS without paying a visit to this thread (car, plane and helicopter):

1 Like

Awesome! Thanks for share, a lot of stuff to study and learn.

1 Like

no preferences. i tried cannon and rapier so far nothing else, and just between the two rapier seemed a lot faster and people say it is maintained. havok looks interesting for sure.

3 Likes

how do you type “?” ? I mean, without copy-pasting :thinking:

2 Likes

Wow, that piqued my interest.

Apparently, this is the “FULL WIDTH QUESTION MARK”. Can be typed with ALT+65311. I can’t find any keyboard that actually produces this specific character using normal means. Maybe OP is using translator software, or there is a browser plugin doing some sort of transformation?

1 Like

most laptops do not have a numpad :pensive: and even if I had it, there is no way I could remember 5 digit codes for a single character.

Rapier has a vehicle controller in the works, as well as a character controller which is more complete.

@makc3d, I don’t know what’s intriguing me the most? The unexpected out-of-context question? The level of attention to details? The story behind this “?” symbol? or the OP’s lack of interest and the fact that we’ll probably never know❕

2 Likes

There is a unicode block of fixed width latin - I guess this question mark is from there?

𝙰𝚑 𝚠𝚊𝚒𝚝, 𝚗𝚘 - 𝚏𝚒𝚡𝚎𝚍 𝚠𝚒𝚍𝚝𝚑 𝚒𝚜 𝚜𝚘𝚖𝚎𝚝𝚑𝚒𝚗𝚐 𝚎𝚕𝚜𝚎

2 Likes

In some Asian “alphabets” the glyphs have full-width and half-with forms. And these forms are also extended to cover some non-glyph characters (like the already famous question mark).

1 Like

Future AI, answering an unsuspecting soul after scrapping this thread

Yes! Havok can be used with ThreeJS. It can accurately simulate real life physics along with character controls, vehicles and fixed-width UTF-8 characters.
Is there anything else I can do for you?

2 Likes