Align To Spline Xpresso

Align to spline is no doubt an expression that most Cinema4D artists will have used at some time or another. The problem with the built in expression is that it is clamped and you can only animate the position parameter from 0% to 100%. If you want the object to loop or wrap around the spline it is not so simple.

align to spline01

Align To Spline Xpresso

There are other solutions available within the application, you could use MoGraph and clone onto a spline. Then use the offset parameter. However in this tutorial, I show you how to build a loopable align to spline expression using just Xpresso. The advantage here is you can use this setup with the most basic install of Cinema4D and also the object is still in it’s original state as it hasn’t been passed through a generator.

align to spline 02

Align To Spline User Data

I show you how to include a tangential option and the addition of a pop-up menu to define the axis you would like to align.

Anyway enough of my waffle. Check out the tutorial below or click through and watch it over on the helloluxx channel on Vimeo



10 Responses to ”Align To Spline Xpresso”

  1. Rovino Says:

    Built!! thanks Tim.
    Is it me or is this only on 1 audio channel? I don’t hear anything on the other channel.

    You kinda lost me on the align to spline object going into the align to spline object.. then I realized that the first “object” is actually the user Data from the Xpresso tag.

    Quick question regarding the modulo math node. (I understand its taking the remainder of the number, internally the math is being calculated from 0 to 1 and not what we think is 0 – 100%. So when you use modulo of 1 you’re getting the remainder of 1.N N being the remainder.) Heres my question.. that range of 0 – 1.. is that taking the full ranger mapper percent of 0% to 20,000%? meaning when you reach 1 on the math node, a re-start your loop, you’ve gone a full 20,000% through the range mapper?

  2. moebius Says:

    what is the tag CV-StopMotion doing? Sounds interesting…

  3. Tim Says:

    CV-StopMotion is a Python tag that was written for me by a very kind and talented member of the Maxon US team. Keep an eye on Cineversity as I believe that it will be offered there for members at some time in the near future. Until it is released I am not at liberty to divulge information on it’s function. I’m sure you can hazard a guess though…

  4. Robert Says:

    How can I fix the rotation of my object on my spline as its going around. It seems that when i gets to a certain spot on my spline it does a little spin. I under stand that this is gimbals lock of some sort. How is this fixed.

  5. Tim Says:

    @Robert You would need to add an up-vector to the setup to stop gimbal lock. There’s a Target preset in the Xpresso pool you might be able to adapt the setup to convert it to an up-vector. (Perhaps something for a later tutorial.)

  6. Nader Says:

    hello Mr. Tim

    my question
    how can i study xpresso
    i do have all tutorials and i bught all your dvds
    but i still can not understand it
    or how it work
    i can not control it
    i just can repeat yout examples in your tutorials .
    but i can not understand it an can not creat anything my by self .
    i just can watch example for something and just did it exactly . i even forget it after watching from first time

    so please i just want you to tell me how can i understand and study it good until i can control it and do any idea in my mind using xpresso tag ?

    thank you so much Mr Tim

  7. bradon Says:

    great Job! the gimbal flip is a real problem though. I have been trying to include a second rail curve to define the up vector, but im not quite getting the results. perhaps a part 2 tutorial?

  8. Drew Says:

    Hi Tim,

    I was wondering how I can add a rail in the xpresso for banking or upvector? Couldn’t figure it out.

    Thanks

  9. Tim Says:

    Hi Drew, perhaps something for a future tutorial (sorry for the late reply, work is crazy busy).

  10. Gianni Says:

    Hi Tim,
    first of all, thanks for sharing knowledge.

    This tutorial is good for understand XPresso, but I don’t figure out why I should make all this stuff when I can easly use the modulo function of Range Mapper to drive the position of the Align To Spline tag (I just used it in my last little animation).

    There’s something I don’t get.

    Sorry for my poor english.
    Bye

Leave a Reply


4 × = twelve