G33X Nexus Entertainment

G33X Nexus Entertainment => Precursors => Requiem for Innocence => Current Projects => Bug Reports => Topic started by: Recon on August 02, 2006, 12:42:01 pm

Title: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Recon on August 02, 2006, 12:42:01 pm
Version: 0.3.4 build 967
Reproducibility: Always.

Abstract: Angular Collision causes small asteroids to orbit a point instead of rotating around its axis.


Description:
Strike a small asteroid off center, it start moving but also start orbiting a point that is outside its structure. Seems that instead of spinning around it's center of gravity it will start an orbit around another point!

System:
Windoze XP Pro sp2
Pentium 4 CPU 2.4Ghz
1024 MB Ram.
GeForce 6600 LE ( 8.1.8.5 Driver )

Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Morgul on August 02, 2006, 08:07:24 pm
This is also a known defect. The physics actually are correct in this: the center of mass for that object is the center of the model. When that model was exported, the center of the object was rather far from it's center. However, maybe this bug report will make us a little less lazy... and get us to fix it.
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: ryguy_1617 on August 02, 2006, 10:12:48 pm
Yeah. Maybe.  ;)
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Caenus on August 02, 2006, 10:32:11 pm
You oughta plug in the dimensions into the centroid of mass equations, that'll give you exact coordinates in three dimensional space.
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Rosencrantz on August 03, 2006, 12:50:18 am
I just verified the orbiting. Yeah, it's pretty weird. There some oddities in the mechanics of the way the asteroid was orbitting that I'll have to look at it and think about it some more. I'll post some more on it after that though.

Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Morgul on August 04, 2006, 11:02:43 am
Well as I told you, the center of mass is like 5 meters outside the asteroid.

And, Cae, I'd need to find a plugin for blender that calculates the center of mass.
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Caenus on August 04, 2006, 02:09:11 pm
You find the formula for the asteroid's volume and surface area, and I'll give you the differential equation that calculates centroid of mass.
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Morgul on August 05, 2006, 10:33:13 am
Dude, there isn't one. At least I don't see how... they're pretty arbitrary shapes. I'd need one that I could plug into blender, and get it to figure it out from the mesh data....
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: whitelynx on August 05, 2006, 01:18:38 pm
Actually, I do believe there is an algorithm out there for finding the centroid of a closed polygonal mesh. As long as it's closed, there shouldn't be a huge issue... surface area is calculated by adding the area of each poly, and volume should also be able to be calculated somehow... although I'm not entirely sure how.
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: whitelynx on August 05, 2006, 01:25:30 pm
Sorry for the double-post... a good place to start looking for such algorithms would be in the FlipCode archives: http://www.flipcode.com/articles/index.shtml
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Caenus on August 06, 2006, 08:58:45 am
Worse case scenario, give me an outline of profile and portrait views, I'll construct a 3d representation using Reimann slices and spend all day calculating your centroid of mass. 

It's not nearly as difficult as it seems.
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Morgul on August 06, 2006, 10:37:38 am
Or, we could put the center of mass where it 'feels' right.
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Rosencrantz on August 06, 2006, 07:53:55 pm
Or, we could put the center of mass where it 'feels' right.

A dirty method for that is to find the biggest inner bounding circle, and the smallest outer bounding circle and then pick a nice spot between the two centers of those circles.

EDIT: Replace circle with spheres. That's what I meant anyway.
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Caenus on August 06, 2006, 08:01:00 pm
Note:

the above method must be used on all three axes.
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Rosencrantz on August 17, 2006, 05:04:27 am
Actually I just thought of a method that could be used to find the center of gravity. It's a little heavy on the calculation side but might be able to be made into some sort of blender plugin (I have no idea how those works, so I'm just hoping  ;D  ) Also this will probably only work on regular polyhedral objects I need to figure out a more general way.

For every face on the mesh determine the center of the face and the area of the face. Then, sum all up all of those areas and divide the mass by that total area (to get the mass/unit area). Then use the non-integral form of the center of mass equation with the points as the center of each face and the masses for said points as the mass/area of that face.

EDIT: This might work for non regular polyhedral objects, but I'm not sure on that(perhaps just those that aren't *too* extreme).
Title: Re: Angular Collision causes astroids to orbit ( 0.3.4 build 967 )
Post by: Caenus on August 17, 2006, 06:22:17 am
That might work.  I'll look into some other methods that I have in my repertoire.  I'll bet I could figure something fun out.