View Full Version : How do I create an ik spline without moving the joints a bit?

06 June 2008, 09:47 AM
How do I create an ik spline without moving the joints a bit?

Iíve tried making the curve with the cv point exactly on the joints and then specifying ikhandle to use it but that also didnít help. is there some magical combination of flags I should be using?

This will kind of illustrate the problem Iím having. The movement is slight when the ikHandle is mad but its enough to give a character a strange posture.

Ok I know this wont be a problem if i bind the mesh after the rig is created. but still would like to know if it is possible.

//create joints
joint -p 0 39.740646 3.09137 -n hip ;
joint -p 0 46.267101 2.523852 -n spine1 ;
joint -e -zso -oj xyz -sao yup hip;
joint -p 0 51.374762 0.707795 -n spine2;
joint -e -zso -oj xyz -sao yup spine1;
joint -p 0 57.106692 0.764547 -n spine3 ;
joint -e -zso -oj xyz -sao yup spine2;
joint -p 0 60.284792 2.183342 -n neck;
joint -e -zso -oj xyz -sao yup spine3;

//create curve
float $hip[] = `xform -q -ws -rp hip` ;
float $spine1[] = `xform -q -ws -rp spine1` ;
float $spine2[] = `xform -q -ws -rp spine2` ;
float $spine3[] = `xform -q -ws -rp spine3` ;
float $neck[] = `xform -q -ws -rp neck` ;
curve -p $hip[0] $hip[1] $hip[2]
-p $spine1[0] $spine1[1] $spine1[2]
-p $spine2[0] $spine2[1] $spine2[2]
-p $spine3[0] $spine3[1] $spine3[2]
-p $neck[0] $neck[1] $neck[2] -n spineCurve;
//create ik
ikHandle -n spineIK -c spineCurve -fj 1 -sol ikSplineSolver -sj hip -ee neck;

06 June 2008, 11:51 AM
Draw a EP curve instead of CV curve. when you draw a EP curve, you draw by EditPoint (EP) instead of CurvePoint (CV). Anyway, you can draw a CV curve and then rebuild their CV's (number of joints - 1), four in your case... and move the EditPoints at joints center...

good luck!


06 June 2008, 01:46 PM

06 June 2008, 01:47 PM
Hi thanks for the reply I tried it out. Iím still getting the small movement in the spine when I create the ikSpline. Iíve settled for binding the mesh after the skeleton is rigged to get round the problem.

06 June 2008, 11:18 AM
create ik spline with auto simplify curve turn off in the option...

07 July 2008, 01:41 PM
as I found out the only good method to get around this is to create a spine of total straight joints. no bending into one or the other direction.
if you think of it, it doesn`t make much sense anyway to create a spine of twisted joints, because you don`t use their rotations anyway. You only touch the control objects.

CGTalk Moderation
07 July 2008, 01:41 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.