Carbonated announces Madworld, a new mobile game built on O3DE | READ THE PR
NEWS & BLOGS | Tech Blog

The Evolution of PhysX: An Interview with NVIDIA’s Senior Director of Simulation Technology

By O3DE | 05 Sep, 2023 | 4 min read

In this interview, Adam Moravanszky, senior director of simulation technology at NVIDIA, shares his journey, from his early fascination with computer games to his decision to become a programmer, specializing in physics. He emphasizes the importance of building a community for open source projects, how Pixar’s Universal Scene Description (OpenUSD) justified open-sourcing PhysX, and the impact of open source on the world of game development. In addition, Adam talks about the significance of NVIDIA Omniverse, and his excitement for the future of PhysX.

Q: Thanks for joining us, Adam. Tell us a little bit about your path into graphics development.

When I was 13, growing up in Hungary, my uncle invited me over to his office. He was a mathematician, and he had early access to IBM personal computers, which were these big beige boxes with green and black monitors. He had games on them—like the very first Microsoft flight simulator and test drive and even older games—which just blew me away. I totally fell in love with them—just like my kids are falling in love with games now—and I decided that I was going to become a game programmer and figure out how to program these things.

Another reason that I developed a passion for programming was that my dad’s academic career meant changing countries and school systems every two years. I quickly realized that making friends and building anything that was connected to the places we lived was futile. But programming was something I could always take with me, wherever we lived.

I wanted to go work on games, but at that point, my dad said, “No, you must go to university and get a real education. You can work on games later.” So, I did that and graduated in 2001. By then, the game industry had gone from people working on passion projects to being much more industrial. Because it had become more like a real product manufacturing process, you didn’t get to do everything—you needed to have a specialty. So, I decided that I wanted to specialize in physics, and I helped  create a physics engine startup called NovodeX right out of school. NovodeX became part of NVIDIA after two acquisitions in 2008, and the physics engine was renamed to PhysX. This is how I ended up as part of the Omniverse team at NVIDIA, and I’m still working on PhysX.

Q: How did you decide to specialize in physics?

Initially, it wasn’t about physics—I just wanted to make video games. But, when I went to the Swiss Federal Institute of Technology (ETH) in Zurich, there was no game design program, so I decided to major in computer science and, in particular, computer graphics.

With graphics, you’re making a single image, and you’re trying to make it as beautiful and expressive as possible. But with physics, it’s even more magical, because it’s about movement—you’re making images move in physically plausible ways—and I love being able to create worlds that are really captivating. This is why I’m passionate about physics, and I’m still completely in love with the topic after over 20 years.

I was reading about all the things possible with physics simulation, but that are too expensive to do in real time, and I became really interested in how we can create these advanced physics effects in much smaller time slices so that we can run them on video game computers and interactively in real time.

Q: You’ve mentioned NVIDIA Omniverse. Why is it an important piece of the puzzle?

We’re very excited about the possibilities with Omniverse. We always had this really broad set of interests at the company, especially in the content and technology area that I’m part of, but everybody was using their own little engine or platform and none of it was compatible or interoperable, which led to a great deal of frustration. You had an amazing thing A and an amazing thing B, but they just didn’t come together and work together. With Omniverse, because it’s based on OpenUSD, these things are all on the same platform. It’s really great to have this foundation that works for everything, with everything in there.

Q: So, PhysX 5.1 has been released. How does it differ from previous versions, like 4.1?

With PhysX 5.1, we made the decision to bundle the Flow and Blast libraries with PhysX and to use PhysX as a meta descriptor for the entire package. The Blast library is about destruction—it’s about being able to break stuff in games and having them crack and fall apart. And the Flow library offers fluid dynamics simulation to simulate things like fire and smoke.

PhysX 5.1 also incorporates all of the features of the Flex library. We decided to discontinue the Flex library itself because it had a lot of convergent evolution with PhysX, and we moved all of the capabilities natively into PhysX. These Flex features include position-based dynamics, particle simulation, and finite element simulation, which includes cloth, liquids, and what we call “dumb particles” that don’t have cohesion—inflatable objects, stuff like that. These are all GPU features.

We also introduced our new collision detection approach called signed distance field collision. That’s basically about not having to decompose complicated shapes into convex sets and then make them be able to do dynamic simulation. You can treat a non-convex shape as a whole, and you don’t have any artifacts connected with them in the areas where they are touching.

We also added big CPU features like custom colliders, which we made so that you can have Minecraft-style worlds, for example, made of  procedurally-generated geometry. So, that’s a really big deal, and I know that a number of games were really happy about us adding that.

And in general, we have a big focus on accuracy and simulation fidelity that started with PhysX 4, driven by robotics and industrial simulation, which generally has a higher bar for those kinds of things than games. Additionally, we recognized that we could harmonize the open source work from previous versions, making a 5.1 version that was open source for most of the new features, allowing us to increase community adoption and participation within the project.

Q: With PhysX 5.1 being open source and now supported in O3DE, how do you think the O3DE users and community will benefit from that work.

I may be a little bit biased, but I think PhysX is the best physics engine in the world by far, so that’s a big benefit to have available in your engine for whatever you want to build. From what I understand, O3DE is a general-purpose engine that you can use to build just about anything. That’s also absolutely the design of PhysX—it’s not meant to be for any particular niche, it’s really meant to be broadly applicable for real-time simulation, so it synergizes with such an engine very well.

