Nvidia PhysX5 and Babylon

Hi,

I ve just tested an emscripten/wasm port of Nvidia PhysX5. It looks really cool.

=> small demo here <==

All of this is possible thanks to #fabmax

15 Likes

The screen capture looks promising. Demo doesn’t work on iPhone - I’ll try desktop later on!

:rocket:

edit: looks really, really good on desktop! nice work :smile:

1 Like

Hi ,

I’ve just setup a playground :smiley:
I don’t have much time right now to dive into this great physics engine. Physics dev/playing can be really time consumming :grimacing:. Anyway I keep an eye on that. sam.

9 Likes

I really like this efficient physics engine.
A new plugin for Babylon?

2 Likes

Nice! very efficient :slight_smile:

1 Like

Hopefully this is related to Integrating a modern and maintained physics engine to Babylon.js :wink:

1 Like

Really time consumming … I compiled the #fabmax github repo and expose to the wrapper a missing method : PxQuat (float angleRadians, const [PxVec3] , all went well. It seems to be robust.
Last draft playground before my boss fired me :laughing:

edit : the loop is handled by a setinterval… so close your browser before it crashes

6 Likes

Just adding to the last playground:

This will clear the interval every time you run the scene, so your browser will not explode :slight_smile:
physx5 @sam | Babylon.js Playground (babylonjs.com)

Just wondering - it seems like there is a minimum thickness for a plane. The boxes are “in the air” a little above the plane. Just wondering TBH. didn’t debug at all.

image

4 Likes

thks @RaananW ! and for the ‘little in the air’ look to :
*var groundGeometry = new PhysX.PxBoxGeometry(100, 0.5, 100); box rigidbody has y size at 0.5 (1 in bjs world), and I was using a plane. Here is a better version with babylon box :

5 Likes

Hi,
ball

I investigated a bit more the github repo physX wrapper #fabmax, it’s a fantastic job, however, there is a huge job to do, to get all working, wrapping, etc…

7 Likes

I wonder why won’t run on iOS :confused: it has workers, wasm and all that :thinking:

Looks really very promising (and works beautifully on desktop). I hope you will have time to dig in further. It would be an amazing step forward with physX (in my opinion).

Night test :yum:

demo : http://www.visualiser.fr/physX2/index.html

I will continue investigating next week, and try to get some free time this week to put this demo in the playground.

And about IOS, sorry I have no idea.

1 Like

PhysX requires a GPU that must have 256MB of dedicated local video memory, support NVIDIA’s CUDA technology and also have 32 cores or higher.

PhysX is extremely powerful but won’t run off integrated graphics machines, but according to their marketing hype, Physx5.1 should run on smartphones… but not Intel Iris or similar IGPUs. Not sure why wont work on iOS but I assumed Physx needs a dedicated card.

Also sidenote, If this could be stableized in babylon, would this have better perf for simple Physics or would it be overkill? Debabing if my game needs it or not.

So this basically means that you couldn’t run physics server side with NullEngine?

Hi @jamessimo, this port of Physx only runs on CPU side, the gpu is not involved at all in the simulation.

1 Like

And finally the playground version

playground demo : revolute joints

6 Likes

I am wondering if it could all be working with thin instances :slight_smile:

Will probably be expensive because it needs to reconstruct the matrix of all on each frame. rendering-wise it would be great though :slight_smile:

Teaser for what’s to come with the next NPM package (fluid rendering):

I just used the positions of the cubes/spheres as the positions of particles and removed the cubes/spheres from the display: probably not the best way to do it :slight_smile:

Here’s the modified PG (which will only work when the Playground is updated):

4 Likes