Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D objects at end of growing sweep

  • objects at end of growing sweep

    Posted by Steve Bentley on July 30, 2017 at 9:26 am

    I’m sure I haven’t had this issue in the past but here it is drving me nuts.

    An object tied (through xpresso) to the end of a growing sweep and then having that object align to the direction of the path.
    A linear spline or one with very view tangent knots on shallow angles probably wouldn’t be noticed going haywire but wow, when you start cranking the tangents over it gets messy – see file.

    Two issues – the end object drifts off the end (in a kind of exponential kind of way) and I assume this is due to some cubic math required for the tangent knots (if there was a “keep original length” like some of the warpers this might fix itself) So in essence, i’m guessing, the knots stretch the spline between the anchor points, but using the growth attribute of the sweep is probably going to be more linear. I have used a few other nodes to try an compensate but it kind of defeats the purpose.

    Second issue is the wild axial spinning of the object you get, when, what I assume is gimbal lock rotates it about the tangent on the the end point. Is this gimbal lock or some sort of 1 dimensional axial twist that is inherent in any spline with curving tangents? Or is similar to sweeps veering off in unexpected dimensions when you change direction of your spline into a new (and usually third) axis.

    Is there just a better way to do this?

    There’s a method to my madness for doing it this way but I’m sure I could adapt to another method.

    Thanks

    11547_objectsatendofspline.c4d.zip

    Steve Bentley replied 9 years ago 2 Members · 2 Replies
  • 2 Replies
  • Brian Jones

    July 30, 2017 at 4:39 pm

    the discs drifting off can be fixed by checking “Use Uniform Distribution” in the three Spline Operators. The axial spin looks like gimbal lock, yes.
    The gimbal lock can be fixed by using a rail spline in the sweep – a rail can be turned off in the sweep setting so it does not affect the direction and scale but it still gives a guide to fix the axis. I’m sure that can be done in xpresso but I would use the built in Align To Spline expression which has a Rail Path modifier built in.

    11548_objectsatendofspline2.c4d.zip

  • Steve Bentley

    July 30, 2017 at 8:53 pm

    Hey thanks Brian,
    I was trying the uniform point distribution in the spline itself but didn’t think of using it in the node. That should do it.

    I’ll give the rail idea a try – I was trying to avoid this as I’m moving the spline points around so that means I’ll have to manage a bi-rail point system AND the handle tangents and that might be tough to keep them aligned.

    If it is indeed gimbal lock and not some sort of axial twist, I might be able to deal with it since I can change the rotation order. (re the “twist”: as the handles get close to a zero angle I’ve seen some applications of the math where divide-by-zero errors kick in and result in an axial flip flop, but I didn’t know how cinema handled it (ha!) )

    I also thought about approaching the gimbal lock problem with vectors instead of rotation – or am I just climbing up the opposite side of the same tree… er, spline?

    Cheers

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