Houdini 21.0 ノード APEXノード

TransformObject

リグ内のトランスフォームの階層を表現/構築します。

On this page
Since 20.0

TransformObjectノードは、エレメントのトランスフォームの挙動(エレメント間のトランスフォーム階層の定義など)を管理します。 他にも、定義されたトランスフォーム順を使って移動/回転/スケールするといったアニメーションさせやすいトランスフォームコンポーネント入力を扱うこともできます。 TransformObjectノードをグラフ内に配置してそれらのパラメータを プロモートさせると (グラフ内のinputノードに接続すると)、 そのTransformObjectエレメントは、Animateステートでピックアップされるようになり、コントロールに変換されます。 要するに、ユーザが操作できるものとして表示されます。 詳細は、コントロールを参照してください。

トランスフォームの構築

TransformObjectノードで表現されるトランスフォームは、いくつかの色々な方法で構築することができます:

  1. 移動、回転、スケールの値をそれぞれ trs のポートに接続する方法。

    この方法だと、そのTransformObjectノードをAnimateステートでコントロールとして操作できるようになります。 trs のどれかのポートをプロモートさせると(グラフ内のinputノードに接続すると)、そのTransformObjectエレメントは、Animateステートでピックアップされるようになり、コントロールに変換されます。 Animateステートに入ると、そのコントロールにハンドルが用意され、そのハンドルを操作すると、それに応じた trs の値が更新されます。

    トランスフォーム順(移動、回転、スケールの処理が適用される順番)は、 xord ポートで設定することができます。

    xord

    トランスフォーム順

    0

    スケール → 回転 → 移動

    1

    スケール → 移動 → 回転

    2

    回転 → スケール → 移動

    3

    回転 → 移動 → スケール

    4

    移動 → スケール → 回転

    5

    移動 → 回転 → スケール

    回転順(X、Y、Z軸による回転の順番)は、 rord ポートで設定することができます。

    rord

    回転順

    0

    X → Y → Z

    1

    X → Z → Y

    2

    Y → X → Z

    3

    Y → Z → X

    4

    Z → X → Y

    5

    Z → Y → X

  2. local ポートでトランスフォームマトリックスを指定する方法。これによって t / r / s のポート接続と同じことができます。

    この方法は、トランスフォームデータが既にマトリックス形式で表現されている場合に役立ちます。 たいていの場合、これは、直接操作またはアニメーションを付けるというよりも、リグロジックでTransformObjectを駆動させる場合に使用します。 また、駆動されるモーションの上にアニメーションを重ねることができるようにするために、 t / r / s のポートが解放されます。

  3. restlocal ポートでトランスフォームマトリックスを指定し、そのトランスフォームマトリックスを使用して、TransformObjectの初期の位置と向きを設定する方法。 t / r / s トランスフォーム、 local トランスフォームは、この座標フレームを基準に適用されます。 実際に、この restlocal ポートは、TransformObjectに対して初期トランスフォームを設定すると同時に、他のトランスフォームポート( t / r / slocal )をアニメーションで使用することができます。

    restlocal の使用例を挙げるとすれば、ジョイント階層で、ジョイントの(親を基準とした)位置と向きを restlocal に格納します。 これでジョイントのRest(静止)トランスフォームを設定することができます。 詳細は、スケルトンからRest(静止)トランスフォームを更新するの説明を参照してください。

  4. xform ポートにワールド空間トランスフォームマトリックスを指定して、 t / r / s ポートや local / restlocal ポートで設定されたローカルトランスフォームを上書きする方法。 そのTransformObjectは xform 入力のトランスフォームに拘束されます。 詳細は、拘束を参照してください。

    デフォルトでは、 xform はトランスフォームのすべてのコンポーネントを上書きします。 xformmask ポートに適切なビットマスクを指定することで、移動、回転、スケールのコンポーネントを組み合わせたトランスフォームを拘束することもできます。 詳細は、トランスフォームコンポーネントの拘束を参照してください。

    xformmask

    適用される上書き

    0

    上書きなし

    1

    移動

    2

    回転

    3

    回転、移動

    4

    スケール

    5

    スケール、移動

    6

    スケール、回転

    7

    スケール、回転、移動

