Announcing Unity and Havok Physics for DOTS

During our GDC Keynote, we announced our partnership with Havok to build a next-generation physics system for Unity. Today, we want to give you more details on what we’ve been collaborating on.

When Worlds Collide

When we first set out to build our Data-Oriented Technology Stack (DOTS), we wanted to empower creators to build rich, interactive, and dynamic worlds. To achieve this, we needed a high performance, data-oriented physics system. Through our collaboration with Havok, we were able to develop a brand new physics engine built on the DOTS technology. This allows us to create physics simulations that are scalable, deliver exceptional performance, and are compatible with modern networking needs.

The new solution consists of two offerings: Unity Physics and Havok Physics. Unity and Havok Physics both interface with the DOTS framework, which means that although they serve different production needs, it is possible for a project to seamlessly transition from one solution to the other or use them both simultaneously for different use cases. Both solutions benefit from the same powerful, accessible tools and workflows Unity users have come to rely on for their real-time interactive content.

The DOTS framework allows us to build a single data protocol for physics. This means you can author your content and game code once and it works with either Unity Physics or Havok Physics. See the below diagram for an architectural overview of how the two physics systems are integrated with DOTS.

Unity Physics

The Unity Physics integration represents the default physics system in Unity for DOTS-based projects and is currently in Preview release form. It is backed by our own DOTS physics solver and written using the C# DOTS framework. By using a stateless design and not leveraging caching, we are able to simplify the complexity of Unity Physics, empowering people to easily tweak, modify, and learn as we evolve the system. Our goal is to give the power back to you as creators and let you easily extend the system to meet your production needs.

The Unity Physics system offers the following:

The cache-less design is compatible with network rollback architecture for input critical simulations such as fighting games, first-person shooters, etc.

Havok Physics

The Havok Physics integration represents a high-end solution for customers that have more complex physics needs. The solution is backed by the industry-leading Havok physics engine that powers over half the top titles of this console generation and brings a wealth of performance and stability enhancements for complex physics simulation needs. It uses the same C# DOTS framework as Unity Physics but is backed by the closed source, proprietary Havok Physics engine in native C++.

The Havok Physics system will offer the following:

Caching system provides stability and high performance for complex scenarios such as stacks of dynamic rigid bodies; systems of rigid bodies constrained together; fast-moving rigid bodies; and scenes with lots of dynamic rigid bodies.

Interoperable and data-compatible with Unity Physics.

The Havok Physics package will be available later this summer.

What’s Next?

Our vision for the future of physics in Unity is to provide a complete physics solution that supports new workflows for creating, editing, and debugging physics simulations. We see this partnership as the next step in empowering you as creators to build these rich, interactive, and dynamic worlds. If you’d like to join in on the discussion, head over to the Unity Forums and let us know what you think. We’re always eager to understand our customers needs so feel free to share problems, insights, requirements, and any feedback you have about our new physics systems!

Interesting. But will the ‘Unity Physics’ have the same feature set as PhysX – i.e. a character controller and wheelcolliders?
There are certainly a few changes in the pipeline – new UI system, new Physics, DOTS – a lot to learn…

I love this. This is really what I want to see from Unity. A collection of puzzle pieces that I can pick and choose how to put together to create exactly what I need. Abstracting multiple different solutions under one API is exactly what game engines should be doing.

First, it would be really helpful to start with some pre-existing reference points for familiar concepts and then directly contrast them with what changes in thinking are required. Frame this in the context of benefits: what used to be the status quo (and what did we call it) and what new superpowers are these new tools going to give us? What, if any, will the tradeoffs look like? Are there demographics for whom this might be interesting but still best served by the previous options?

Then, it wouldn’t hurt to offer some side-by-side looping animated gifs of simple scenes processed through both engines for comparison, ideally showing cases where Unity is better, Havok is worth the money, and where they are roughly the same.

The other aspect you should consider is that this isn’t really just about Unity vs. Havok; for the working Unity Dev, it’s PhysX < (Unity ~ Havok). We're still wrapping our heads around the changes to the way physics are approached even before Havok is added to the equation. It all sounds really exciting, but you need to lower us into the pot at medium temperature.

This is a meaningless update without a discussion around realized performance benefits. The DOTS model significantly reshapes game architecture — and so what is missing here are quantitative talking points around why the architecture change is worth adopting.
For example — for this physics system rewrite news to be meaningful there needs to be an accompanying discussion of realized performance gains in real-world game scenarios. “e.g. Unity’s new physics is 1.5x faster than PhysX per time step…” Tech demos don’t quantity the improvement and until I see this hard evidence I am totally unconvinced.

Given that the Unity Physics is in Preview, we’re still building a lot of infrastructure and tooling so a performance comparison at this point seemed unfair in the announcement post. We’ll be following up with more technical details soon. Thanks for the feedback!

Is there going to be a PhysX integration? Since at the moment the experimental physics engine looks like it will be a while before it’s ready for production and Havok is an external licensing thing. Most indies like me can’t afford to license Havok and I would personally much prefer if our reliable battle tested physics engine was also the free, open source and MIT licensed one.