PDA

View Full Version : IK Spline (Maya) in XSI ?


Grampasso
03-04-2003, 09:14 AM
Maya have the toll IK Spline Handle Tool for controlling a skeleton with a curve and CV. In XSI is possible use it? If I want animate a fish or a snake?

ThE_JacO
03-04-2003, 09:18 AM
draw a curve.
create chain from curve.

if, when you move the points of the curve, you want it to always preserve the same lenght just use a set of clusters with center and distance constrains.

Grampasso
03-04-2003, 10:36 AM
Well. I have create a curve, then use Chain from curve And the chain are created, but I want that it preserve the same lenght, but don't work. Can you help me ? I like the manual but I don't found it? I'm a beginner ...

ThE_JacO
03-04-2003, 10:56 AM
of every tag in the curve create a cluster with center.
constrain distance (with cns compensation active) every null to the previous one (with the exception of the first).
when you are done turn cnscompensation off.

there you go, now you can control the curve with the nulls (the curve will keep controlling the chain) and you get a go-with-the-flow effect.

i tend to use this setup a lot for a number of things.

if you have a ridiculous amount of control vertices in your curve then you could want to make a script that makes the grunt work for you (I did).

ThE_JacO
03-04-2003, 12:56 PM
to make a long story short....
create a curve, and with the curve selected run this script:


set oSelList = GetValue("SelectionList")
set oItem = oSelList(0)
strStringedSel = oItem
set oGeometry = oItem.obj
oNumberOf0DGeometries = oGeometry.Nb0D

SetUserPref "SI3D_CONSTRAINT_COMPENSATION_MODE", 1

for i=0 to (oNumberOf0DGeometries -1)
set PrevNull = GetValue("SelectionList")
CreateClusterCenterWithNull strStringedSel & ".pnt" & "[" & i & "]"

if i>0 then
set CurNull = GetValue("SelectionList")
ApplyCns "Distance",CurNull ,PrevNull , true
end if

next

SetUserPref "SI3D_CONSTRAINT_COMPENSATION_MODE", 0


'_________________________________________________'
''''Change the variable below to change the number of bones'''''
'--------------------------------------------------------------'

NumberOfbones = 5
CreateChainfromCurve oItem, NumberOfBones , True



it will do everything you need and once you are done with that you will be able to control a curve that preserves constant lenght with the nulls and the chain will follow.

to change the number of bones in the chain just change the NumberOfBones variable.

if we wanted to do things properly we actually would have to discuss about this approach VS pseudoroots, SCOPs etc.
meanwhile this will get the job done without problems.

btw DO NOT try to learn scripting from that script :)
it's been thrown together in 10 mins during my lunch pause with various snippets fished out from some other scripts i use, it's full of bad habits and it's VBS.

wmendez
03-05-2003, 03:37 AM
You can also try using the Isner Spine.

CGTalk Moderation
01-14-2006, 01:00 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.