TUT - Connecting Cables 1

Once we have a piston (see TUT - Jack the Piston in Tips and Tricks) we want to connect the hydraulic cables. This tutorial can serve other things too.
piston cable tutorial

Follow up:

Start by making a sweep-nurb cable using a spline and a profile. In this case I made a two point bezier spline. Of course more points can be used. Then create two null objects. Put them in the hierarchy of the parts you want to connect the cable to.

Now drag the two nulls and the spline in the xpresso editor. Then add two point-nodes. Connect the spline to both object input ports of the spline node. And connect the global position of the nulls to the position port of the spline node. Then you have to enter the index number of the spline, that is always 0 (zero) for the first point and 1 (in this case) for the last point. To be certain of the index number, select the point in the view and go to the structure manager and check the highlighted number.
Now you can animate the objects and the spline will move along with them.
Piston cable xpresso
! One problem can occur in this set-up; when animating the cable lags one frame behind the moving parts. To solve this I put the expresso tag at the highest priority (generators) and at -1 (minus one). Also I prefer to put the xpresso tag at the parent of the hierarchy.
Piston cable xpresso

8 comments

Comment from: Mike Harrison [Visitor] : 2006-03-03 @ 15:39
You said that you could use more than 2 points in the spline if we want to, but I tried that and it doesn't look right, because the middle points in the spline stay where they are. Is there a way using this method to make the middle points "go along with" the end points to make it look more natural?
Comment from: Björn Emcke [Visitor] · http://www.bcemcke.com : 2006-03-21 @ 22:08
Hey Mike,
you could place the middle point of the spline with the help of another null that receives it coordinates from a weighted position of the the other two nulls. Send me an email if you need a quick setup.
Comment from: base80 [Member] Email : 2006-03-21 @ 22:29
I know Bjorn, this wasn't m y first xpresso, thanks anyway.
I try to keep the tuts as simple as possible, just highlighting the basic possibilities and principles.
Comment from: fxi [Visitor] : 2006-09-05 @ 15:06
hi
what do you mean with the weighted position?
Comment from: base80 [Member] Email : 2006-09-05 @ 15:09
hum, ask Björn.
Try the simple method I describe here, it works in most cases.
Comment from: Mark [Visitor] Email · http://www.decoder.co.uk : 2009-06-02 @ 16:26
*****
Great tutorial, just what I was looking for.

I have a model where the layout of connected elements are moved around a lot so to have both the start-point and end-point move with the parents would make life much easier. Using the tutorial example means only the end-point moves with its connected element - anyone know how I can achieve this?
Comment from: base80 [Member] Email : 2009-06-02 @ 18:25
Do the tutorial twice!
Comment from: diga [Visitor] : 2009-09-26 @ 11:23
*****
Thanks!! a real time save solution.

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)