Q: How do you think PhysX 5.1 will evolve?

For a bit of context, back when PhysX was the primary physics engine of Unity and Unreal Engine, its roadmap was charted, to a great degree, by those two big stakeholders. The primary driver for PhysX is now enabling industrial applications that require physically accurate representations of the world—such as building digital twins of factories or building virtual worlds to train and validate autonomous robots and self-driving cars.

And of course, NVIDIA is all about AI. That’s the next big fundamental tech opportunity for simulation. I really believe that AI will revolutionize simulation. We’ve already seen projects like AlphaFold for molecular dynamics simulation, which is showing how an AI-driven technology can completely disrupt an entire simulation-based field. I believe it will be amazing to have AI-based simulation capability in PhysX. This is not something that’s right around the corner—I can’t say that I have it all figured out—but I think that’s the most exciting thing in the long-term.

And then, to mention an area of active development that is less far off: simulation of wiring and cables. That has been something that you were never really able to do well with PhysX, and it’s a capability hole that we’re looking to address. And that’s great for all sorts of things, like simulating cables in a data center or automotive wiring harnesses. It’s going to be broadly applicable.

Q: In what ways can the O3DE community contribute to PhysX?

Platform ports are low-hanging fruit. With our laser focus on Omniverse, which runs on Linux and Windows, we support these platforms natively inside PhysX, but we’re resource-constrained in supporting other platforms, which are needed by game engines that target a multi-platform development. The O3DE community is already doing a great job of this—I know that you have taken it upon yourselves to maintain Mac, for example. And I think the broader PhysX open source community can also really benefit from that kind of multi-platform support.

Going beyond that, in terms of the actual guts of the physics engine, there are many ways to contribute. The number one ask that I’ve heard is being able to more easily use just parts of the physics pipeline. We made an immediate mode physics that was used in Unreal Engine, but I think that was just a first step toward an architecture that allows any of the simulation capabilities to be called without a full stateful physics engine running. That’s an architectural thing—none of the actual math and simulation needs to change. This is more about how you effectively access those compute engines inside the code. That could be a great challenge for someone who has a deep understanding of the engine architecture.

And then, for those interested in physics innovation, they may want to work on the solver or new kinds of collision detection. That’s, for example, how the signed distance field collision works, right? So, we have convex collision, box collision, capsule collision, and then it may be cool to do volumetric, or voxel-based collision detection, which you can now integrate using the custom collider system. There’s so much to do, and ultimately, it comes down to what you need and what your project needs.

Q: How do you think open source has impacted, or will impact, game development?

In an incredibly positive way. As an example, Tim Sweeney made all of Unreal Engine’s source code available, free-of-charge, to download. The purists may not call that open source, but I think it’s hard to imagine now, working with a game engine where you don’t have all of the source available and don’t have a lot of people who are an expert in that source.

I think many companies are now realizing that it is actually a superpower to have the source code out there. Let me give you an example, using PhysX. Right now, ChatGPT has been released, and everybody is being blown away by it. You can ask ChatGPT to write your PhysX program. You can say, “Make me a stack of boxes, make something drop on them, and change the gravity,” and it’ll just do it for you, and it will do it correctly. Why is that? It’s because we open-sourced PhysX 4 years ago, and it was part of ChatGPT’s training dataset. If PhysX 4 hadn’t been open-sourced, this would not be possible. So now, a lot of people who have also written really cool—but closed-source—physics engines are envious that ChatGPT doesn’t do this with their physics engine. Instead, they have to resort to prompting ChatGPT in clever ways to try to entice it to do such things. So, there are unexpected advantages to open source.

I also think big companies are realizing that the initial fears of their “secret sauce” being stolen or people ripping them off is unfounded. There are two reasons this does not happen. First, very few of these projects still have a “secret sauce”—this is true even for PhysX—because all of this stuff has been published. And second, these projects are now so big that you can’t really just fork them and make them your own project. The amount of know-how it requires and the amount of people power it requires for you to do that is extreme. This is also why Linux has been able to be so successful and scale.

Q: Before we close, is there anything that you would like to share?

I am personally super grateful that open source projects like the Open 3D Engine exist, and I do realize that without open source, I would never have been able to gain the kind of deep knowledge needed to help develop something like PhysX.

To give you an example, as a teenager, my first contact with large-scale open engines was when John Carmack released his “Wolfenstein 3D,” “Doom,” and “Quake” game engine source code after the games were released. That was so amazing because it gave me a window into the commercial-grade and -scale software development that would have otherwise been off-limits to a student. I was able to see what huge software projects were about, compared to school projects.

As a software manager of PhysX, I’m still following this Carmack model of building something in a closed environment and then releasing it once it works, but I do find it super cool and very inspirational that there’s something like the Open 3D Engine that can be developed in the open, in a collaborative manner, by a whole bunch of people. I’ve never participated in such a project, so I’m not sure how the management of such a project would work in detail, but I would really like to learn these kinds of open project management skills and try to participate in, or maybe even run, a project like this at some point. And I really wish the Open 3D community great success with the engine.

Subscribe for the latest updates, events, webinars and community news