Using Origin To Geometry Vs. Origin To Center Of Mass In Blender

Defining the Difference

The origin in Blender refers to the point of reference for an object’s position, rotation, and scale. By default, the origin is located at the very center of an object’s bounding box. However, Blender allows users to change the origin location to better suit different modeling needs.

“Origin to Geometry” snaps the origin to the average location of all vertices that make up a mesh object. This centers the origin within the physical extents of the 3D model itself. “Origin to Center of Mass” moves the origin to match the calculated center of mass of the mesh volume, based on vertex locations and their respective geometric influence on the overall shape.

Origin to Geometry

Setting the origin to geometry in Blender simply means moving the origin point to the direct center of an object’s vertices, rather than the bounds center. This can be useful for correct rotation and physics simulations.

How to Set Origin to Geometry in Blender

To set the origin to geometry:

  1. In Object Mode, select the mesh object
  2. Open the Object menu in the 3D Viewport header
  3. Choose “Set Origin” > “Origin to Geometry”

The origin point will snap to the exact middle of all the object’s vertices.

Example Code for Setting Origin to Geometry

Here is Python code to set origin to geometry:

import bpy
from bpy import context
 
obj = context.object
 
mean_co = sum((v.co for v in obj.data.vertices), mathutils.Vector()) / len(obj.data.vertices)
obj.location = -mean_co
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')  

This simply finds the average location of all vertices, then shifts the object to align its bounds center on that coordinate, and sets the origin point there.

Origin to Center of Mass

The center of mass refers to the calculated average position of all the aggregated mass points that make up an object. Setting the origin to this point allows correct physics and gravity effects.

How to Set Origin to Center of Mass in Blender

To set the origin to center of mass:

  1. In Object Mode, select the mesh object
  2. Open the Object menu in the 3D Viewport header
  3. Choose “Set Origin” > “Origin to Center of Mass”

This will calculate the object’s mass distribution and set the origin accordingly.

Example Code for Setting Origin to Center of Mass

  
import bpy
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS') 

The built-in operator handles the center of mass calculation internally.

Use Cases and Recommendations

“Origin to Geometry” is useful when modeling, to allow correct rotation around the shape center. “Origin to Center of Mass” improves animation and simulation realism via proper gravity and momentum.

Modeling Scenarios

For modeling organic shapes like humans or animals, setting the origin to geometry aids with pose manipulation and animation blocking. Simple scaled primitive objects may benefit more from bounds-centered origins.

Animation and Physics Scenarios

The center of mass allows physics properties like weight, velocity, and gravity/force interactions to blend and accumulate correctly during animation and simulation. This improves realism.

Recommendations

  • Character meshes – Use origin to geometry
  • Abstract shapes – Use bounds center origin
  • Props with physics – Use origin to center of mass

Frequently Asked Questions

Why does origin choice matter in Blender?

Blender bases transformations like rotation, scale, physics simulation, etc around the origin point. Different origin locations lead to different behavior results.

Can I change the origin later if needed?

Yes, you can set the origin to a different location at any time using the techniques described earlier. Resetting origins does not lose or destroy any data.

Which is better for 3D printing models?

3D printing generally expects triangle meshes to have the origin centered geometrywise. This avoids mesh walls being treated as very thin objects by slicers.

Example Workflow

Here is a step-by-step example of using both origin settings while modeling and animating a wood chair:

  1. Model chair base mesh with origin at bounds center
  2. Set origin to geometry to make posing legs easier
  3. Add rigid body physics to seat, enable gravity
  4. Set origin to center of mass for realistics physics of chair components
  5. Animate falling over, breaking apart properly according to mass

Additional Resources

For more on these topics, refer to:

Leave a Reply

Your email address will not be published. Required fields are marked *