DigitalEro Offline

Castanic IK rig script help

Thu, 31 Oct 2013 21:40:36

KaylaN

Not sure if we have the same Castanic as some bones seem to differ, unless those are just a mistake. But anyways here is one that works for me. http://filesmelt.com/dl/rig_biped_castanic_n.py Edit: Also you are using the same bone for both BoneSpine2 and BoneSpine3 which will cause a conflict. And assuming we have the same model it is one to many Spines anyways.
Thu, 31 Oct 2013 12:52:27

yagskie

Does anybody have an working IK rig script of Castanic for SFM to share? I tried making myself a script but still wont work, I really hoping to make a first reverse gangbang rape (Castanics vs 1 male cuffed male). Anyways anyone could take a look at my script below and see whats wrong: #============================================================================================== # Find the dag nodes for all of the bones in the model which will be used by the script #============================================================================================== boneRoot = sfmUtils.FindFirstDag( [ "RootTransform" ], True ) bonePelvis = sfmUtils.FindFirstDag( [ "bone_pelvis" ], True ) boneSpine0 = sfmUtils.FindFirstDag( [ "Bip01-Spine1"], True ) boneSpine1 = sfmUtils.FindFirstDag( [ "Bip01-Spine2"], True ) boneSpine2 = sfmUtils.FindFirstDag( [ "Bip01-Spine3"], True ) boneSpine3 = sfmUtils.FindFirstDag( [ "Bip01-Spine3"], False ) boneNeck = sfmUtils.FindFirstDag( [ "Bip01-Head"], True ) boneHead = sfmUtils.FindFirstDag( [ "ValveBiped.Head"], True ) boneUpperLegR = sfmUtils.FindFirstDag( [ "Bip01-R-thigh"], True ) boneLowerLegR = sfmUtils.FindFirstDag( [ "Bip01-R-Calf"], True ) boneFootR = sfmUtils.FindFirstDag( [ "R_Foot"], True ) boneToeR = sfmUtils.FindFirstDag( [ "Bip01-R-toe0"], False ) boneCollarR = sfmUtils.FindFirstDag( [ "R_spine3" ], True ) boneUpperArmR = sfmUtils.FindFirstDag( [ "Bip01-R-UpperArm" ], True ) boneLowerArmR = sfmUtils.FindFirstDag( [ "Bip01-R-Forearm" ], True ) boneHandR = sfmUtils.FindFirstDag( [ "Bip01_R_Hand" ], True ) boneUpperLegL = sfmUtils.FindFirstDag( [ "Bip01-L-thigh" ], True ) boneLowerLegL = sfmUtils.FindFirstDag( [ "Bip01-L-Calf" ], True ) boneFootL = sfmUtils.FindFirstDag( [ "L_Foot" ], True ) boneToeL = sfmUtils.FindFirstDag( [ "Bip01-L-toe0"], False ) boneCollarL = sfmUtils.FindFirstDag( [ "L_spine3"], True ) boneUpperArmL = sfmUtils.FindFirstDag( [ "Bip01-L-upperarm" ], True ) boneLowerArmL = sfmUtils.FindFirstDag( [ "Bip01-L-forearm" ], True ) boneHandL = sfmUtils.FindFirstDag( [ "Bip01_L_Hand" ], True ) #============================================================================================== # Create the rig handles and constrain them to existing bones #============================================================================================== rigRoot = sfmUtils.CreateConstrainedHandle( "rig_root", boneRoot, bCreateControls=False ) rigPelvis = sfmUtils.CreateConstrainedHandle( "rig_pelvis", bonePelvis, bCreateControls=False ) rigSpine0 = sfmUtils.CreateConstrainedHandle( "rig_spine_0", boneSpine0, bCreateControls=False ) rigSpine1 = sfmUtils.CreateConstrainedHandle( "rig_spine_1", boneSpine1, bCreateControls=False ) rigSpine2 = sfmUtils.CreateConstrainedHandle( "rig_spine_2", boneSpine2, bCreateControls=False ) rigChest = sfmUtils.CreateConstrainedHandle( "rig_chest", boneSpine3, bCreateControls=False ) rigNeck = sfmUtils.CreateConstrainedHandle( "rig_neck", boneNeck, bCreateControls=False ) rigHead = sfmUtils.CreateConstrainedHandle( "rig_head", boneHead, bCreateControls=False ) rigFootR = sfmUtils.CreateConstrainedHandle( "rig_foot_R", boneFootR, bCreateControls=False ) rigToeR = sfmUtils.CreateConstrainedHandle( "rig_toe_R", boneToeR, bCreateControls=False ) rigCollarR = sfmUtils.CreateConstrainedHandle( "rig_collar_R", boneCollarR, bCreateControls=False ) rigHandR = sfmUtils.CreateConstrainedHandle( "rig_hand_R", boneHandR, bCreateControls=False ) rigFootL = sfmUtils.CreateConstrainedHandle( "rig_foot_L", boneFootL, bCreateControls=False ) rigToeL = sfmUtils.CreateConstrainedHandle( "rig_toe_L", boneToeL, bCreateControls=False ) rigCollarL = sfmUtils.CreateConstrainedHandle( "rig_collar_L", boneCollarL, bCreateControls=False ) rigHandL = sfmUtils.CreateConstrainedHandle( "rig_hand_L", boneHandL, bCreateControls=False ) # Use the direction from the heel to the toe to compute the knee offsets, # this makes the knee offset indpendent of the inital orientation of the model. vKneeOffsetR = ComputeVectorBetweenBones( boneFootR, boneToeR, 10 ) vKneeOffsetL = ComputeVectorBetweenBones( boneFootL, boneToeL, 10 ) rigKneeR = sfmUtils.CreateOffsetHandle( "rig_knee_R", boneLowerLegR, vKneeOffsetR, bCreateControls=False ) rigKneeL = sfmUtils.CreateOffsetHandle( "rig_knee_L", boneLowerLegL, vKneeOffsetL, bCreateControls=False ) rigElbowR = sfmUtils.CreateOffsetHandle( "rig_elbow_R", boneLowerArmR, -vKneeOffsetR, bCreateControls=False ) rigElbowL = sfmUtils.CreateOffsetHandle( "rig_elbow_L", boneLowerArmL, -vKneeOffsetL, bCreateControls=False ) # Create a helper handle which will remain constrained to the each foot position that can be used for parenting. rigFootHelperR = sfmUtils.CreateConstrainedHandle( "rig_footHelper_R", boneFootR, bCreateControls=False ) rigFootHelperL = sfmUtils.CreateConstrainedHandle( "rig_footHelper_L", boneFootL, bCreateControls=False ) # Create a list of all of the rig dags allRigHandles = [ rigRoot, rigPelvis, rigSpine0, rigSpine1, rigSpine2, rigChest, rigNeck, rigHead, rigCollarR, rigElbowR, rigHandR, rigKneeR, rigFootR, rigToeR, rigCollarL, rigElbowL, rigHandL, rigKneeL, rigFootL, rigToeL ];
Thu, 31 Oct 2013 22:39:43

