Aligning row of boxes to spline ...

Discussions about animating in SOFTIMAGE©
Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Aligning row of boxes to spline ...

Post by Frank1000 » 12 Oct 2012, 12:25

Hi,
how would I go ahead to align a row-of-connected-boxes to a spline that the left and right extent of each box stays on the spline as long as possible ? So when I modify the spline that teh boxes are updated interactively. The rotation axises of the boxes also need to be where the yellow dots are and the rotation is limited to where the orange dots are.

Image

Regards,
Frank

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: Aligning row of boxes to spline ...

Post by Pancho » 12 Oct 2012, 13:43

That shouldn't be too difficult.

You'll need to find the intersections of a circle with the spline to determine the end point of the rectangle. If there is no such node yet, iterations to determine the length from several U values on the spline should get you where you want to be. In case there are several intersection the one with the lowest U value on the spline is the correct one. Positioning the rectangles themselves should be pretty simple as long as everything is flat, but even a 3d spline shouldn't make it more difficult. The start point for the next rectangle is the end point of the former one as long as the spline is moving in one direction. Otherwise you'll need to switch the end point.

A few hours in ICE should do. : -)

Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Re: Aligning row of boxes to spline ...

Post by Frank1000 » 12 Oct 2012, 15:01

autsch ... ICE is where I repeatedly get deeply stranded with ... isn't there another way that works right away ?

Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Re: Aligning row of boxes to spline ...

Post by Frank1000 » 17 Oct 2012, 00:58

... can somebody please help me with this #:-s ?

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Aligning row of boxes to spline ...

Post by Mathaeus » 17 Oct 2012, 08:50

animate panel > skeleton > create chain from curve, with 'constrain' option enabled. You'll probably want to know exact length of curve (enter + shift) adjust path constraint on bones, for rolling.

Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Re: Aligning row of boxes to spline ...

Post by Frank1000 » 17 Oct 2012, 11:50

great, thx !

Frank1000
Posts: 349
Joined: 16 Oct 2011, 12:13
Skype: the2he

Re: Aligning row of boxes to spline ...

Post by Frank1000 » 17 Oct 2012, 12:49

... one problem coming p is that when I animate the curve, then at a certain point the constrained boxes flip over ... is there a solution to avoid the flipping ?


Image

User avatar
Mathaeus
Posts: 1778
Joined: 08 Jun 2009, 19:11
Location: Zagreb, Croatia

Re: Aligning row of boxes to spline ...

Post by Mathaeus » 17 Oct 2012, 13:00

well I think I've mentioned 'rolling'. If entire chain is placed on some imaginary plane, or something close to that, you can enable 2d chain, and set the chain up vector for entire chain - or use something else to adjust up vector. If you want to define rotation by positions in space (like here), you want three positions, two aren't enough.