News for hackers. Stuff that matters.
Re:Microsoft acquires Havok by brobinson on Sunday October 04, 2015 @12:10PM (#10327886)
A piece of middleware used in seemingly every single AAA game in the last decade... seems like a solid investment!

That said, when I see a Havok splash screen when a game is launching, it means "prepare for unrealistic ragdolls" to me. I wish they would tone down how loose the physics on ragdolls are and end up with something more like this: https://www.youtube.com/watch?v=Qi5adyccoKI

Re:Microsoft acquires Havok by Animats on Sunday October 04, 2015 @03:15PM (#10328467)
That's a consequence of using impulse-constraint contact simulation on ragdolls. If you use spring-damper contact simulation, the motion is better, but the compute cost is higher. Impulse-constraint simulations have instantaneous velocity changes, which looks wrong for large objects. I call this the "boink" problem. Here's what it looks like with nonlinear spring-damper contact simulation.[1][2]

I did those animations back in 1996-1997. Havok licensed the patent rights from me, but switched over to impulse-constraint because it was faster and could be done on the 32-bit FPUs of game consoles. Spring-damper simulation has a reputation for failing badly under high forces ("Trespasser", an early Jurassic Park game, was a disaster because of this), but I figured out how to fix that. (You have to use nonlinear simulated springs, and then, having created an insanely stiff system of differential equations, figure out how to integrate them. This can be done well, but it's hard to do it in fixed time, which is a problem for games.)

Havok didn't do too well in their first years. They overexpanded, more or less went broke, a new group of investors and management took over and downsized, and a few years later the new investors exited by selling the company to Intel. The founders didn't come out of it very well.

[1] https://www.youtube.com/watch?v=5lHqEwk7YHs [2] https://www.youtube.com/watch?v=-DaWIHc1VLY

Re:Microsoft acquires Havok by brobinson on Sunday October 04, 2015 @04:21PM (#10328666)
I've actually seen your site before and was blown away by the physics in your demo. Thanks for the awesome and detailed post!

I have fond memories of Trespasser. :-)

Re:Microsoft acquires Havok by santaclaus on Sunday October 04, 2015 @06:48PM (#10329126)
> That's a consequence of using impulse-constraint contact simulation on ragdolls.

Why is that the case? If I recall Erwin Coumans now has generalized coordinate articulated bodies in Bullet, which uses an LCP based impulse system.

Re:Microsoft acquires Havok by Animats on Sunday October 04, 2015 @07:24PM (#10329217)
Because, in an impulse-constraint system, all bounces happen instantaneously. An impulse is an infinite force applied over zero time but with a finite energy transfer product. This results in an infinite acceleration over zero time, with a finite change in the velocity vector. That's not how the macroscopic universe works. It doesn't properly model a combined impact/skin compress/slide/skin expand/bounce situation for heavy objects, which is not instantaneous.. This shows. It's why objects banging around in video games all seem to be too light.

A better model is to use compressible "skin" over incompressible "bones", which is what Falling Bodies did.

Re:Microsoft acquires Havok by reubenmorais on Sunday October 04, 2015 @12:20PM (#10327923)
If you look for videos of people actually getting hit by high powered weapons, or high speed cars, you'll realize that what's unrealistic is your expectation. People in those cases behave a lot like ragdolls, we just don't see it in real life very often (or at all), so don't know what to expect.

Now this is just me making up theories, but I think that effect is exacerbated by the fact that kinetic energy scales with the square of velocity, and humans tend to think linearly.

Re:Microsoft acquires Havok by brobinson on Sunday October 04, 2015 @12:31PM (#10327959)
I'm definitely aware of the Hollywood effect re: gunshots. :-)

My main complaint with Havok is that once ragdoll mode is activated (usually upon a character's death or an explosion causes them to loose footing), their limbs essentially become spaghetti and flail about wildly. It breaks the immersion for me.

A classic example of this is found in Dark Messiah of Might and Magic. Pretty fun to go through that game beating 90% of the enemies by kicking them into/off of things.

Re:Microsoft acquires Havok by wlievens on Sunday October 04, 2015 @12:35PM (#10327970)
I loved that game! The Adventure of Ser Bootface Kicksalot! Too bad they screwed up the multiplayer game by essentially changing all of the mechanics.
Re:Microsoft acquires Havok by outworlder on Sunday October 04, 2015 @12:52PM (#10328021)
I believe that the problem is that the ragdoll is indestructible. So the limbs, which in reality would have been ripped apart, are instead rendered unrealistically.

Ripping limbs off wouldn't help with ratings though.

Re:Microsoft acquires Havok by santaclaus on Sunday October 04, 2015 @02:39PM (#10328354)
I wonder if it is an issue with high mass/inertia ratios. Large ratios between the highest and lowest mass of bodies can lead to ill conditioning of the underlying numerical systems, and practitioners will often 'cheat' by assigning everything the same mass. This could lead to an arm having the same inertia as a foot, which would cause the arm to flail wildly. Of course without knowing what the underlying model and solver is, this is pure speculation.
Re:Microsoft acquires Havok by Animats on Sunday October 04, 2015 @05:06PM (#10328827)
"Practitioners will often 'cheat' by assigning everything the same mass. This could lead to an arm having the same inertia as a foot"

It's fairly common to see totally bogus masses and inertia tensors in simulation. Especially inertia tensors. (Long thin objects have much higher moments of inertia in one axis. This is expressed as a 3x3 inertia tensor.) In my Animats "Falling Bodies" system, everything was composed of convex polyhedrons. For valid non-self-intersecting polyhedra, there's a straightforward way to integrate the total mass and the inertia tensor, developed by Brian Mirtich.[1] I used that to compute the mass properties automatically, without any help from the user. Density was assumed to be that of water unless overridden. That's a good approximation for humans and animals, but high for vehicles with lots of open interior volume.

Before finding Mirtich's paper, I was dividing convex polyhedra into tetrahedrons with one vertex at the barycenter of the polyhedron, computing the inertia tensor for each tetrahedron, translating them to the object center, and adding them up. It's clunky, but it works. Mirtich's method is much cleaner, and will work for all closed non-self-intersecting polyhedra.

There's no excuse for a simulation system not computing the mass properties. Expecting users to input an inertia tensor by hand is hopeless. (Looking at you, Gazebo.)

Here's a good basic test for proper inertia handling - a spinning top.[2] (Raw MP4 file, may need download before playing). That's from an early test of my Falling Bodies around 1996-1997. It spins smoothly, while precessing and wobbling, slows down due to the friction with the ground, and eventually falls over and rolls away. Try that in your physics engine. The better ones get it right.

[1] http://www.cs.berkeley.edu/~jfc/mirtich/massProps.html [2] http://animats.com/images/spinningtopsmall.mp4

Re:Microsoft acquires Havok by tjl on Sunday October 04, 2015 @07:49PM (#10329290)
I recall reading that Mirtich paper when I was doing my undergrad project. I still have a paper copy somewhere. You're definitely right in that there's really no excuse for not having proper inertia tensors. Given that paper is from '96, I would think that everybody who needs to know would know by now.

There's at least one contact model I'm fairly sure is unknown in the games industry and another I'm not sure about. A friend of mine (George Baciu) wrote a paper for an IEEE conference (Systems, Man, and Cybernetics, I think) on a method that solves the collisions using graph theory. One of the nice things about it is it handles multiple simultaneous collisions correctly. I'm annoyed because I can't find my copy of the paper or even the paper name at the moment. The other one is a volumetric contact model from Yves Gonthier's PhD thesis, "Contact Dynamics Modelling for Robotic Task Simulation" at the University of Waterloo. There's a thesis that uses it for a wheel-soil contact model and there's another thesis that validates it and presents a volumetric friction model.

Re:Microsoft acquires Havok by santaclaus on Sunday October 04, 2015 @06:42PM (#10329099)
David Eberly has a pretty nice followup to Mirtich [1].

[1] http://www.geometrictools.com/Documentation/PolyhedralMassPr...

Re:Microsoft acquires Havok by Animats on Sunday October 04, 2015 @07:19PM (#10329204)
Eberly's method is faster, but for rigid-body work, mass properties are precomputed once and stored. It's not necessary to run that algorithm during the simulation. Even for thousand-face polyhedra, it's not that slow to precompute mass properties.
Re:Microsoft acquires Havok by stavrianos on Sunday October 04, 2015 @01:25PM (#10328103)
If you build a system that can rip off limbs, and then downmod the forces applied until it doesn't do that anymore, you can get realism and ratings both. Step 1 is optional.
Re:Microsoft acquires Havok by rzzzt on Sunday October 04, 2015 @02:36PM (#10328347)
The animation system in the video, Euphoria, is used in quite a few Rockstar titles: http://gta.wikia.com/wiki/Euphoria_Physics
Re:Microsoft acquires Havok by doomlaser on Sunday October 04, 2015 @04:03PM (#10328611)
The Grand Theft Auto series (including V) uses bullet, which is a cross-platform open source alternative: https://en.wikipedia.org/wiki/Bullet_(software)#Commercial_g...

But Havok is clearly the dominant player in AAA

Re:Microsoft acquires Havok by klausa on Sunday October 04, 2015 @05:33PM (#10328911)
They're also (?) using Euphoria: https://en.wikipedia.org/wiki/Euphoria_(software)

I remember this being made a semi-big deal when IV was coming out.

Are they using both, for different parts of physics simulation?

Re:Microsoft acquires Havok by maccard on Sunday October 04, 2015 @04:20PM (#10328663)
Every game released using unity or unreal uses PhysX rather than Havok. Physx has a sizeable market share in AAA games too.
Re:Microsoft acquires Havok by ameen on Monday October 05, 2015 @05:11AM (#10330625)
PhysX is disliked due to it being partial towards Nvidia-based h/w. Also the console SDK (of PhysX) is very compute-intensive and usually not the best solution.
Re:Microsoft acquires Havok by dyoo1979 on Sunday October 04, 2015 @06:52PM (#10329136)
I'm not sure if I'm in the minority, but I find the ragdolls in Dark Souls to be hilarious and charming.

... uh, if rolling around with corpses could be described as hilarious and charming. Wow. I just realized how very strange video games are.

Re:Microsoft acquires Havok by anon4 on Monday October 05, 2015 @03:25AM (#10330339)
The ragdolls in Dark Souls act like that on purpose, precisely because it's funny how they bounce around. They could easily have just disabled interaction with the player (see DkS2), but thought it was hilarious, so left it in. Also, have you seen what happens if you combine a corpse and the dark woodgrain ring? http://i.imgur.com/tRp71Lp.webm
Re:Microsoft acquires Havok by brobinson on Monday October 05, 2015 @03:13PM (#10334080)
That is hilarious. Such a memorable game.
Re:Microsoft acquires Havok by nstart on Sunday October 04, 2015 @08:39PM (#10329407)
That part at 0:54/0:55 where the model side steps the fallen body and then almost trips over is amazingly realistic. Had you shown it to me without telling me what it was , I'd have assumed it was motion capture.
Re:Microsoft acquires Havok by cdr on Sunday October 04, 2015 @06:04PM (#10329020)
> I wish they would tone down how loose the physics on ragdolls

There's more than one "they", of course. You can certainly fault Havok for the default settings being set for impressive demonstrations rather than realistic immersion. But developers certainly deserve a lot of blame for not tweaking the knobs Havok provides to tone it down.

Look at Dark Souls vs Dark Souls II. Both Havok, one with comical ragdolling and one with very reasonable ragdolling (aside from enemy weapons that will launch themselves 30m in the air when the wielder dies, anyway, or stick straight up at a 90% angle).

Re:Microsoft acquires Havok by Narishma on Sunday October 04, 2015 @06:56PM (#10329143)
A lot of people complained when they removed those comical ragdolls in Dark Souls 2, so they added them back in Bloodborne.
Re:Microsoft acquires Havok by brobinson on Sunday October 04, 2015 @06:37PM (#10329083)
True, I was referring to what I assumed to be the default settings that it seems everyone uses. Thanks for clarifying!
Re:Microsoft acquires Havok by zamalek on Monday October 05, 2015 @04:14AM (#10330460)
A few modern games use Euphoria, so far as I recall one of the GTAs does. Euphoria is used when there are CPU cycles to spare and I have come to understand that it virtually never happens on average (console-equivalent) gaming rigs and only up to 4-5 ragdolls at once on top-end machines [at the time].

It's incredibly expensive technology. Possibly the solution is something in-between?

Re:Microsoft acquires Havok by seivan on Sunday October 04, 2015 @05:51PM (#10328967)
Euphoria was used in Star Wars Unleashed. It actually looked much much better than the rag dolls demonstrated in the tech demo.

Use the force to levitate a storm trooper as he grabs his buddy only for both to be smashed to the wall. :)

Re:Microsoft acquires Havok by bitmapbrother on Sunday October 04, 2015 @03:02PM (#10328424)
>A piece of middleware used in seemingly every single AAA game in the last decade...

Is there a citation for this? With more and more game companies using their own graphics engine I would assume they would also use their own physics engine to avoid paying royalties.

Re:Microsoft acquires Havok by brobinson on Sunday October 04, 2015 @04:19PM (#10328658)
Not an exhaustive list, and a bit of hyperbole on my part :-)

https://en.wikipedia.org/wiki/List_of_games_using_Havok