Blender 2.8 Updates For Setting Object Origins

Why Set an Object’s Origin

Setting the origin of an object in Blender refers to specifying the coordinate point which acts as the manipulation or transformation center for that object. Setting an appropriate origin location improves precision and control when transforming objects in 3D space. It enables easier rotation and scaling around a specific point, rather than the default coordinates of 0,0,0. There are several key benefits to setting an object’s origin in Blender:

  • Improves precision and control when translating, rotating or scaling an object – With the origin set to a specific corner or face, transformations will always occur relative to that point, allowing precise alignment.
  • Allows better alignment relative to other scene objects – Objects can be precisely lined up by snapping their origins to the same coordinates.
  • Enables easier rotation and transformation around a specific point – For example, setting the origin at the base of a character allows natural rotation relative to the floor plane.

Setting useful origins is an essential productivity technique for arranging objects in Blender scenes. While an object’s origin point defaults to the median coordinate of its contents (0,0,0), transforming relative to this location often gives undesirable results. Specifying custom origins for each object based on its role and location in the scene alleviates this issue, enabling simpler and more accurate object manipulation.

Methods for Setting the Origin

Blender 2.80 provides several convenient methods for setting a custom object origin. The origin can be adjusted directly through the “Set Origin” menu, by manually entering origin coordinates, or using various snapping tools to shift the origin relative to geometry:

Using the “Set Origin” Menu

  • Select the object
  • In Object Mode, open the “Set Origin” menu (in the Tools panel or via keyboard shortcut)
  • Choose one of the preset options like “Origin to Geometry” or “Origin to 3D Cursor”

This menu provides common origin setups like centering the origin on the object bounds or current selection. The “Origin to 3D Cursor” option is especially useful for precision control, since the cursor can be snapped precisely relative to scene geometry prior to setting.

Manually Entering the Origin Coordinates

  • In Object Mode, open the Properties Panel (N key)
  • Under “Transform”, input new coordinates for the Location values
  • The origin for the selected object(s) will be updated

Direct coordinate input allows exact placement for the origin point. The location values can also be set by snapping with other objects to derive coordinates programmatically.

Snapping Directly to Geometry

  • Tab into Edit Mode and select the desired component (vertex, face, etc)
  • With the selection active, Ctrl+Shift+Alt+C to set the origin directly to that element

For organic shapes, snapping the origin to precise face regions is often easier than manually calculating origin coordinates. This method sets the origin precisely to any selection in Edit Mode with hotkey shortcut.

Setting the Origin to the Bottom of an Object

A common task is setting the origin to the base of an object – for example, the feet of a character mesh or the bottom face of a building model. This appropriately sets the rotational axis for animation and behavior. To set the origin to the bottom vertex, face or edge of an object:

  1. Tab into Edit Mode and select the object
  2. Snap the 3D Cursor to the lowest vertex on the object using Shift+S > “Cursor to Selected”
  3. In Object Mode, set the object origin to this point using Object > Set Origin > Origin to 3D Cursor

This simple workflow sets the precise bottom location as the new origin point, allowing easy rotation behaviors relative to the floor plane. The same method can set the origin to the top or other precise geometric features of an object.

Aligning Multiple Objects by Origin

In complex scenes with many assets, ensuring consistent origin alignment is critical for efficiency and accuracy. Objects can be precisely lined up based on shared origin placement:

  1. Use Shift+Select to multi-select the objects to align
  2. In the Snap toolbar, choose “Snap to Active” then check “Snap Origins”
  3. Hover over the target object to set other origins relative to – it becomes the temporary parent or source coordinate system

This allows batch setting origins across numerous objects, perfectly lining up models based on the active selection object. The Snap toolbox also provides alignment to vertices, edges, grid increments, and many other quantized elements with shortcuts like Shift+Ctrl.

Animating Objects Around Custom Origins

With custom origins set on objects, transforms and animations use the new center point by default. This means rotating the object will spin relative to the defined origin:

  1. With origin set as needed per above tools, begin animating as usual
  2. Insert rotation keyframes for the object using “I > Rotation”
  3. At each keyframe, rotate the model around the origin’s axes

The resulting animation will transform naturally around the intended origin point, rather than the default coordinates of 0,0,0. This gives appropriate motion origin points for wheels, joints, weapon barrels or any moving part needing an offset rotation center.

Example Script to Set Origin to Selection

The following Python script demonstrates how the Blender API can set the origin to a selected vertex or face programmatically in Edit Mode:

import bpy
import bmesh

# Get the active mesh
obj = bpy.context.edit_object
me = obj.data

# Get the current selection
bm = bmesh.from_edit_mesh(me)
sel = [v for v in bm.verts if v.select]

if sel:
    # Calculate selection center
    x, y, z = 0, 0, 0
    for v in sel:
        x += v.co.x 
        y += v.co.y
        z += v.co.z
        
    x = x / len(sel)
    y = y / len(sel)
    z = z / len(sel)
    
    # Set custom location  
    obj.location = (x, y, z) 

    # Apply to origin
    bpy.ops.object.editmode_toggle()
    bpy.ops.object.origin_set(type='ORIGIN_CURSOR')

This accepts any vertex or face selection to sample the median coordinates, sets the object location to that point, exits Edit Mode then applies the new origin. The technique can integrate into various tools and workflows to automate custom origin placement.

Common Issues with Origin Setting

Modifying object origins can introduce complexities in some cases or animations. Being aware of certain conflicts can help troubleshoot odd behavior:

  • Origins offset after applying transforms – Non-applied scales, rotations and transformations get applied during the “Apply” operation. So origins may shift position from the expected location.
  • Child objects move incorrectly if parents origin changes – For interlinked objects or hierarchical animation rigs, adjusting the origin for parents while preserving child relationships takes additional steps with advanced parent-child constraints.

Isolating objects before origin edits, clearing parents/constraints or re-parenting after changes may be necessary to avoid compounding errors from origin offsets.

Resetting Object Origins

After extensive origin edits, objects can be returned their initial origin point via a couple methods:

  • Use the Clear Parent operation to detach objects from parents/children while preserving the current origin location
  • Object > Transform > Reset Origins will fully restore the origin location to the default geometry median point
  • Alt+G after shifts from custom origins will reset only the object positional translation, for easy return to the origin point without affecting rotations or scales

Using these reset options cautiously, allowing preview of updates before committing changes, enables non-destructive editing to easily revert unwanted origin shifts.

Leave a Reply

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