Local transformation

All transformation construction options can be used simultaneously in the process of creating the TransformObject’s local space transformation. The TransformObject uses the following logic to combine the t, r, and s ports with the local and restlocal transformation matrices:

localxform = (scale * local.scale * restlocal.scale) * 
             (local.shear + restlocal.shear) *
             (rotate * translate) *
             (rotate.local * translate.local) *
             (rotate.restlocal * translate.restlocal)

Effectively, the restlocal transformation acts as the parent of the local transformation, and the local transformation acts as the parent of the transform described by the t, r, and s ports. However, the scales and shears of the local and restlocal transformations are combined locally with the scaling of the s port.

Combining the transformations with this logic exhibits useful properties when considering the “rest local transformation” of an object. For example, if the TransformObject represents a prop, the prop’s restlocal transformation could be scaled without affecting its previously animated position. Simultaneously, this behavior avoids unintentional shearing when the prop rotates while non-uniformly scaled.

If the xform port is connected, the local transformation is updated to include the effects of the constraint.

トランスフォーム階層

TransformObjectノードを親子形式で接続することで、トランスフォーム階層を作成することができます。 親子関係は、親TransformObjectノードと子TransformObjectノード間に2本のコネクションを作成することで確立されます:

  • 親TransformObjectノードの xform → 子TransformObjectノードの parent

  • 親TransformObjectノードの localxform → 子TransformObjectノードの parentlocal

xform 出力ポートは、そのTransformObjectのワールド空間トランスフォームマトリックスを生成します。 親TransformObjectノードの xform 出力を子TransformObjectノードの parent 入力に接続することで、その子は親のワールド空間マトリックスにアクセスすることができます。

localxform 出力ポートは、トランスフォームの構築で説明されているすべての入力トランスフォームポートの組み合わせを表現したローカルトランスフォームマトリックスを生成します。 親TransformObjectノードの localxform 出力を子TransformObjectノードの parentlocal 入力に接続することで、スケールの継承が可能になり、その子は親のローカルスケール寄与度にアクセスすることができます。

スケールの継承

親のTransformObjectをスケールさせると、その子もそのスケールの影響を継承します。 様々なリグの挙動を簡素化するために親のスケーリングの効果を調整するのが役立つ場合があります。 そのような場合だと、 scaleinheritance ポートに適切なオプションを設定することで、スケールの継承の挙動を以下のように設定することができます:

0 - デフォルトのスケーリング

スケーリングが親から通常通りに継承されます。

xform = localxform * parent

1 - オフセットのみ

子の位置のみがスケーリングの影響を受けます。

xform = localxform.scale * localxform.rotate * 
        inverse(parentlocal.scale) * localxform.translate * parent

Tip

これは、MayaのSegment Scale Compensationと同様です。

2 - オフセットとスケール

子の位置は、 オフセットのみ オプションと同様にスケールされ、 親のローカルスケールは、子のローカル空間で適用されます。 もし親がX方向に2倍スケールされると、子は自身のX方向で2倍のスケールが適用されます。

xform = parentlocal.scale * localxform.scale * localxform.rotate * 
        inverse(parentlocal.scale) * localxform.translate * parent

localxform = parentlocal.scale * localxform

Tip

これは、Softimageの階層スケーリングと同様です。

3 - スケールのみ

オフセットとスケール オプションと同様に、同じローカルスケーリングが適用されますが、子の移動は影響を受けないままとなります。

xform = parentlocal.scale * localxform * 
        inverse(parentlocal.scale) * parent

localxform = parentlocal.scale * localxform

4 - 親スケーリングを無視

親からスケーリングを継承しません。

xform = localxform * inverse(parentlocal.scale) * parent

TransformObject output ports

Generally speaking, the xform output port, which represents the world space transformation matrix produced by the TransformObject, should be used for most rigging purposes. One exception is that the output localxform should be connected to descendant TransformObjects to support transformation hierarchies.

The remainder of the TransformObject output ports exist to support rig inversion workflows (for example, motion retargeting). Many output ports have common names that could be interpreted in a number of ways, so pay extra attention to the descriptions in the documentation when using these ports.

入力

parent: Matrix4

