Multiple Mesh Single Spline

Hi, can anyone help me create a script that creates a single spline out of multiple mesh? So that the spline is animated if the mesh is as well,
I am trying to create an animated audio wave as a spline, there is a script (FFTMAX) which lets me generate 10-60boxes as an equalizer type effect, where each box is bouncing to a different pat of the frequency, but I cannot create ONE spline out of this.

Script would have to create a knot for each vertice (or pivot point) of all objects, and then bake the keys for each knot so it represents the initial mesh animation.

Thanks for anyone willing to help!
ian

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Graph's picture

you know a bit about ms i

you know a bit about ms i assume so ill just show the way

(
 
	local boxes = $box* as array
	local frameStepping = 1
	local range = animationRange
 
	local theSpline = splineShape ()
	select new_spline ; addNewSpline theSpline
	for b in boxes do addKnot theSpline 1 #smooth #curve b.pos
	updateshape theSpline
 
	--thats the debugging code wich updates live in the vp
	for t = range.start.frame to range.end.frame do
	(
		for k = 1 to boxes.count do (slidertime=t ; with animate on (setKnotPoint theSpline 1 k boxes[k].pos;updateshape theSpline))
	)
 
	--with animate true for t=Range.start.frame to Range.end.frame by frameStepping do at time t for i=1 to boxes.count do (setKnotPoint theSpline 1 i boxes[i].pos;updateshape theSpline)
)

thats how youd theoretically go about that but it wont save the animation so just use the next bit to animate

 /* ANIMATE THE SPLINE */
 animateVertex theSpline #all	   -- gives point3 controllers to all verts, very important!!!
 kc = numKnots theSpline
 for i = animationRange.start.frame as integer to animationRange.end.frame as integer by 10 do (	-- loop over the timeRange
    theTrack = theSpline[4][8]  -- this is the masterblock controller where all point3 controllers live
    local count = 1
    for k = 1 to kc do  -- loop through knots
    (
 	   theTrackIndex = 3 * ( count - 1 ) + 2 -- this subcontroller, every third controller, starting from 2
 	   theKey = addNewKey theTrack[theTrackIndex].controller i -- set key on time i
 	   theKey.value  = [random (-1*i) (1*i),random (-1*i) (1*i),random (-1*i) (1*i)]   -- Set the value!
 	   count += 1
    ) -- end for k
 ) -- end i

by Johan Boekhoven

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.