Blender 3D: Noob to Pro/Practising Good Parenting
|Applicable Blender version: 2.71.|
In 2D drawing programs, you may be familiar with the concept of grouping objects together, so that they can be manipulated and transformed as an indivisible whole.
Blender can achieve a roughly similar effect through its concept of parenting one object to another. (Blender also has a concept called “grouping”, but that serves an entirely different purpose, which will not be discussed here, so don’t be confused.)
Parenting and Unparenting
To parent one object to another is simple: in object mode, select the to-be-child object(s), then select the to-be-parent object, then press+ to bring up the “Set Parent To” menu. The options in the menu have the following meanings:
- Object: set the parent of the rest of the selection to the active (last-selected) object, clearing any existing parent relationships the new-children-to-be may have had. Any objects that were previously parented are reset to their original transformations before that previous parenting.
- Object (Keep Transform): similar to the above, except the children keep the transformations from any previous parenting they may have had.
- Vertex: this allows you to parent a child to a single, currently-selected vertex in the parent (which must be a mesh). You can go into Edit mode on the parent mesh to make the selection before using this option. The child will then track the movements of just that vertex, not the entire object.
- Vertex (triangle): here 3 vertices are selected in the parent mesh. The child tracks, not just their translations, but also their relative rotations as well.
When viewing your scene in Object mode, you will see black dashed lines connecting child objects to their parents. Try moving, rotating or scaling just the parent object, and you can see how the same transformation is automatically applied to its children as well.
To parent multiple children at once to a common parent, select all the child objects in turn, then last of all select the parent object. Now when you do+ , all the objects selected (except the last one) become children of the last one.
A parent of objects may in turn be a child of yet another object; any transformation of its parent will automatically be passed on to it and all its children, and their children, and so on.
To remove a parent relationship: select the child in Object mode, and press+ to bring up the clear-parent menu. The options here are:
- Clear Parent: remove the parent/child relationship, and reset the child to the original transformation it had before the parenting.
- Clear and Keep Transformation: remove the parent/child relationship, but the child keeps its current transformation as a result of the parenting.
- Clear Parent Inverse: this doesn’t actually clear the parent/child relationship, but it sets the transformation of the child relative to the parent to the same as the transformation the child had on its own before it was parented.
Clear Parent Inverse Clarified
Normally, when a parent relationship is set up, if the parent has already had an object transformation applied, the child does not immediately inherit that. Instead, it only picks up subsequent changes to the parent’s object transformation. What happens is that, at the time the parent relationship is set up, the inverse of the current parent object transformation is calculated and henceforth applied before passing the parent transformation onto the child. This cancels out the initial transformation, leaving the child where it is to start with. This inverse is not recomputed when the parent object is subsequently moved or subject to other object transformations, so the child follows along thereafter.
The “Clear Parent Inverse” function sets this inverse transformation to the identity transformation, so the child picks up the full parent object transformation.
The shortcut+ + is equivalent to setting up a parent relationship, followed by Clear Parent Inverse.
Lock Up Your Children!
In the Properties shelf at the right of the 3D view (you can toggle its visibility with), you will see at the top the Transform panel. This shows the overall object transformation (translation, rotation, scaling), but note also the padlock icons next to the transformation fields: clicking each one closes its padlock, locking the corresponding field against further changes, including changes made with the usual object-transformation tools in the 3D view. (If you click a closed padlock, it will open again and remove the lock.)
This can be useful for a child object: if its object transforms are locked, it will still follow changes to transformations on its parent, but it cannot have its transformation changed directly. This can prevent accidents when manipulating an “object” which is actually made up of multiple Blender objects: parent them all to a common root object (e.g. an Empty), and then lock them all, apart from the root object, and so they will transform together by manipulating just the root object, and cannot (accidentally) be separated.
For example, you might construct a car with separate objects for the doors and wheels; these might be left free to rotate (about their hinges and axles respectively), but are otherwise locked in position relative to the car body.
Example: Camera Pan
Imagine you want to make a movie where the camera does a 360° pan right around an object. We’ll leave the details of how to set up an animation for later, but for now let’s just consider how to set up the camera movement.
Start with a new default Blender document. With the 3D cursor at its default location (at the centre), add a new Empty object. It should end up inside the cube, so it won’t be visible; switchto wireframe view, and it should be easier to see.
Selectthe camera; then select + the Empty as well; now + parent the camera to the Empty.
Now selectjust the Empty, and try otating it: notice how the camera follows along? For added fun, switch to camera view (make sure the Empty is still the only thing selected). Now try rotating the Empty: it should look like the cube is rotating in the opposite direction, when it is really the camera moving around it.