Search Unity

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.
  • Interoperable and data-compatible with Havok Physics.

Unity Physics is available right now via the Unity Package Manager and is compatible with the latest 2019.1 Beta release.

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!

Deixar uma resposta

Você poderá usar estes atributos e marcas HTML: <a href=""> <b> <code> <pre>

  1. This is amazing news! How will this help with deterministic physics for multiplayer?

  2. Are you planning to add modification of contacts to Unity?

  3. Hi, it’s glad to see that Unity is solving the problem in networking games. Please considering share a roadmap so studios can know when is the best timing to adopt it.

  4. Hi, I could not see the ‘Unity Physics’ in the packages list. Which package has it?

    1. Make sure you’re using the latest 2019.1 beta, go to package manager and check that “Show preview packages” is toggled on in the “Advanced” drop down menu.

  5. I prefer Bullet Physics over Havok, is free and opensource.

  6. So, lost a little here, is DOTS the ECS and Jop system together?

  7. Ok so this is all about Nvidia dropping Physics development that Unity was getting a free ride on. So now if you want new Physics features we are going to have to pay for Havok !

    1. Not quite. We have Unity Physics which you can get via the Package Manager right now and use with the 2019.1 Beta.

    2. Slow-down cowboy. No body said you have you pay for Havok nor nVIDIA is dropping anything. Careful with all these baseless assumptions.

  8. 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…

  9. “Unity Physics is available right now via the Unity Package Manager” => if you are running 2019.1.0 beta…

    1. I’ve updated the blog post the reflect that. Thanks for the reminder!

  10. > Interoperable and data-compatible with Havok Physics.

    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.

  11. Would like to see potential performance improvements and general differences(features?) between Havok and Unity. I hope that will come in a later Blog post. Still very interesting!

    1. Definitely, want to do a follow-up blog post getting into a lot more of the nitty-gritty details. What sort of topics would be most interesting for you to see covered in a follow-up post?

      1. Physics Networking

      2. 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.

  12. why don’t you hire julio jerez for your custom inhouse physics solution? his engine has the nicest solver of all physics engines. :)

  13. 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.

    1. 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!

    2. I would exchange performance for stability anytime.
      When it comes to performance you can always limit number of objects. When it comes to stability you are basically stucked.

  14. What about large worlds, will either system or PhyX’s pre-existing origin shifting API features be brought to Unity?

  15. “More information on distribution and pricing coming soon!”
    I can only assume that Havok will be licensed on an individual basis… this is extremely unclear.

    Lots of questions:
    Does UT plan on replacing PhysX with Havok or Unity Physics eventually?… or is this intended for use with DOTS exclusively?

    1. Unity Physics and Havok Physics are for DOTS only, PhysX remains for classic (non DOTS) Unity.

    2. The Unity Physics and Havok Physics integrations are for DOTS-based projects only. As far as PhysX, we will continue to support and evaluate upgrades to newer versions of PhysX.

      1. When I have heard about new physics system I have almost jumped, but after reading all info I’m not so sure anymore.

        As I know Unity is going to keep old system based on Physx. Are some of it’s functionality that are not working properly going to be repaired.

        I’m talking especially about OnCollision events that are not giving us proper informations about collision. I have made my own investigation about Physx and it looks like it is possible to get orientation an position of a body during contact, so we can later get the exact position of it on a collider.
        I’m not a Physx specialist but got the data from this site:
        https://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/AdvancedCollisionDetection.html

        Will new Physics systems solve OnCollision events in different (proper way) than current one ?

  16. 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.

    1. I would imagine it will be part of Unity, not an extra license. Just like enlighten, umbra and all other 3rd party tech.

      1. If you read the article carefully, you’ll notice: “The Havok Physics package will be available in June 2019. More information on distribution and pricing coming soon!”. Also relevant article:

        http://gamasutra.com/view/news/338719/Unity_partners_with_Havok_to_roll_out_new_physics_systems.php