v4.0
Creates a quaternion or skeleton spine given four objects: chest control, hip control, chest depth, hip depth.
These four objects define 4 point bezier curve along which the vertebrae are traced. On a skeleton spine the
vertebrae are bones, on a quaterion spine the vertebrae can be implicit or polygon cubes. On a quaternion spine
these four objects also control the spine's curve (each object controls one of the curve's control points).
Optionally a shadow rig can be attached to the arm. Shadow objects are created for each chain element in the
arm, and shadow arm bones are pose-constrained to the acutal arm bones. Shadow rigs can be used to plot
animation off of a rig.
oSpine = MakeSpine( Model, Parent, [NbVertebrae], [SpineType], [Stretchy], SpineBaseObject, SpineTopObject, [BottomDepthObject], [TopDepthObject], [ChestTop], Sliders, [ShadowType], [ShadowParent], [VertebraeName], [CharacterSetName], [ShadowCharacterSetName] ); |
Returns a Spine JScript object.
Parameter | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Model | String | The model the spine will belong to. | ||||||||||||
Parent | String | The object to which the spine will be parented. | ||||||||||||
NbVertebrae | Integer |
The number of Vertebra on the spine. Default Value: 3 |
||||||||||||
SpineType | Integer |
The type of Spine and controls objects used. Default Value: 0
|
||||||||||||
Stretchy | Boolean |
Make a stretchy spine that doesn't clip length. Default Value: True |
||||||||||||
SpineBaseObject | String | Bottom of the spine, should be pointing y+ along the path of the spine. | ||||||||||||
SpineTopObject | String | Top of the spine, should be pointing y+ out from the Curve. | ||||||||||||
BottomDepthObject | String | Goal for a 4 point bezier going through the spine. If empty will be computed automatically. | ||||||||||||
TopDepthObject | String | Goal for a 4 point bezier going through the spine. If empty will be computed automatically. | ||||||||||||
ChestTop | String | (optional) Top of chest goal. If filled, this command uses the spine top as a position reference only and builds an icon from spineTop to chestTop. If empty there is no extra icon on top of the spine, only an implicit cube is used. | ||||||||||||
Sliders | String | A slider PPG to put the spine parameters on. If none is supplied a slider page is added on the spine Curve. | ||||||||||||
ShadowType | Integer |
The type of shadow rig to attach to the spine. Shadow rigs can be used to transfer or remap animation. Default Value: 0
|
||||||||||||
ShadowParent | String | Parent of the shadow rig hiearchy. If empty, no shadow rig is generated. | ||||||||||||
VertebraeName | String |
The name that should be used for the vertebrae. Default Value: "" |
||||||||||||
CharacterSetName | String |
The name of the character set that should be used for this chain; it gets stored in a
Custom PSet for use. Default Value: "" |
||||||||||||
ShadowCharacterSetName | String |
The name of the shadow character set that should be used for this chain; it gets stored in a
Custom PSet for use. Default Value: "" |
/* Makes a spine with 3 vertebrae */ var Base = GetPrim("Null", "Base"); var Top = GetPrim("Null", "Top"); var Depth = GetPrim("Null", "Depth"); var TopDepth= GetPrim("Null", "TopDepth"); var lXfm = XSIMath.CreateTransform(); lXfm.SetTranslationFromValues(0,0,0); Base.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(0,8,0); Top.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(0,2,0); Depth.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(0,6,0); TopDepth.Kinematics.Global.Transform = lXfm; var Spine = MakeSpine( ActiveSceneRoot, //model ActiveSceneRoot, //parent 3, //number of vertebrae 0, //quat spine with polygon vertebrae false, //non-stretchy Base, Top, Depth,TopDepth); DumpSpine(Spine); function DumpSpine(inSpine) { logmessage ("Data in the returned spine object:"); logmessage ("----------------------------------"); logmessage ("Curve : " + inSpine.Curve); logmessage ("TopVertebra : " + inSpine.TopVertebra); if(inSpine.Shadows) { logmessage ("#ShadowObj : " + inSpine.Shadows.count); for(var b=0; inSpine.Shadows && b<inSpine.Shadows.count;b++) {logmessage (" Shadow" + b + ": " + inSpine.Shadows(b));} } logmessage ("#ShadowObj : " + 0); logmessage ("#EnvelopeObj: " + inSpine.Envelope.count); for(var b=0;b<inSpine.Envelope.count;b++) {logmessage (" EnvelopeObj" + b + ": " + inSpine.Envelope(b));} logmessage ("#Vertebrae : " + inSpine.Vertebra.count); for(var b=0;b<inSpine.Vertebra.count;b++) {logmessage (" Vertebra" + b + ": " + inSpine.Vertebra(b));} } //result of running this script //INFO : "Data in the returned spine object:" //INFO : "----------------------------------" //INFO : "Curve : crvlist2" //INFO : "TopVertebra : TopVertebra2" //INFO : "#ShadowObj : 0" //INFO : "#EnvelopeObj: 4" //INFO : " EnvelopeObj0: TopVertebra2" //INFO : " EnvelopeObj1: Vertebra6" //INFO : " EnvelopeObj2: Vertebra7" //INFO : " EnvelopeObj3: Vertebra8" //INFO : "#Vertebrae : 3" //INFO : " Vertebra0: Vertebra6" //INFO : " Vertebra1: Vertebra7" //INFO : " Vertebra2: Vertebra8" |