Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Constant distance using Xpresso

  • Constant distance using Xpresso

    Posted by Jack Cook on March 19, 2008 at 1:44 pm

    I am no Xpresso expert, and I don’t know if this can be done, but here goes:

    I’ve made a cable, using a Sweep object, and the path spline has a number of points along it to which I’ve attached objects, using nulls and Xpresso, so that if I move one of the objects the spline (or cable object it’s attached to) moves with it. There are about 12 objects attached along this cable. Now what I want to do is move the end object along a curve, and have the others follow it, keeping the same distance from each other, without “stretching” the cable. I can do this painstakingly by hand, moving each object at intervals, and trying to keep things even. But I thought maybe this could be done using Distance nodes in Xpresso to calculate the distances between the objects. But then what do I output the results to that will actually keep the distances constant? This is where my tiny brain fails me. Does anybody have any ideas about this?

    thanks,
    Jack

    Jack Cook replied 18 years, 4 months ago 3 Members · 6 Replies
  • 6 Replies
  • Brian Jones

    March 20, 2008 at 4:18 am

    The cable stays straight between the ends?

  • Jack Cook

    March 20, 2008 at 12:11 pm

    No, it has to curve. It represents a mooring cable with oceanographic instruments attached along it’s length. There are floats as well. It lies floating on the surface of the water, and then a weight at the end is dropped, pulling the whole line plus instruments down. But they go down following a sort of curve, straightening out as the whole thing is submerged.

    Jack

  • Mike Smith

    March 20, 2008 at 1:26 pm

    Doesn’t a distance node just output a distance?

    You could have all the objects follow one object at a fixed distance / position by using global position data and a math: add node in vector mode for each follower. You’d have to set up each individual object first, getting the distances from your “leader” as vector data … though it might look a bit mechanical.

    Anyway this set-up might do it – set the math node data type to vector, the constant to add to vector, and fill in the x y z offsets.

  • Brian Jones

    March 21, 2008 at 5:18 am

    if you have Dynamics it can be done like this, assuming it’s somewhat like what you are after.

  • Jack Cook

    March 21, 2008 at 12:14 pm

    Mike,

    I’ll play with this a bit and see if I can understand how it works (Xpresso is like Greek to me, except for a few simple things that I’ve learned to do with it). Thanks.

    Brian,

    This looks very much like what I want to do, with the addition of having the whole thing move downward as it curves down and then straightens out. I think this might work. Now I have to learn dynamics! I’ll give it a go over the weekend and see what I can do.

    thanks,

    Jack

  • Jack Cook

    March 24, 2008 at 12:56 pm

    Brian, I’ve given this a go using my mooring cable and attached objects, and it works. Thank you for your help on this. I read through the Dynamics docs and went through a tutorial I found online, and then I took a look at your file and applied it to mine.

    First I copied my object into a new file and then put Dynamics to it, with the idea in mind of getting it to work, and then copying it back into my animation file. But I found that although I could copy it into my file, dynamics and all, it ended up in a different position and orientation to where I want it to be. When I tried to move it, and rotate it to position it where I want it to be, everything went haywire. Is there a way to take the whole thing with Dynamics applied and reposition it, or do I have to build it in place? I put everything into a null object, and tried rotating that, but it didn’t help at all.

    Jack

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy