スキン

skinConnectコマンド

作ったジョイントにスキンをするためにはskinConnectコマンドを使用する。
(スキンとはジョイントとジオメトリ(NURBSサーフェース、ポリゴンなど)をコネクトしてジョイントの動きに従ってジオメトリが動いたり、変形したりするようにする機能のことである)

skinConnectのオプション

-maximumInfluences int
スキンの点に最大いくつのジョイントが影響するかを決める。
(デフォールトは5)
-dropoffRate float
この値が大きいほど距離の遠い点におよぶ影響が少なくなる。
(デフォールトは4)

コマンドの使用例1

3つのジョイントにスキンをつけてみる。
インバースキネマティクスのハンドルを操作すると(曲げると)それにつれてシリンダーが変形しながら曲がってゆく。

joint;
joint -p 5 0 0;
joint -p 10 0.5 0;
ikHandle;
cylinder -radius 1.0 -heightRatio 10.0 -sections 20 -spans 6;
move 4 0 0;
skinCluster joint1 joint2 joint3 nurbsCylinderShape1;

コマンドの使用例2

人間を表すジョイントの手足にスキンをつけてみる。

joint -p 0 10 0 -n headJoint;
joint -p 0 8 0 -n neckJoint;
joint -p 2 7 0 -n sholderJoint1 neckJoint;
joint -p -2 7 0 -n sholderJoint2 neckJoint;
joint -p 0 0 0 -n bodyJoint1 neckJoint;
joint -p 1 -1 0 -n bodyJoint2 bodyJoint1;
joint -p -1 -1 0 -n bodyJoint3 bodyJoint1;

joint -p 5 6.8 0 -n leftArmJoint1 sholderJoint1;
joint -p 10 7 0 -n leftArmJoint2 leftArmJoint1;
joint -p -5 6.8 0 -n rightArmJoint1 sholderJoint2;
joint -p -10 7 0 -n rightArmJoint2 rightArmJoint1;

joint -p 3 -5 0 -n leftLegJoint1 bodyJoint2;
joint -p 5 -10 0 -n leftLegJoint2 leftLegJoint1;
joint -p -3 -5 0 -n rightLegJoint1 bodyJoint3;
joint -p -5 -10 0 -n rightLegJoint2 rightLegJoint1;

ikHandle -startJoint sholderJoint1 -endEffector leftArmJoint2 ;
ikHandle -startJoint sholderJoint2 -endEffector rightArmJoint2 ;
ikHandle -startJoint bodyJoint2 -endEffector leftLegJoint2 ;
ikHandle -startJoint bodyJoint3 -endEffector rightLegJoint2 ;

cylinder -radius 0.8 -heightRatio 8.0 -sections 20 -spans 20;
move -6 7 0;
skinCluster -maximumInfluences 5 -dropoffRate 4 leftArmJoint1 leftArmJoint2 nurbsCylinderShape1;

cylinder -radius 0.8 -heightRatio 8.0 -sections 20 -spans 20;
move 6 7 0;
skinCluster -maximumInfluences 5 -dropoffRate 4 rightArmJoint1 rightArmJoint2 nurbsCylinderShape2;

cylinder -radius 0.8 -heightRatio 10.3 -sections 20 -spans 20;
rotate 2.59 5.64 -65.7;
move 3.21 -5.48 0;
skinCluster -maximumInfluences 5 -dropoffRate 4 leftLegJoint1 leftLegJoint2 nurbsCylinderShape3;

cylinder -radius 0.8 -heightRatio 10.3 -sections 20 -spans 20;
rotate 2.59 -5.64 65.7;
move -3.21 -5.48 0;
skinCluster -maximumInfluences 5 -dropoffRate 4 rightLegJoint1 rightLegJoint2 nurbsCylinderShape4;

skinPercentコマンド

skinClusterコマンドによってコネクトされたスキンの各点における重みの値を変更するためにはskinPercentコマンドを使用する。
このコマンドによって、各点におけるジョイントからの影響の度合を細かく制御できる。

skinPercentのオプション

-transformValue string value
stringで表されるジョイントに対する重みの値を指定する

コマンドの使用例1

skinPercent -transformValue joint1 0.2 skinCluster1 nurbsCylinder1.cv[10];

練習

参考


Prev | Next
Home | Contents
abe@injapan.net