Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Train animation problem

  • Train animation problem

    Posted by Richard Quinn on February 23, 2009 at 7:35 pm

    Hi,

    I have made a 3-D train engine and its carriages/wagons. I want the carriages to follow the engines movement along a spline/path.

    At the moment I have attached the engine to a circular spline with the align to spline tag. If I make the carriages/wagons the child of the engine they just stick out and do not follow the path.

    If I give all the carriages/wagons the align to spline tag they become separated along the path.

    It there an xpresso tag or something to tell all the carriages to follow the movement of the engine thus creating a realistic train movement.

    Any help would be really appreciated.

    Cheers,

    Rich

    Richard Quinn replied 17 years, 5 months ago 3 Members · 9 Replies
  • 9 Replies
  • Brian Jones

    February 23, 2009 at 11:23 pm

    Try setting the spline’s Intermediate Points to Uniform, that should help with the train and cars separating while moving along the spline.

  • Richard Quinn

    February 23, 2009 at 11:48 pm

    Thanks Brian,

    That did the trick, however can I ask you another question related to this.

    If I was to add the rubber join that goes between train cars. What would be the best way to get this to bend with the spline path it is following? ie The cars are rigid and follow the path and the rubber join between the cars bends as the cars go around a corner.

    Any advice would be appreciated.

    Cheers,

    Rich

  • Brian Jones

    February 24, 2009 at 2:50 am

    Here’s a test, simplistic train with a loft made from rectangles constrained to the cars for the connector… too simple probably but maybe a direction to go.
    Of course real trains don’t rotate around their centers they are locked to the track at the front and back wheels (playing with that now for amusement since I’ve never tried it before) but tracks don’t bend that much either in reality…

  • Richard Quinn

    February 24, 2009 at 10:48 am

    Thanks Brian,

    I’ll keep ya posted on my bendy trains!

    Cheers,

    Rich

  • Randy Johnson

    February 24, 2009 at 1:42 pm

    nice solution Brian.

    If you want to loop them around you can use expresso to replace the align to spline tag.
    And if banking is an issue that is also a straight forward expression. Both are explained well on Base 80’s site:

    https://www.base80.com/index.php/2006/01/19/banking_bike_tut_quick_and_dirty#more106
    https://www.base80.com/index.php/2007/01/29/align_to_spline_xpresso

    /randy

  • Richard Quinn

    February 24, 2009 at 5:10 pm

    Thanks Randy,

    That’s a really useful website. As soon as I have managed to implement Brians animation onto my model I will try to do the expresso for the continuous looping.

    Thanks again,

    Rich

  • Richard Quinn

    March 3, 2009 at 9:36 pm

    Hi Brian,

    My train has now turned into a bus but I am having a problem constraining the join between the bus front and rear using the method you suggested.

    If you have a spare moment could you tell me what I need to do to make the centre joint not act like elastic.

    Cheers,

    Rich

  • Brian Jones

    March 4, 2009 at 4:01 am

    If I’m interpreting correctly it’s a math problem in your expression. The bus parts are closer together than in the train (starting at 1% and 0% of travel on the spline) – the expression is meant to keep the second one following the first minus some amount, so the expression needs to keep the trailer behind the head by one percent in this case. So the math subtract should be .01 because in the expression the percent along the spline uses 0 -> 1 not 0 -> 100 so 1/100th is .01. right now it’s at .05 so it wants to be 5% behind not 1%.

  • Richard Quinn

    March 4, 2009 at 12:18 pm

    Thanks again Brian for your help. That did the trick.

    Cheers,

    Rich

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