v4.0
スパイン、左肩、右肩、ヒップで構成される胴体のリグを作成します。胴体は胸、腰、上部ボディのコントロールで組み立てられます。
胴体は、10 または 11 のガイド オブジェクトのコレクションによって定義されます。 はじめの 4 つのガイド オブジェクトがスパインのシェイプを決定します。 次の 6 つのオブジェクトが胴体の側部を定義します(左脚のベース、左肩のベース、左肩の先端、右脚のベース、右肩のベース、右肩の先端)。 11 番目のガイド オブジェクトは、胸のボーンを作成する際に追加することができます。 ヒップ アイコンは脚のベースに配置する股関節に作成され、ヒップの最上部はスパインの最下部に位置づけられます。 1 ボーンの肩は、肩の付け根と先端のガイド オブジェクトによって作成されます。
尻尾を作成するには、MakeTorso を使用してスパインのベース コントロール オブジェクト(ガイド オブジェクト群の 1 番目のオブジェクト)を複製します。 尻尾を作成するには、最低限 3 個のスパイン ベースを複製する必要があります(例を参照)。
oTorso = MakeTorso( Parent, [NbDivisions], [StretchType], GuideObjectCollection, [ControlType], [SpineType], Sliders, [ShadowType], [ShadowParent], [NegativeScale] ); |
胴 JScript オブジェクトを戻します。
| パラメータ | タイプ | 説明 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parent | 文字列 | 胴体の親となるオブジェクト。通常はグローバル SRT です。 | ||||||||||||
| NbDivisions | Integer |
スパインの分割数。 椎の数は、NbDivisions+1 になります。 デフォルト値: 2 |
||||||||||||
| StretchType | Integer |
スパインが胸のコントローラに追従してストレッチするか、一定の長さを保持するかを指定します。 デフォルト値: 0
|
||||||||||||
| GuideObjectCollection | 文字列 | 10 個または 11 個のガイド オブジェクトのコレクション(11 番目のガイド オブジェクトは胸のボーンのターゲットとして使用)。 はじめの 4 つのボーン(1)スパイン ベース、2)スパイン ベースの深度、3)スパインの終端の深度、4)スパインの終端)は、スパイン パスを定義します。次の 3 つは、胴体の左側の外肢を定義します(5)左脚の開始、6)左肩の開始、7)左肩の終端)。さらに次の 3 つは、胴体の右側の外肢を定義します(8)右脚の開始、9)右肩の開始、10)右肩の終端)。 11 番目のオブジェクトはオプションで、胸のボーンの位置を表します。 MakeTorso に含めた場合、この位置の終端にスパインを描画して、その位置とスパインの終端(4 番目のアイテム)の間に胸のボーンを作成します。 | ||||||||||||
| ControlType | Integer |
胸、ヒップ、上部ボディをコントロールするアイコンのタイプ。 デフォルト値: 0
|
||||||||||||
| SpineType | Integer |
使用する頭部アセンブリのスタイル。 デフォルト値: 0
|
||||||||||||
| Sliders | 文字列 | スパイン パラメータを配置するスライダの PPG。 何も指定しないと、スパイン カーブにスライダ ページが追加されます。 | ||||||||||||
| ShadowType | Integer |
アタッチするシャドウ リグのタイプ。 シャドウ リグは、アニメーションを転送または再マップするために使用します。 デフォルト値: 0
|
||||||||||||
| ShadowParent | 文字列 | シャドウ リグ階層の親。 空の場合には、シャドウ リグは作成されません。 | ||||||||||||
| NegativeScale | Integer |
肩の負のスケーリング。 負のスケーリングは、左と右の肩を対称に操作する場合に便利です。 デフォルト値: 0
|
/*
This script builds a collection of torso guide objects
places them and constructs a torso using the makeTorso
command.
*/
var guidecoll = new ActiveXObject("XSI.Collection");
guidecoll.Add( GetPrim("Null", "Guide_SpineBase") );
guidecoll.Add( GetPrim("Null", "Guide_SpineDepth") );
guidecoll.Add( GetPrim("Null", "Guide_SpineEndDepth") );
guidecoll.Add( GetPrim("Null", "Guide_SpineEnd") );
guidecoll.Add( GetPrim("Null", "Guide_LLegStart") );
guidecoll.Add( GetPrim("Null", "Guide_LShoulderStart") );
guidecoll.Add( GetPrim("Null", "Guide_LShoulderEnd") );
guidecoll.Add( GetPrim("Null", "Guide_RLegStart") );
guidecoll.Add( GetPrim("Null", "Guide_RShoulderStart") );
guidecoll.Add( GetPrim("Null", "Guide_RShoulderEnd") );
var lXfm = guidecoll(0).Kinematics.Global.Transform;
lXfm.SetTranslationFromValues(0,0,0);
guidecoll(0).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(0,2,0);
guidecoll(1).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(0,4,0);
guidecoll(2).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(0,6,0);
guidecoll(3).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(2,0,0);
guidecoll(4).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(2,6,0);
guidecoll(5).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(4,6,0);
guidecoll(6).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-2,0,0);
guidecoll(7).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-2,6,0);
guidecoll(8).Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(-4,6,0);
guidecoll(9).Kinematics.Global.Transform = lXfm;
//
// Duplicate the spine base guide to generate a tail.
// At least 3 duplicates are required.
//
var tail0 = GetPrim("Null", "Guide_SpineBase1");
var tail1 = GetPrim("Null", "Guide_SpineBase2");
var tail2 = GetPrim("Null", "Guide_SpineBase3");
lXfm.SetTranslationFromValues(0,0,-2);
tail0.Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(0,0,-4);
tail1.Kinematics.Global.Transform = lXfm;
lXfm.SetTranslationFromValues(0,0,-6);
tail2.Kinematics.Global.Transform = lXfm;
//
// Make the torso
//
var Torso= MakeTorso( ActiveSceneRoot, //parent
3, //# vertebrae
0, //stretch using spine scale
guidecoll, //guide objects
1, //cube controls
0); //quat spine with polygon divs
DumpTorso(Torso);
function DumpTorso(inTorso)
{
logmessage("Data in the returned torso object:");
logmessage("Parent : "+ inTorso.Parent);
logmessage("Spine Curve : "+ inTorso.Spine.Curve);
logmessage("Hip Bone : "+ inTorso.HipBone);
logmessage("Right Effector : "+ inTorso.REff);
logmessage("Left Effector : "+ inTorso.LEff);
logmessage("Right Skeleton : "+ inTorso.RSkel);
logmessage("Left Skeleton : "+ inTorso.LSkel);
logmessage("Spine Vertebrae: "+ inTorso.Spine.Vertebra);
logmessage("Upper Body : "+ inTorso.UpperBody);
logmessage("Hip : "+ inTorso.Hip);
logmessage("Chest : "+ inTorso.Chest);
logmessage("Hidden : "+ inTorso.Hidden);
logmessage("Envelope : "+ inTorso.Envelope);
logmessage("Shadows : "+ inTorso.Shadows);
}
//results from running this script:
//INFO : "Data in the returned torso object:"
//INFO : "Parent : undefined"
//INFO : "Spine Curve : crvlist"
//INFO : "Hip Bone : Hip"
//INFO : "Right Effector : RShoulderRoot"
//INFO : "Left Effector : LShoulderRoot"
//INFO : "Right Skeleton : RShoulder,RShoulderEff,RShoulderRoot"
//INFO : "Left Skeleton : LShoulder,LShoulderEff,LShoulderRoot"
//INFO : "Spine Vertebrae: Vertebra,Vertebra1,Vertebra2"
//INFO : "Upper Body : UpperBody"
//INFO : "Hip : Hip1"
//INFO : "Chest : Chest"
//INFO : "Hidden : SpineStart,SpineEnd,RShoulderRoot,LShoulderRoot"
//INFO : "Envelope : Hip,RShoulderEff,LShoulderEff"
//INFO : "Shadows : undefined" |