v4.0
Creates a spine or skeleton head rig from three guide objects. The guide objects position the base of the head,
the neck and the head. Optionally guide objects can also be passed to generate ears (a form of tail, see
MakeTail ).
Optionally a shadow rig can be attached to the head. Shadow objects are created for each chain element or spine
vertebra in the head, and pose-constrained to these objects. Shadow rigs can be used to plot animation
off of a rig.
A jaw can be generated using MakeHead by duplicating the neck guide object (the second object in the guide
collection). A minimum of 2 neck guide duplicates are needed to generate a jaw (see the example).
If a skeleton style head is used, extra bones can be added to the neck by duplicating the head guide object
(the third object in the guide collection). An extra bone will be created for each duplicate (see the example).
oHead = MakeHead( Parent, GuideObjectCollection, [Prefix], [AssemblyType], [HeadType], [NbDivisions], [StretchType], Sliders, EarGuideCollection, [ShadowType], [ShadowParent] ); |
Returns a Head JScript object.
Parameter | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parent | String | The object to which the new head will be parented. | ||||||||||||
GuideObjectCollection | String | An collection of 3 guide objects, consisting of the base of the head, the neck, and the head. | ||||||||||||
Prefix | String | The prefix used to name new objects when making the new head. Example "L", "R". | ||||||||||||
AssemblyType | Integer |
The style of head assembly to be used. Default Value: 0
|
||||||||||||
HeadType | Integer |
The type of head, used in the creation of box shadows. Default Value: 0
|
||||||||||||
NbDivisions | Integer |
The number of divisions on the neck if a spine head assembly is choosen. Default Value: 2 |
||||||||||||
StretchType | Integer |
Whether the neck spine should stretch automatically to follow the head, or try to maintain a constant length. Default Value: 0
|
||||||||||||
Sliders | String | A slider PPG to put the spine parameters on. If none is supplied a slider page is added on the spine Curve. | ||||||||||||
EarGuideCollection | String | Collection of starting objects for ear spring chains. If empty, no ears are created. | ||||||||||||
ShadowType | Integer |
The type of shadow rig to attach. 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. |
/* This example makes two heads using the same three guide objects. The first head uses a spine, the second head uses a skeleton. */ var guidecoll = new ActiveXObject("XSI.Collection"); guidecoll.Add( GetPrim("Null", "Guide_Base") ); guidecoll.Add( GetPrim("Null", "Guide_Neck") ); guidecoll.Add( GetPrim("Null", "Guide_Head") ); // // Can duplicate the neck guide to generate a jaw. // At least two duplicates are required to create a jaw. // jaw0 = GetPrim("Null", "Guide_Neck1"); //duplicated neck for jaw jaw1 = GetPrim("Null", "Guide_Neck2"); //duplicated neck for jaw 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(1,2,0); jaw0.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(2,2,0); jaw1.Kinematics.Global.Transform = lXfm; // // Make the heads. // var Head= MakeHead( ActiveSceneRoot,//parent guidecoll, //guide objects "ABC", //prefix 1, //spine head and neck 0, //biped head 3, //nb of spine divisions 0); //stretch using spine scale lXfm.SetTranslationFromValues(-4,0,0); guidecoll(0).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-4,2,0); guidecoll(1).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-4,4,0); guidecoll(2).Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-3,2,0); jaw0.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-2,2,0); jaw1.Kinematics.Global.Transform = lXfm; // // Can duplicate the head guide to make a longer head. // head0= GetPrim("Null", "Guide_Head1"); head1= GetPrim("Null", "Guide_Head2"); head2= GetPrim("Null", "Guide_Head3"); head3= GetPrim("Null", "Guide_Head4"); head4= GetPrim("Null", "Guide_Head5"); lXfm.SetTranslationFromValues(-4,5,0); head0.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-4,6,0); head1.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-4,7,0); head2.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-4,8,0); head3.Kinematics.Global.Transform = lXfm; lXfm.SetTranslationFromValues(-4,9,0); head4.Kinematics.Global.Transform = lXfm; // // Make the skeleton head with extended neck // Head = MakeHead( ActiveSceneRoot, //parent guidecoll, //guide objects "123", //prefix 0, //skeleton neck 0, //biped head 3, //nb of spine divisions 0); //stretch using spine scale |