Copy Transformation

What does it do?

This expression copies the rotation, translation, and/or scaling of one source object onto a target object. Each axis can be handled separately. A factor and an offset can be set for each transformation and each axis. Additionally, a limit can be set for the target values. If a limit exists, a dampening curve can be applied to the target values that makes the target appear to "move slower" towards the limits.

Actually, the source values for each axis of the target can be taken from any axis (and any transformation) of the source, so it is possible to copy the source's H rotation to the target's B rotation, or even the source's X scaling to the target's Z position.

What the Copy Transformation expression can not do is to use several sources and to set the target's values as "inbetween" values. For this functionality, please refer to the Distance tag.

What parameters have to be set?

Attributes of Copy Transformation

First, the source object has to be set. If must be identified either by link, or by a local name search (see the Kinematic Tools page for details). The Active flag will determine whether the tag expression is applied.

Then, there are three sections, one for rotation, translation, and scaling each. Any transformation contains a subsection for each axis. They all work independently, so you could actually equip a target with three Copy Transformation tags, where one tag copies the position from source object A, the second copies the rotation from source object B, and the third tag copies the scaling from source object C. It is even possible to copy the X position from source object A and the Y position from source object B. But keep in mind that you need more than one Copy Transformation tag for that.

The actual values per axis are easy. "Use..." determines whether you want to set that axis/transformation at all. "Source" requires you to select the source axis, the transformation, and the coordinate system (local or global) of the source object. "Target" asks you for the coordinate system (local or global) of the target object. Normally, the axis and transformation is preset to be the same as the target, so an X position in local coordinates will be copied to an X position in local coordinates. But, as mentioned above, you may opt to copy a position to a rotation, if your motion rigging demands it.

The resulting value is multiplied by the factor, and the offset is added to the result. A factor of 1 is a neutral value, as is an offset of 0. These are the preset values. If you need a target that moves twice as fast as the source, then you will want to set the factor to 2; if you want a target that rotates into the other direction than the source, you will want to set the factor to -1, and so on. Using an offset is advisable if you copy all position information for example, so the target will keep a distance to the source and not collide with it. Have a look at the demo scene for some variations of these values.

Demo Copy Transformation tag

If you check the "Limit" checkbox, you will limit the target's values to a range between the Min and Max values. Note that the limit is applied after the factor and the offset, thus it limits the target's possible values, not the source's values! Also, note that each transformation and each axis has its own limit flag and its own Min and Max values, so you may limit the target's X position, but leave its Y position unlimited.

How does the dampening function work?

There are two more fields left: the "Dampen" dropdown and the "Linear Range" value. As you can see, dampening is only available when limits are set, and a linear range is only editable when the dampening is set to Square/Linear.

But what the heck is "dampening" at all?

Normally, the target's values will be calculated in a linear way from the source values; meaning: with the exception of factor and offset, no other parameters influence the target's values. If you move the source for example, the target will follow suit, with a speed that is linear dependent from the source. It may be three times faster or seven times slower, but it will never be two times faster here and twenty times faster there.

That also means that the target will stop rather abruptly at its limits, if limits are set.

Wouldn't it be nice if the target moves slower near the limits, and faster near the point right between the limits? Then, while the source moves with a constant speed, the target would appear to accelerate at the lower limit, then speed towards the upper limit, where it decelerates again.

This is what dampening does. Any values that are copied to the target are "dampened" (they have less impact) when the target is near the limits, and they are "heightened" when the target is near the center.

The following diagram shows what the three dampening functions do. The x axis denotes the position of the source, the y axis denotes the position of the target. The y axis' minimum and maximum values are the Min and Max limits. The x axis' minimum and maximum values are the source's values that are transformed to the target's Min and Max limits. Naturally (since these values are set in the attribute manager), I cannot give a scale or even concrete values for the axes.

Dampening function

The linear curve, shown in green, means no dampening at all. The linear dependency between source and target is preserved.

The blue curve is a sine dampening. The curve is bent over all its range. The target has no zone where it moves lineary.

The red / pink curve is a combination of a linear range (the pink part, a straight line) and a parabolic square function (the red end pieces). Here, the linear range input field comes into play: you set a value between 0.05 and 0.95 (5 to 95 percent) that denotes how "long" the linear range is supposed to be. (0 means: no linear range at all; 100 means: the curve is completely linear. These values are not allowed for computational reasons though.)

Note: While I am using the words "speed" and "acceleration" here to describe what the dampening is supposed to do, please keep in mind that actually the dampening is a static effect, not a dynamic one! You don't need an animation to see the effect. The dampening is calculated from the target's closeness to its limits. You may describe the effect as "the target is reluctant to go to its limits", or "I need more force to push the target to the limits".

Oh yes, and of course the dampening is available for rotation and scaling as well, not only for positions.

What do I have to keep in mind when using scaling?

One final hint on the scaling transformation. Scaling is different from rotation and translation. If you have read the manual (I sure hope you have!), you will have noticed the hint that a scaling matrix, wrongly applied, may distort subordinate coordinate systems. There are even two different tools, the model tool and the object tool, that seem to work the same... except for the scaling!

While modeling, you should use the model tool only, not the object tool. (You may use the object tool in animation... but frankly, using scaling at all causes more trouble than it's worth.) Scaling with the model tool is - no scaling at all! While translations and rotations affect the transformation matrix, scaling with the model tool actually does a resize and moves the points of a polygon object, or the parameters of a parameterized object. It does not use the transformation matrix. (The object tool does, with all the strange consequences.)

The Copy Transformation tag draws all its information from the transformation matrix of an object. That means, an object that was scaled with the model tool has no scaling information that can be used by the tag. Its transformation matrix still tells the tag that the scaling is 1. Only the object tool will set the transformation matrix values in a way that the Copy Transformation tag can evaluate. If you dare to delve into matrix math and transformation logic, you will understand why.

This is an unfortunate inconsistency that has its root in the transformation matrix model. Frankly, I thought about excluding scaling from the tag at all, both as source and target. (With the Distance tag, I offer only translation and rotation!) I finally - and uneasily - decided against it. No one is forced to use the scaling section, and it does no harm if unused. And maybe someone will find a useful application for this mode.

Have fun.


Back to the Kinematic Tools Page

Back to Main Manual Page