Train composition animation


(IVELIN PEYCHEV) #1

Hi,

I have a theoretical question.

What would be the best approach when considering animating a train composition (lokomotive+wagons connected with spherical joint) that moves along a curve.

  1. Should we place the lokomotive as parent of all the wagons, and create spherical hinge connection. But then how do we say to the wagons to also move along the curve.

  2. Should we use inverse kinematics. But then the last wagon should be the grand-grand parent, and lokomotive should follow the point along the curve. How would you then make all the wagons rotate/translate along with the curve, staying connected simultaneously to the curve and via the spherical joints?

  3. Simply move each component along the curve, faking the spherical joints?

Thanks in advance.


Look Along Curve Normal
Garage door
(Luc Adriaenssen) #2

The use of IK is imperative in case of a train. On Bongo’s website is a page concerning IK (http://bongo.rhino3d.com/page/inverse-kinematics).
It holds a link to a sample model named ‘Simple Roller Coaster’ which might get you on the right track. (http://download.mcneel.com/s3/mcneel/bongo/2.0/samples/en/BongoIK_03.3dm)

I would also recommend you (being a novice) to take a look at my tutorial video ‘Why’s of IK’ (http://bongo.rhino3d.com/video/whys-of-ik).
If questions remain, just ask.


#3

Last I needed to place a complex train to a bend rail way for still rendering. The train based on 7 wagons (blocks). I use the flow along curve and history to get the straight train to the bend railway. The flow option was copy=yes rigid=yes local=no preservestructure=yes.
There was a problem with the connection between the wagons, but this wasn’t visible. Finally I was able to move the straight source curve to fine adjust the position of the bend train. I use the trick often in the past, since moving/animating the simple straight source curve is easier than moving the whole train.


(IVELIN PEYCHEV) #4

Thanks for sharing your experience Micha, unfortunately I do need the train-like animation not just still images. As I get more and more into IK I beginning to think it’s not possible unless you fake the connection between wagons and animate them separately.


(IVELIN PEYCHEV) #5

Hi Luc,

Thanks for the provided info, I checked the sample models. The rollercoaster in particular.

There should be a fix on that, you can’t call a roller coaster when it only moves in the XY plane.

If you move any of the control points of the rail-line vertically. You will notice that the IK fails. I don’t know if this is due to IK limitation, Pre-calculation limiation or wrong methodology, but in theory as I understand it IK should’ve made the calculation so that the wagons continue to follow the track upon it’s change.


(Luc Adriaenssen) #6

It’s a matter of mechanics. In order to follow a 3 dimensional track the hinges should be able to evolve 3 dimensional. If not the train is vertically stiff as a stick.

In BongoIK_03 001.3dm (78.9 KB) I made all hinges “Universal” allowing rotation along Y and Z axes – and the IK-solver finds a nice solution. 2 rotational axis suffice to give the joints enough freedom. Notice there is no telling how IK will make the chariots turn around their x-axis. When you add freedom of rotation around the X-axis you’ll see the chariots even twist more. But then again ‘mechanics’ … in order to control the vertical position of the chariots a second rail is required.


Being very new to Bongo. I was wondering
#7

I tested it here and this is the result. I wrote that I used it for a still image, but it’s easy to use for animation too. Maybe if not useful for your case it’s helpful later for an other user.

OK, the link parts between the wagons are a little misaligned, but I think this can be solved per special trick for this part. It’s a question of the needed link part. Maybe the little misalignment is no problem. I like the simplicity of the solution.

(Simple drag&drop of video doesn’t work at the forum here or? So I add two vimeo links.)

Train.3dm (942.3 KB)


(IVELIN PEYCHEV) #8

Another issue I would like to ask about is, what would be a possible cause to make the IK view tree not display the IK chain even if you’ve set it up?


(Marika Almgren) #9

If the chain is incomplete then it won’t show up, if you’re missing for example the goal.
Are you able to share the model so that we could have a look at it?