yagskie

"KaylaN" said ...
Not sure if we have the same Castanic as some bones seem to differ, unless those are just a mistake. But anyways here is one that works for me. http://filesmelt.com/dl/rig_biped_castanic_n.py Edit: Also you are using the same bone for both BoneSpine2 and BoneSpine3 which will cause a conflict. And assuming we have the same model it is one to many Spines anyways.
IDK but it seems that yours and mike's script wont still wont run, maybe because of the latest update. Do your have their earlier update link? :)
Thu, 31 Oct 2013 23:03:44

KaylaN

Is it throwing errors or is it simply not working? Because if you have already tried to attach a faulty rig to a model it will essentially "corrupt" the AnimationSet name of the model in the scene, unless you undo or rename the AnimationSet before applying another one. EDIT: Downloaded the 2.2 version and one bone name was changed from the version I had, "Bip01-Spine" was changed to "bone_Pelvis". http://filesmelt.com/dl/rig_biped_castanic_V2.2_.py
Fri, 01 Nov 2013 00:58:13

yagskie

"KaylaN" said ...
Is it throwing errors or is it simply not working? Because if you have already tried to attach a faulty rig to a model it will essentially "corrupt" the AnimationSet name of the model in the scene, unless you undo or rename the AnimationSet before applying another one. EDIT: Downloaded the 2.2 version and one bone name was changed from the version I had, "Bip01-Spine" was changed to "bone_Pelvis". http://filesmelt.com/dl/rig_biped_castanic_V2.2_.py
Yeah, it worked now, I just reedited your script and change the pelvis part and named it according to the model's pelvis. THanks Kaylan