Jump to content

Weird download impact calculations on mesh upload


JackTheOtterFox
 Share

You are about to reply to a thread that has been inactive for 1880 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

11 hours ago, Beq Janus said:

I do struggle to justify (based on this argument here, the fixed cost for analysed hull physics but again, that's another matter for another day)

Hull physics is volume based while triangle list physics is surface based so it's a completely different principle. I have the impression the HAVOK developers envisioned virtual worlds that used exclusion volumes exclusively and only added basic surface physics as an afterthought when they realized it couldn't always be avoided.

 

11 hours ago, Beq Janus said:

This animation tries to illustrate the problem with an extreme example. In the best case, the physics engine tests 2 triangles for intersection with the ball in order to decide if they collided. In the worst case example here it may have to test up to 1024 triangles, clearly is it a lot more work

This may be nitpicking in this context but I think the engine will only test triangles that are within the colliding object's bounding box. It makes sense to do so and it's the only explanation I can think of why long and narrow triangles can be especially hard on HAVOK.

Edit, since this will be read by people not familiar with the long and complex earleir discussions: There are fourbasic principles for physics analyzis:

Volume based. The physics is defined by a simple 3 dimensional geometric shape. Spheres, cubes, capsules (two halves of a sphere with a cylinder inbetween) and cylinders are relatively easy for the engine to handle this way. Havok's main claim to fame is that they developed a way for the physics engine to handle slightly more complex convex shapes better. (This is why third party viewers made for other grids can't have the analyze function btw. It taps into the core of Havok's chief trick and they don't want others to study and reverse engineer it if they can avoid it.)

Bounding box. The most basic volume physics. Collision body is a cube defined by the outer size limits of the object.

Surface based. Aka plane physics. Essentially the same as mesh, only applied to physical ratehr than visual shapes.

Height field. Can be described (although a bit inaccurately) as surface physics that only works vertically. Often used for the ground.

Second Life uses a physics engine called Havok, developed by and named after an Irish software company currently owned by Microsoft. It cost an arm and a leg and used to be regarded as the best engine on the market. I say "used to be" partly because there's some doubt whether it's on the market at all (Microsoft seems to be a bit reluctant to sell new licenses), partly because AGX may be coming up as a new serious competitor.

Other grids rely on various open source physics engines and opensim supports five different ones, "simple physics", "simple physics with collision volumes", ODE, Bullet and ubODE.

Edited by ChinRey
  • Like 1
Link to comment
Share on other sites

2 hours ago, ChinRey said:

Hull physics is volume based while tringle list physics is surface based so it's a completely different principle. I have the impression the HAVOK developers envisioned virtual worlds that used exclusion volumes exclusively and only added basic surface physics as an afterthought when they realized it couldn't always be avoided.

Yep, I agree, I'm just thinking out loud a bit, and not convinced that there is no scale advantage because (as you note elsewhere) my example is illustrative at best, trying to convey in human terms how much more work it is for them to tell where they collide. It's actually a poor analogy for the problem, I  probably ought to have only subdivided on one axis! However, once the potential collisions have been identified through judicious use of spatial partitions and bounding boxes etc. you still have to check the hulls. This is where I start to suck my teeth a little cos, I dunno...I'm in two minds, yes it's the same amount of work (50 hulls is 50 hulls is 50 hulls) but stretched long and thin by a rescale are they not subject to the same concerns? One day when all the other jobs are cleaned up I'll summon up enough energy to look 😉

 

Link to comment
Share on other sites

1 hour ago, Beq Janus said:

Yep, I agree, I'm just thinking out loud a bit, and not convinced that there is no scale advantage

Drongle once suggested that the high weight of small triangles was a flaw in the way physics weight is calculated. But I once did a test with the same object at different sizes and on that occasion at least smaller and/or elongated copies did indeed cause a measurably higher load on the physics engine. And from a comment Andrew Linden once made, we know Havok struggling even more with height maps than triangle lists which doesn't seem to make any sense at all.

Even ODE, Bullet and ubODE seem to handle surface based physics better than Havok. On opensim we can have complex sculpts with detailed physics, something LL categorically ruled out for SL.

There's definitely something strange with the way Havok handles surfaces but with all the secrecy around the code, it's difficult to say what it is. The only thing that seems clear is that Havok put far more time and effort into handling volumes than surfaces.

Btw, I mentioned AGX Dynamics, do you happen to know anything about it? They do target real-time simulations but it's unclear what that means and it may be for just fairly small systems run by really high powered computers, or possibly only for 2D simulations. If it really can do all it claims to in a complex 3D scene with multiple semi-independent system running simultaneously, it's a killer. It's impossible of course but so was Animats' ragdoll physics 22 years ago so we already know that the impossible is possible in physics simulations.

Edited by ChinRey
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1880 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...