Havok Vs Unity Physics Vs PhysX: Which is best?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
with the release of unity 2022.2 Havoc physics is out of preview and in production should you use it and is it the best option before we can answer that we need to understand what came before and still exists Nvidia physx physx is a scalable multi-platform game physics solution supporting a wide range of devices from smartphones to high-end multi-core CPUs physx has features like discrete and continuous Collision detection raycasting and shape sweeps rigid body Dynamic simulation as well as vehicle and character controllers using physics and unity you can Define and control the physics of 3D objects with the following properties so when should you use physics and unity it's simple if your project is in 3D and you're not building with dots it's already integrated meaning built-in and ready by default now before we dive into Havoc we need to discuss Unity Dots Dots or data oriented Tech stack is a collection of Technologies for building high performance scalable and data-driven games and other applications it's designed to take advantage of Modern Hardware architectures including multi-core processors and gpus to achieve improved performance and scalability at the core of dots is the entity component system or ECS ECS is a framework for organizing and managing game objects and their behaviors in a data-oriented way ECS allows developers to define the data that makes up a game object such as its position velocity and other properties and the behaviors that operate on that data such as simulation or AI as separate components this separation of data and behavior allows for more efficient processing and manipulation of game objects and makes it easier to scale the game across multiple cores and gpus now when you're building a dots project you have two options for physics engines Unity physics or Havoc a major differentiator Unity will point out for you is to consider a stateless versus a stateful physics engine while Unity physics for Dots is stateless Unity Havoc physics is stateful but what does that mean exactly in physics the term State usually refers to the physical properties of a system at a given time for example the state of a gas might be characterized by its temperature pressure and volume in contrast a stateless system is one which the current state does not depend on the previous estate in other words the system does not remember its past history and its future behavior is determined entirely by its current state one example of a stateless system is a ball rolling down a hill that picks up speed and eventually comes to a stop once it stops the ball stayed in terms of speed and position do not depend on how it was rolled or how it behaved at the pass at all someone could have thrown it and it bounced and eventually ended in the same state stopped the point is what happened before doesn't matter on the other hand some physical systems are stateful meaning that their current state depends on their past history let's revisit the same example but this time analyze the Ball State at the moment the ball is rolling down the hill a ball rolling down a hill will pick up speed as it goes down while it's moving its current state of velocity depends on its previous state the velocity at the top of the hill the state captured of the ball halfway down the hill would result in two different velocities if it was lightly pushed versus forcefully pushed making that stage in time dependent on its previous state in summary a stateless system is one which the currency does not depend on the previous state while estate full system's current state does depend on its previous state which brings us to Unity physics for Dots which is a stateless system per Unity the benefits of the stateless system are that modern physics engines maintain large amounts of cache state in order to achieve high performance simulation robustness this comes at the cost of added complexity in the simulation pipeline which can be a barrier to modifying code it also complicates use cases like networking where you may want to roll back and forward a physics state Unity physics for ghost is caching in favor of Simplicity and control or you can choose a stateful physics Engine with Havoc one of the key advantages of Havoc is its ability to simulate large numbers of objects with minimal computational overhead this makes it well suited for games with many interactive objects or large complex environments Havoc is also highly customizable allowing developers to tune simulation to achieve the desired level of realism and performance for their specific game that is of course if you're using the full Havoc SDK keep in mind that Havoc for Unity is a version of Havoc that has been developed specifically for unity's entity component system and does not include the complete feature set of Havoc SDK that said the full Havoc SDK would include its own set of challenges and higher costs when trying to integrate it into Unity yourself per license and time spent okay so you have a project that's Unity version 2022.2 or newer your building in dots and you want to try out Havoc well there's one minor roadblock you have to pay while Unity advertises that Havoc physics is free for pro Enterprise and Industrial collection license holders each of those licenses does still have a respective cost Unity Pro is 2000 Enterprise is three thousand and the industrial collection is just under three thousand if you don't have one of these licenses but you still want to use dots you still can but your options for physics are reduced to just Unity physics remember Nvidia Fizz X is only for non-dots projects now you might be wondering should I upgrade my license from personal to produce Havoc Unity lays out three key reasons why they think you should compared to Unity physics Havoc physics offers one better simulation performance two higher simulation quality and three deprofiling and debugging but those points alone probably aren't enough to sell you without trying it yourself right well here's what you can do first decide if you want to learn a new skill set by learning dots with the entity component system if you're brand new to Unity however I'd recommend putting thoughts on your future learning roadmap for now and just Dive Right In so you can learn the basics if you chose dots and you're building a multiplayer game unity physics might be a better choice than Havoc as stateless physics have benefits in the multiplayer space but if you really want to test out Havoc but you don't have a pro license yet you can just reach out to Unity for a trial and this way you can at least test Havoc for 30 days I hope this video was helpful and if you'd like to leave feedback or have other topics you'd like to learn about leave me a know in the comments I look forward to hearing from you and I'll see you next time thanks for watching
Info
Channel: Christopher Francis
Views: 19,676
Rating: undefined out of 5
Keywords:
Id: dEtuAPo5vAg
Channel Id: undefined
Length: 5min 59sec (359 seconds)
Published: Thu Jan 26 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.