親のワールド空間マトリックス。 現在のTransformObjectを子として親子関係を確立する場合、このポートを親のTransformObjectの xform 出力ポートに接続してください。

parentlocal: Matrix4

親のローカル空間マトリックス。 現在のTransformObjectを子として親子関係を確立する場合、このポートを親のTransformObjectの localxform 出力ポートに接続してください。

scaleinheritance: Int

子に対する親のローカルスケーリングの影響を制御します。 スケールの継承を参照してください。

xform: Matrix4

TransformObjectのワールド空間での位置、スケール、向きを上書きするトランスフォームマトリックス。 これと xformmask を組み合わせて使用することで、TransformObjectのスケール、回転、移動のコンポーネントを選択的に設定することができます。

t: Vector3

TransformObjectのローカル空間での位置を設定する移動値。

r: Vector3

TransformObjectのローカル空間での向きを設定するオイラー角(単位は度)。 この回転順は、 rord ポートで設定します。

s: Vector3

TransformObjectのローカル空間でのスケールを設定するスケール値。

local: Matrix4

A transformation matrix that serves the same purpose as the t, r, and s ports. The local port allows the TransformObject to be driven by rig logic while simultaneously freeing up the input t, r, and s ports for further animation. local can also be understood as an additional offset for the TransformObject’s restlocal matrix in local space.

restlocal: Matrix4

TransformObjectに対してローカル空間での初期の位置、スケール、向きを適用するトランスフォームマトリックス。 t / r / s 入力や local 入力からのトランスフォームは、この座標フレームを基準に適用されます。

xord: Int

trs の入力/出力ポート両方のトランスフォーム順を設定します。 デフォルトのトランスフォーム順は、スケール → 回転 → 移動です。 トランスフォーム順を参照してください。

rord: Int

r の入力/出力ポートで指定されたオイラー角の回転順を設定します。 デフォルトの回転順は、X → Y → Zです。 回転順を参照してください。

xformmask: Int

トランスフォームの特定のコンポーネントを上書きするために xform マトリックス入力と組み合わせて使用するビットマスク。 1桁目のビットは移動を上書きし、2桁目のビットは回転を上書きし、3桁目のビットはスケールを上書きします。 デフォルトでは、3ビットすべてが設定されています。 xformmaskテーブルを参照してください。

出力

xform: Matrix4

TransformObjectのワールド空間トランスフォームマトリックス。

localxform: Matrix4

TransformObjectのローカル空間トランスフォームマトリックス(例えば、xform = localxform * parent)。

Warning

スケールの継承がデフォルト以外の値を使用した場合、下位の階層に適切に再適用されるようにするために、この localxform は追加の親ローカルスケーリングを考慮して修正されます。 この場合、 localxform は、 実効的なローカルトランスフォーム を表現し、以前のxform = localxform * parentの関係性はもはや正しくありません。 以前のxform = localxform * parentの関係性を維持する localxform を計算したいのであれば、localxform = xform * inverse(parent)の式を使用すると良いです。

restlocal: Matrix4

The combination of the input local and input restlocal transformations (see local transformation). This matrix represents the initial position and orientation of the TransformObject relative to its parent in a transformation hierarchy. Animation on the input t, r, and s ports is applied in this local coordinate frame.

t: Vector3

The translation applied to the TransformObject in its local space by the t input port. When the TransformObject is constrained, t represents the translation that produces animation that is equivalent to the motion of the constraint. This t value can be applied to the input t port of an equivalent TransformObject without the constraint, and produce motion as if the original constraint is baked into the animation.

r: Vector3

The Euler angles, in degrees, applied to the TransformObject in its local space by the r input port. The rotation order respects the input rord value. When the TransformObject is constrained, r represents the rotation that produces animation that is equivalent to the motion of the constraint. This r value can be applied to the input r port of an equivalent TransformObject without the constraint, and produce motion as if the original constraint is baked into the animation.

s: Vector3

The scale applied to the TransformObject in its local space by the s input port. When the TransformObject is constrained, s represents the scaling that produces animation that is equivalent to the motion of the constraint. This s value can be applied to the input s port of an equivalent TransformObject without the constraint, and produce motion as if the original constraint is baked into the animation.

See also

APEXノード