What would be the best approach when considering animating a train composition (lokomotive+wagons connected with spherical joint) that moves along a curve.
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.
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?
Simply move each component along the curve, faking the spherical joints?
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.
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.
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.
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.
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.
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.)
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?
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?