Transformation Constraint 自设变换约束
This constraint is more complex and versatile than the other “transform” constraints. It lets you set the location, rotation or scale of an object/bone based on the location, rotation or scale of another, mixing and matching axes as you see fit. An example could be to set a gear’s X rotation based on the Y coordinate of a rail next to it.
The constraint works with input and output value ranges, one for each axis. It first clamps the input value to the Map From range, then offsets and scales it to the corresponding Map To range. This lets you, say, map a Y coordinate in the range (-3m, 3m) to an X rotation in the range (0, 180°).
选项
目标
The reference object to read a transformation property from. If you don’t select one, the constraint’s icon will turn red and it will have no effect.
可查阅 通用约束属性 获取更多信息。
骨骼
If Target is an Armature, you can optionally choose a bone here to use the transformation of that bone instead of the armature object as a whole.
延伸
By default, the input and output values are clamped to the Min/Max values. When you enable Extrapolate, they’re allowed to go beyond these limits. This is illustrated with the graphs below, where the X axis represents the input (Map From set to Min = 1 and Max = 4) and the Y axis represents the output (Map To set to Min = 1 and Max = 2).
目标/所有者
空间之间的标准转换。更多信息请参见 常见的约束属性。
影响
Controls the percentage of effect the constraint has on the object. See common constraint properties for more information.
源至目标的映射模式
The transformation to read from the Target (or Bone).
位置、旋转、比例
要读取的变换类型。
模式 旋转
The type of rotation to use, including different Euler orders, Quaternion, and other Rotation Channel Modes. Defaults to using the Euler order of the constraint owner.
In the Quaternion mode, the channels are converted to weighted angles in the same way as the swing angles of the Swing and X/Y/Z Twist modes.
X/Y/Z 最小、最大
每个轴向的输入值范围。
映射到
要应用于拥有者的变换。
位置、旋转、比例
要应用的变换的类型。
排序 旋转
Which Euler order to use. Defaults to the order of the constraint owner.
X/Y/Z源轴
For each of the three output axes, lets you choose the input axis that it should take its value from. You can select the same input axis multiple times.
最小值,最大值
每个轴向的输出值范围。
混合
指定如何混合约束结果和现有值。可用选项的菜单因转换类型而异。
替换
约束的结果替换现有的值。
相乘 缩放
约束的结果将与现有值相乘。
相加 位置 旋转
约束的值与现有的值相加。
初始前 旋转
The new rotation is added before the existing rotation, as if it were applied to a parent of the constraint owner.
初始后 旋转
The new rotation is added after the existing rotation, as if it were applied to a child of the constraint owner.
Note
由于历史原因,混合 模式在位置和旋转中默认为 添加,缩放中默认为 替换。
When using the rotation of the target as input, whatever the real values are, the constraint will always “take them back” into the (-180 to 180) range. E.g. if the target has a rotation of 420 degrees around its X axis, the values used as X input by the constraint will be:
\(((420 + 180) modulo 360) - 180 = 60 - 180 = -120\)
As such, this constraint is not really suited for transforming an object based on a gear’s rotation. Rotating a gear based on an object’s transformation works fine, however.
类似地,当使用目标缩放变换属性作为输入,无论真正的值是什么,约束将始终使用其绝对值(即对负值取负)。
When a Min value is higher than its corresponding Max one, both are considered equal to the Max one. This means you cannot create “reversed” mappings.
例子
In the following example, we add a constraint to a gear that sets its X rotation based on the Y position of a rail:
目标:轨道物体
映射自:位置
Y 最小值:-3m
Y 最大值:3m
映射至:旋转
X 源轴:Y
X 最小值:0°
X 最大值:180°
By default, the gear will stop rotating if the rail goes outside the (-3m, 3m) range. You can enable Extrapolate to change this.