Hi, i was wondering if it is possible to link spline knots to objects or dummy helpers? I know one can bake spline knots to an object or particle position, but is it possible to run a script so they are linked? That would lead to the effect that the spline would be controlled by helper objects in realtime, and not neeing to be baked..
Any help is appreciated, just need to know if its possible-
Thanks!
By
Comments (7)
Comment policy
also you could skin the spline to some helpers, if you need more control over the "deformation"
Hey
Yeah you can do this very simple in max. You using the SplineIK Control which links any number of knots that you want to helpers.
hey,
but thats the other way around as i understand it,
doesnt create a spline linked to the objects i already have, or?
if I understand the problem probably then you could also just use Spline IK modifier.
maybe something like this:
(
-- add a dummy
mydummy = dummy pos:[0,0,0] name: (uniqueName "myDummy")
-- draw a line
myspline = splineShape name: (uniqueName "mySpline") wirecolor:(color 255 0 0)
addnewspline myspline
addknot myspline 1 #corner #curve [-20,0,0]
addknot myspline 1 #smooth #curve [0,0,0]
addknot myspline 1 #corner #line [20,0,0]
-- make controllers
for i = 1 to (3*(numKnots myspline)) do
(
animatevertex myspline (i)
)
updateshape myspline
-- change controller type
myspline[#Object__Editable_Spline][#Master][5].controller = Point3_XYZ()
-- assign controller
dCntX = mydummy.position.controller[1].controller
dCntY = mydummy.position.controller[2].controller
dCntZ = mydummy.position.controller[3].controller
myspline[#Object__Editable_Spline][#Master][5].controller[1].controller = dCntX
myspline[#Object__Editable_Spline][#Master][5].controller[2].controller = dCntY
myspline[#Object__Editable_Spline][#Master][5].controller[3].controller = dCntZ
-- testing
test = false
if test do
(
startframe = animationRange.start
endframe = animationRange.end
for t = startframe to endframe do
(
animate on
(
at time t
(
mydummy.position.y = random 0 20
)
)
)
)
)
thanks, thats great, but i need a solution for hundreds of objects:)
but maybe anubis has found the solution
Just select vertex (via Splineselect) and add Linked XForm mod.
Cheers,
d