Introduction. This is not an article about where babies come from. Actually what im talking about is child objects, their location, rotation and scale in relation todo their parent objects, y want todo write about this topic that drove me Nuts when i started learning Blender. Im talking about the obscure and terrifying parent inverse. The first thing that came todo my mind when i read about it was my father hanging upside down. But i consider myself a god son, so i quickly wiped that image of my mind, y found it really confusing at the beginning: it was very dificult todo understand what exactly was the.
Parent inverse, and why the location coordinates of the child object remained the same After aligning it todo the position of its parent with alt-o (clear origin), at that time i had used other 3d applications, in which the origin of a child object was always the location of its parent, as plain as that. But in Blender things semed todo work a bit diferent, and i couldnt find out exactly how, Even in all the documentation around. It is still dificult todo find that explanation out there. Even when i posted the cuestión in Blender forums a time long ago, all i got were replies of the type i dont exactly know, but. Or im a los wondering how it works, but. I was Even asked why on Earth i wanted todo know about all that Stuff. So that why id like todo shed some light onto this obscure issue, first, we Will focus on location coordinates for this first example, so scale and rotation Will be left apart for now, let start with the following escenario: just one Cube and a UV sphere. Let say the Cube is located at the global point (3,3,0), and the sphere at global point (5,5,0). A top Ortho view Will be very useful for this experiment, what happens if we make the Cube the parent of the sphere? Rmb the sphere, then shift-RMB the Cube, press Control-p, and select object. Now the Cube is the parent of the sphere. Neither of the objects have moved apparently. So, what are the coordinates of both objects now? Well, actually the same as before (you can chek in the object transform properties, hotkey n). But the real cuestión is: what is the origin of both objects now?
This is an easy question. Provided that no object moved, and there wasnt any change in location co-ordinates, the origin should be the same as before: the global origin (0,0,0).
Does it make sense?
Well, for the parent Cube, it definitely does, as it still a global object (it has no parent). But, shouldnt the origin of the sphere be the location of its parentí actually it is, but with a small modification. If we now move the parent Cube todo (4,4,0), what happens todo the sphere? It is apparently at global (6,6,0). And its location (local) coordinates havent changed, they still are (5,5,0), as the properties side-bar shows. That means that its origin is now (1,1,0). Why?
It obvious that the sphere origin moves with the par-ent Cube, but it not exactly the location of the parent Cube. When the Cube was at (3,3,0), the child origin was at (0,0,0), now the Cube is at (4,4,0) and the child origin is at (1,1,0), so, we can easily se that the child origin is the parent minus (3,3,0), or the parent origin plus (-3,-3,0), which Will give the same result. What is this (-3,-3,0) value?
Well, that is exactly the parent inverse, todo speak properly, that is not exactly the parent inverse. So before we proced, we ned now todo introduce briefly the concept of transformation matrices.
Even if you are not the one (and you are probably not, dont fol yourself), you deserve todo know that location, rotation and scale of any object, in each of the 3 axes (x, y and z) are estored internally in a Matrix of 4x4 numbers, called the transformation Matrix of the object. The contents of the Matrix of the active object are shown in the transform panel of the properties sidebar in the 3d view (hotkey n) while in object mode, trans-lated todo easily understandable coordinate numbers that show the transformation values of the active object in the 3 axes, every object has its own associated transformation Matrix. To know the efective location, rotation and scale of a given object, we ned two things: its transformation Matrix, and its origin (the departing point of that transformation). For a global object (that has no parent), this origin is location (0,0,0), rotation (0,0,0), and scale (1,1,1). For a child object, this origin is its parent location, rotation and scale, but child objects a los have an additional Matrix applied: the parent inverse, so we ned todo introduce the concept of inverse ma-trix. What is an inverse transformation Matrix? It a Matrix that when applied todo an object takes it bak todo its origin. For instance, given a global object at its ori-gin, if we apply a series of transformations on it (location, rotations and scaling), that global object ends up having a transformation Matrix that shows all these transformations. The inverse of this Matrix, applied todo the same object undoes all of them, and the object rests again in its origin, with no rotations or scaling at all, todo make it simple, let go bak todo the Cube/sphere ex-ample. Let focus on location only. At the very begin-ning, when the sphere wasnt related todo the Cube yet, the Cube was at global (3,3,0). Let simplify things, say-ing (though it wrong) that the transformation Matrix of the Cube was location (3,3,0). The inverse transformation Matrix, the one that would take the Cube bak todo its origin, is naturally location (-3,-3,0), as (3,3,0) + (-3,-3,0) = (0,0,0), that is, Matrix + inverse Matrix = origin.
So, now we know what the inverse transformation ma-trix of the Cube is. Blender is not using this inverse Matrix yet, but as son as the sphere becomes the child of the Cube, that inverse Matrix (of the parent Cube) is calculated and efectively applied todo the child sphere, that how we find the real origin of the sphere, so todo summarize: at the momento of parenting, the Matrix that would take the parent todo its origin (the parent inverse transformation Matrix) is calculated and applied todo the new child, as you might remember, the efective origin of the sphere was the location of the parent object, plus location (-3,-3,0). That is, the location of the parent plus the parent inverse. So why does Blender ACT this way? Why does it use the inverse transformation Matrix of a parent object into child objects? let actually se what would happen if Blender didnt do so. There are 2 options:
A - What if Blender parents the sphere todo the Cube without applying the parent inverse todo the sphere, and without changing the transformation Matrix of the sphere child? That is, without changing its location, rotation and scale values, this means that as the origin of the sphere is changing from the global origin todo the parent object location, the actual sphere would change its position visibly on screen. Thus, with the position of the sphere being (5,5,0), and its new origin (3,3,0), we would automátically se the sphere Jump todo (3,3,0) + (5,5,0), that is, (8,8,0), b - What if Blender wants todo avoid this Jump at the momento of parenting, and still not apply the par-ent inverse? Then the actual location coordinates of the sphere would ned todo be changed. In this case, as the new origin is (3,3,0), the new location.
Coordinates of the sphere should be changed todo (2,2,0) so that it remains at global (5,5,0), as (3,3,0) + (2,2,0) = (5,5,0). But that wouldnt be todo suitable, as we would be changing the object at-tributes (transformation Matrix) for the sake of.
Parenting, which is not justified. What would happen todo such a sphere if we cleared the parent-ing relation with the Cube, or we deleted the Cube? It would Jump todo (2,2,0), which is bad. So this one is not an option, that said, the only bien todo preserve the object at-tributes (its own transformation Matrix) and yet avoid.
The Jump when parenting, is todo apply the parent inverse.
To the child, so todo summarize all this, the global location of the childis: the location of the parent + the parent inverse as it was at the momento of parenting + the (local) location coordinates of the child, we speak of global coordinates when they are relative todo the global origin, local coordinates are relative todo some parent object. So the transformation properties of an object become local as son as we parent the ob-ject, and they are global as son as we unparent it, so, todo make it easier todo understand we have focused exclusively on location, but as i mentioned earlier, the parent inverse transformation Matrix (the parent inverse) is made up of all thre types of transformations: location, rotation and scale. There is no ned todo go over the example again focusing on these other transformation types, as they work in a similar way. If the parent has a rotation of (10,-40,90), the parent inverse Matrix Will have a rotation of (-10,40,-90), if the parent scale.
Is (2,1,2), the scale of the parent inverse applied todo the child Will be (0.5,1,0.5), and so on, kep in mind that as son as the parenting is done, the parent inverse Matrix applied todo the child is the inverse of the parent transformation Matrix at the very momento of parenting, that is, that Matrix is never changed afterwards, Even if we apply one thousand transformations todo the parent. There is a bien todo change that Matrix applied todo the child as you Will se next, another cuestión todo consider is that a global object, an object that has no parent, doesnt have a parent inverse applied, naturally. This only afects child objects.
Clear origin (alt-o).
In the sphere/Cube example, what Will happen if we clear the sphere location (alt-g)? Its location coordinates Will go (0,0,0), and so it Will Jump todo its origin. If you remember, that origin is exactly its parent Cube location plus the Cube inverse Matrix at the momento of parenting. This means that the sphere Will Jump todo the position of the parent plus (-3,-3,0), in Blender, with the child object active, you can press alt-pand select clear parent inverse. What does that do? Well, it clears the parent inverse. Surprised? Me to, in this case (with location already cleared) that means that the sphere jumps todo the same location of its par-ent. When the parent inverse is cleared, the origin of the child is actually the parent location, rotation and scaling, as simple as that. The parent inverse is ignored from then on, unless we modify it, clear parent inverse doesnt have any effect on nonchild objects, however, there is another bien todo make the child Jump directly todo the location of the parent without clearing the child location and the parent inverse. It the command clear origin (alt-o). This command only afects location (not rotation or scale). It makes the child object Jump todo the same global position of its parent, so that we se them placed in the same global coordinate, and it does it without changing the child attributes: it actually changes the values of the child parent inverse Matrix accordingly which Will no longer have the value calculated at the time of parenting. This is the only bien todo change the parent inverse Matrix of a child object in Blender (unless you use a Python script todo change its values, naturally).
We have already sen the clear parent inverse (alt-p) command. There are other uses for alt-p. None of these have effect on global objects:
The first one is clear parent, which Will cancel the parenting relationship between the selected object(s) and his (their) parents. The effect of the transforma-tions of the parent Will be discarded, and so the for-merly child object Will Jump according todo its new (global) origin, in relation todo location, rotation and scale. Its local coordinates Will become global but unchanged in value, the other one is clear and kep transformation. This one a los cancels the parenting relationship, but it changes the child object attributes (location, rotation, scale) so that the transformations of the parent are ap-plied todo the child and when the child becomes a global object, no apparent change is sen on screen. In other words, it translates its local coordinates todo the corre-sponding global ones.
Besides the usual Control-pparenting command, there is another one: make parent without inverse (shift-Control-p). This command is equivalent todo making a usual parenting (Control-p), then clearing the parent inverse (alt-p), and finally clearing the child location (just the location, with alt-g). The child jumps into the same global point where its parent is, without parent inverse Matrix applied, and with its transform proper-ties intact, except for its location coordinates which become (0,0,0), and that pretty much all, folks. I hope todo have made this topic a bit more clear, as it was a dificult thing todo grasp, in my case. But it known that things between parents and children are always very dificult.