how to determine object's center of mass?

Hello :slight_smile:

I need to determine the center of mass of an object. Do you know of a script doing this? I suppose it’s not a trivial task to do it manually.

In this particular case I need the center of mass in order to determine if the object will stand in the real world, after it has being materialized in one way or another.
So far I tried using Blender Game engine making a plane of static physics type for the ground and making my object a “Rigid Body”, but it doesn’t help, because it is highly dependent on the object origin. It obviously assumes that the origin is placed on the center of mass…

Tried Google, but nothing useful, please help!

If the object is of uniform density you can set the origin to the objects centre of mass using the Origin button in toolshelf

Oh, I never looked at the toolshelf for this. I am used to Object -> Transform menu and this option is not present there, nor in the snap (Shift S) menu, but it should be.

So “uniform density” means uniform polygonal density, not the density of the material the object may be built of - for example a single homogeneous material like plastic or steel, right? In my tests the “Origin to Center of Mass” is affected by polygonal density. On one of the test I managed to get quite large shift, but can’t reproduce it. On other tests I ran subdividing a portion of the object leads to only minimal shifts in the center of mass, so this option works well for my purpose.

Thank you very much, I have learned something new.

Do you think I should submit a bug report about this option missing from the Object -> Transform menu?

I wouldn’t rely too much on ‘Center of Mass’ being correct.
Just try doing a Cone with many edges to get closer to a cone shape.
Center of mass of a cone is xc = h/4
It is about 8% off.