ammo.js
ammo.js copied to clipboard
Paid work converting PhysX to WebAssembly
Similarly to how Bullet Physics was ported to Ammo.js via Emscripten, how much work would be involved in porting the now open source PhysX engine?
My understanding of C++ isn't strong enough to figure this out and I assume there are probably people out there that could do this without breaking a sweat.
If anyone is available to do this, lets discuss here. I'm willing to pay for this to happen but have no idea how long this kind of thing takes or what is involved in making it happen.
And of course, I would want this port to be released as open source also.
This should definitely be practical to do, as I've heard it's been ported already for closed-source engines (so the code should be reasonably portable already - as a physics engine that's a low risk anyhow). I hope you find someone, I'll ask around too!
Sounds like an interesting project, I'm willing to give this a shot and I have some availability. Let's talk!
Hi @ashconnell.
My team at Amazon has worked on this port.
It is currently available for Sumerian customers: https://docs.aws.amazon.com/sumerian/latest/userguide/entities-physics.html
I have been sitting on the code for a bit, waiting to ensure we've caught the most important bugs on our end, but at this point I will open a PR to Nvidia: https://github.com/NVIDIAGameWorks/PhysX/pull/238
Here's a Sumerian scene that shows a physical scene in cannon/ammo/physx, all running async in a worker: https://2ba77ff724a446bfad8715d24bb9cd30.us-west-2.sumerian.aws/
Here's a demo I copied that originally used oimo.js, and changed it to use PhysX, also running PhysX async in a worker: https://physx-threejs-worker.glitch.me/
For now this build is just the basics, but should be straightforward to add other feature of PhysX. The biggest hurdles were working around constraints in embind, such as certain types of pointer parameters, but otherwise it matches the PhysX interface as closely as possible.
Even native PhysX multithreading works! I have a demo of that I can share as well.
@kripken it seems that you are indeed, correct! Thank you.
@jbaicoianu it looks like someone bet us to it!
@prestomation... This... is... epic...
I've already jumped in and had a crack at it, i left some notes on the PhysX PR too.
I do have one very important question though... Where can I send random gifts and displays of appreciation for you and your teams work and for open sourcing this?
I've commented on your PR comments, thanks for taking a look!
For your question: just put it to good use and let me know when you do :).
A few months ago I started my own port. Although I'm no match for the mighty power of amazon.com I will post my repo here for reference. https://github.com/luisfonsivevo/physx.js
Awesome!!
thx