Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paid work converting PhysX to WebAssembly #288

Open
ashconnell opened this issue Jan 7, 2020 · 8 comments
Open

Paid work converting PhysX to WebAssembly #288

ashconnell opened this issue Jan 7, 2020 · 8 comments

Comments

@ashconnell
Copy link

ashconnell commented Jan 7, 2020

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.

@kripken
Copy link
Owner

kripken commented Jan 7, 2020

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!

@jbaicoianu
Copy link

Sounds like an interesting project, I'm willing to give this a shot and I have some availability. Let's talk!

@prestomation
Copy link

prestomation commented Jan 7, 2020

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: NVIDIAGameWorks/PhysX#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.

@ashconnell
Copy link
Author

@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?

@prestomation
Copy link

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 :).

@GoJermangoGo
Copy link
Contributor

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

@ademola-lou
Copy link

Awesome!!

@jtoy
Copy link

jtoy commented Feb 20, 2020

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants