Author Topic: Physics Phenomenon - Havok4  (Read 11149 times)

Offline Doctor Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 1498
    • View Profile
Physics Phenomenon - Havok4
« on: May 29, 2008, 12:23:55 PM »
bugs in Havok4 have opened it again.

Also, that strange physics phenomenon is due to Havok4, (you know, that one that causes a prim to shoot off wildly)


This topic is splitted from here - Alice
« Last Edit: June 12, 2008, 02:44:23 PM by Alice SParker »
-Doctor Schomer

Acedemician of Cognitex Labs.

Offline An¡mus

  • SP Global Moderator
  • Hero Member
  • ****
  • Posts: 3410
  • Original Schomer
    • View Profile
    • Faz's Wiki user page
Physics Phenomenon - Havok4
« Reply #1 on: May 29, 2008, 12:43:41 PM »

I've seen that happen quite a bit

Offline Achilles Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 1687
    • View Profile
Physics Phenomenon - Havok4
« Reply #2 on: May 29, 2008, 12:53:01 PM »
I assume this won't be fixed at any point before saturday so there isn't much schome can do
My posts are like buses...you wait days for a reply then they all come at once!

Offline Kathy Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 665
    • View Profile
    • My blog
Physics Phenomenon - Havok4
« Reply #3 on: May 29, 2008, 01:33:18 PM »
bugs in Havok4 have opened it again.

Your information is about two weeks out of date. It was fixed again, and the bugs were completely unrelated to Havok4 in the first place.

I haven't had any experience of objects shooting off, except where they're penetrating eachother. In which case the behaviour is intentional.
Meep.

Offline Doctor Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 1498
    • View Profile
Physics Phenomenon - Havok4
« Reply #4 on: June 06, 2008, 01:25:34 PM »
Topper was playing with it; a sphere placed inside two hollowed cubes 'thus generating space between the cubes of a hollow sphere, would shoot off widly. Far enough to throw me a good half a mile! :P


(I really need to stop using imperial and metric, it's getting confusing)
-Doctor Schomer

Acedemician of Cognitex Labs.

Offline Marko Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 631
    • View Profile
Physics Phenomenon - Havok4
« Reply #5 on: June 06, 2008, 04:11:34 PM »
Topper was playing with it; a sphere placed inside two hollowed cubes 'thus generating space between the cubes of a hollow sphere, would shoot off widly. Far enough to throw me a good half a mile! :P


(I really need to stop using imperial and metric, it's getting confusing)

The odd thing is that the forces required to push objects into each other so that they do fly off seem to vary quite a bit- 150m/s seemed to be around the requisite speed in the old physics engine, but only around 50m/s was necessary for lighter cubes.

Offline Kathy Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 665
    • View Profile
    • My blog
Physics Phenomenon - Havok4
« Reply #6 on: June 06, 2008, 06:28:01 PM »
The force is, in fact, totally irrelevant to anything. Not to mention that metres per second is not a unit of force.

This is a result of interpenetration - if you can convince a physical object to penetrate something else, you have created a physically impossible scenario in which two objects exist at the some point. The response of the physics engine is to enter an infinite loop trying to work out what's going on. In order to avoid this, a program running in front of the physics engine resolves the issue by basically throwing the penetrating objects in opposite directions really fast. This resolver changed between 1 and 4 - Havok 1 didn't actually have one, so Linden Lab wrote their own that didn't always work, and thus sometimes let sim crashes through anyway. Havok 4 uses a much better one included in Havok 4 (and, indeed, which cannot be disabled by Linden Lab). As such, the behaviour of interpenetrating objects has changed.

Meep.

Offline Doctor Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 1498
    • View Profile
Physics Phenomenon - Havok4
« Reply #7 on: June 06, 2008, 06:31:19 PM »
Kathy, what would happen to physical stability of the sim entire should the 'interrupter' stop?
-Doctor Schomer

Acedemician of Cognitex Labs.

Offline Kathy Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 665
    • View Profile
    • My blog
Physics Phenomenon - Havok4
« Reply #8 on: June 06, 2008, 06:34:47 PM »
It'd crash sixty seconds after the next time an object hit another too fast.
Meep.

Offline Doctor Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 1498
    • View Profile
Physics Phenomenon - Havok4
« Reply #9 on: June 06, 2008, 06:41:49 PM »
Oh joy!

Another question, could the physics engine be modded to allow for lack of gravity? (I'm thinking a space-sim here)
-Doctor Schomer

Acedemician of Cognitex Labs.

Offline Kathy Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 665
    • View Profile
    • My blog
Physics Phenomenon - Havok4
« Reply #10 on: June 06, 2008, 06:49:48 PM »
I believe so. You can actually make objects that have no gravity acting on them. However, there is no atmosphere, so the end result is that objects tend to end up flying in the same direction forever.
Meep.

Offline Explo Schomer

  • SP Global Moderator
  • Hero Member
  • ****
  • Posts: 2386
  • Nice, eh?
    • View Profile
Physics Phenomenon - Havok4
« Reply #11 on: June 06, 2008, 10:27:43 PM »
Wouldn't you have to individually add an llSetBuoyancy to each object?
'I am the gadfly'-or at least, I'd like to be

Question everything, including this.

Offline Kathy Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 665
    • View Profile
    • My blog
Physics Phenomenon - Havok4
« Reply #12 on: June 06, 2008, 10:36:54 PM »
Basically, yes.

With the upcoming mono runtime, this would have negligible effect on simulator speed. You could just use a HUD to rez objects with the script already inside to make building easier.
Meep.

Offline Marko Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 631
    • View Profile
Physics Phenomenon - Havok4
« Reply #13 on: June 06, 2008, 10:37:26 PM »
The force is, in fact, totally irrelevant to anything. Not to mention that metres per second is not a unit of force.

I referred to forces because that's what I was applying directly to the cubes (or their equivalent, as, as far as I know, instantaneous acceleration is achieved by impulses, which is impossible in RL), and to metres per second because it's simpler to say "around 150m/s" than "an impulse equal to approximately the cube's mass multiplied by around 150". I apologise for being basically incorrect, but I thought it worth it for the simplicity of explanation. It probably wasn't.

Quote
In order to avoid this, a program running in front of the physics engine resolves the issue by basically throwing the penetrating objects in opposite directions really fast. This resolver changed between 1 and 4 - Havok 1 didn't actually have one, so Linden Lab wrote their own that didn't always work, and thus sometimes let sim crashes through anyway.

I recognise this, and the testing I've done was on the old physics engine rather than on Havok 4. Because of various other projects, and the fact that data collection began to be rather less interesting than other stuff, I haven't done thorough tests on the current system (though the basic principles seem at first investigation to be similar)

Offline Kathy Schomer

  • The Hawaiian Shirts
  • Hero Member
  • ***
  • Posts: 665
    • View Profile
    • My blog
Physics Phenomenon - Havok4
« Reply #14 on: June 06, 2008, 10:42:17 PM »
They're exactly the same - I explained them in that post. The only change is in how it decides what to throw where how fast. With the exception of the so-called "Schome Strange Force" - known to the rest of the world as the "physics simulation resolution limitation". In Havok 1, every object had a space of 0.05m which the physics engine saw as part of the object. So objects couldn't get closer than 0.1m apart.

In Havok 4, the same rules apply - except to spheres. The simulator models every object as a collection of triangles in the approximate shape of the object. In Havok 4, this does not apply to perfect spheres, which are modelled as perfect spheres, and behave accordingly. As a result, they do not have this 0.05m imprecision, and will thus hover exactly 0.05m above other objects, or correctly collide exactly with other perfect spheres.
Meep.