Description
As mixed reality matures, it is increasingly evident that physics will play a big role in how developers create influential experiences. Whether it's basic collision detection, IK, or breakable walls, physics is one of the mainstays of MR.
I think the best physics engine will tend to win, and right now that appears to be PhysX. It was a bit hard to determine, but PhysX is in fact free to use and to incorporate into products, even though you have to jump through a couple hoops to get the source code. You also have to notify them whenever you're incorporating it into a commercial product, but you're still able to use it for free. I think the only requirement is including their branding somewhere in your product. I'm fine with that.
That said, I want to create mixed reality games powered by PhysX. There are a few ways to do this:
-
Incorporate PhysX directly into exokit, and expose it directly to the web.
-
Define an XRPhysics spec, and implement it in terms of PhysX / other physics engines.
-
Allow websites to tell Exokit "Download this node module and expose it to my website."
I think option #3 is the most attractive. It's impossible in general to prevent people from doing this, except by establishing a lot of inertia and becoming yet another gatekeeper. And it's the most flexible approach when security isn't a concern.
It seems like a losing battle to define a specification for every aspect of mixed reality -- the specs are usually lowest common denominator functionality, and exokit proves it's no longer necessary to tolerate such things.
We plan to incorporate PhysX into our fork of exokit in some fashion. If I were to write it as a node binding (similar to the magicleap binding), and exokit were to implement strategy #3, then all forks would be able to use the Physx binding rather than creating a balkanized race-you-to-acquire-users situation per fork.
There are other situations I've wanted this strategy too, e.g. to get some more advanced functionality out of OpenVR than what WebVR/WebXR is willing to provide. If a website could indicate "download and require this node module, then expose it to me," then that would solve the problems in a way that benefits everyone.
History shows that it's a bad bet to try to prevent developers from doing the most flexible thing -- see Apple's early attempts to ban dynamic languages from the app store, for example. Preventing a site from saying "Require this module" seems in a similar vein.
As a closing point, exokit currently exposes dgram
to user sites. But this is a symptom of a more general situation: the dgram
library is sufficiently useful that people want to incorporate it into their sites. Ditto for PhysX, OpenVR, Magic Leap, and many others.