Blog | New Possibilities with the Path Animation Tool

With Virtual CRASH 4, you have the option to prescribe the exact trajectories, orientations, and speeds various objects will take as they move through the environment. The best part is, the tool is not limited to vehicles. You can animate any rigid body object, including multibody objects. In this post we’ll review how to use the path animation tool to create a walking multibody as well as a few other use cases.


The Walking Pedestrian

Below, we will work on creating the follow impact scenario:

Before proceeding, it is highly recommended to review the following, as creating a walking multibody requires an advanced skill level:

http://www.vcrashusa.com/guide-chapter13

http://www.vcrashusa.com/guide-chapter20/#Multibody

http://www.vcrashusa.com/guide-chapter20/#Animations

http://www.vcrashusa.com/blog/2018/1/11/practice-with-path-animations-part-1

http://www.vcrashusa.com/blog/2018/5/11/blog-practice-with-path-animations-part-2

http://www.vcrashusa.com/blog/2018/6/7/building-complex-systems-with-joint-tools

We start by placing our multibody model into the scene. We’ve set the height and weight as needed for our case. Using the multibody’s joint selection type, we’ve given our multibody an initial pose stepping forward.

Next, we convert our multibody to a “rigid body” object using the “to rigid body” feature in the “convert” menu.

You will then see your multibody collapse to the ground. You will also notice the multibody object has been converted to a group object which can be opened to access the ellipsoids and joints. Note, once the multibody has been converted to a rigid body, it can no longer be easily posed using the joints. 

Next, stop the simulation (Create > Physics > Stop Simulation) to make it a little easier to perform the next task.

Expand the multibody folder. Next hide the skin “envelope” to reveal the underlying ellipsoids. Press the “{bodies}” group folder icon to open it. This allows you to access the individual group objects (the ellipsoids). Now, select the path animation tool. You should be able to left-click directly on the multibody’s pelvis ellipsoid. Right-click to terminate the animation path. You’ll notice the pelvis ellipsoid has been moved far from the remaining ellipsoids. Don’t worry about this just yet. 
 

Next, left-click on the path animation object in the left-side control panel and open the “sequence” menu. Set “evaluate” to forward (this will allow us to define the animation sequence in forward evaluation). Set “distance offset” to 0. Set “sprint effect” to 0. Highlight all sequence entries in the menu and left-click “remove sequence”. 

Next, move the first control vertex of the animation path to place the pelvis back into the proper position. The easiest way to do this is to first align the pelvis using the top-down ortho view, then use the z position grip to elevate the pelvis above the terrain mesh. Keep in mind, currently, any adjustments made to the control vertex will automatically snap the control vertex to the surface terrain. 

Next, input a jump and a uniform sequence entry. The jump speed was set to 3 mph. The uniform sequence entry distance was set to 16 ft. Re-enable the simulation in order to see the current motion. Note, the multibody object is essentially dragged along the animation path since the joints are not using any joint resistance by default. 

Now, expand the joints menu. Select all of the joints at once. In the “fix orientation” menu, enable “use”. Next to “spring” use the drop-down menu to select “rectangular pulse”. We’re going to force all joints to be rigid at the start of the simulation, then to relax to zero stiffness at the moment of impact. For now, set “period 1” to 3 seconds in the diagram tool as shown below. 

Depending on the complexity of your terrain, you may need to begin inserting additional control vertices so that the multibody follows along the surface without its feet dragging against it.

Now your multibody should be hovering slightly above the terrain surface. Disable the physics simulation once again as you work on the next part.

Next, attach a hinge joint by selecting the hinge joint tool, left-clicking on the pelvis ellipsoid, then left-clicking on the upper leg ellipsoid. Note, when the hinge joint is created, it will have the wrong orientation as the rotation axis is always created aligned with the z-axis.

Now attach another hinge joint to the other side, again first selecting the pelvis and then the upper leg. Here we renamed each joint to correspond to the right or left side of the hip. 

Next, set each joint to parent space mode, and rotate them so that the axis of rotation is along the multibody’s lateral axis. Try to position the center of the joint to the same height as the joint connecting the multibody’s upper leg and pelvis. In this case, we set the joint limits from 0 to 45 degrees, aligning the upper limit of the shaded blue min/max indicator with the initial angle of the right upper leg which is near its maximum swing angle. This simply helps to visualize the range of motion for the upper leg. With the joint z-axis pointing from the multibody’s left to right, as the right upper leg swings back, the joint angle becomes smaller in value. 

Here we’ll elevate the animation path and multibody object further above the terrain surface to ensure there are no accidental interactions as we fine-tune the walking motion.

The joint z-axis is aligned in the same way for the left hip; however, the left upper leg is positioned along the lower limit of the shaded blue min/max indicator. Remember, the blue indicator is not showing the physical limits of absolute rotation angle, but simply indicating angular range for the joint’s change-in-rotation angle with respect to the joint’s initial orientation. Since axis1-min is set to 0 degrees, the joint will not be able to rotate backward (to a smaller angle), but can rotate forward (to a larger value) up to 45 degrees from its initial orientation.  

Now select the joints for the elbows, knees, and hips, and deselect “use” in the “fix orientation” menu. We want these joints to articulate freely. 

Next, we’ll need to dynamically change the axis1-angle in the “fix orientation” menu in order to force the joint to articulate. Left-click on the dropdown menu box next to “axis1-angle” and select “sin”. You’ll see the diagram tool appear. The exact settings you choose at this step will depend on the walking or running speed needed for your case and the height of the multibody (leg length). Here the “period” is set to 1.4 seconds, which is the time needed for the upper leg to go from its starting position, sweep through a change-in-angle given by 2 x amplitude to reach -45 degrees for the right leg, and return back to its starting position at 0 degrees. Here we use an “amplitude” value of 22.5 degrees so that the leg sweeps through an angle of 45 degrees. For the right leg, an “offset x” value of -1 x period/4 and an “offset y” of -22.5 degrees are both needed to ensure that the joint starts at “0 degrees” and swings back to -45 degrees.

For the left leg, an “offset x” value of +1 x period/4 and an “offset y” value of +22.5 degrees are used to ensure that the joint starts at “0 degrees” and swings forward to +45 degrees. Note the same period and amplitude values are used as for the right hip joint. For both the left and right hip joint, it is necessary to set the spring constant in the “fix orientation” menu to a very large value to ensure the joint spring forces the needed amount of articulation. Here we used 10,000. 

Now you should see the multibody executing walking motion. Using the same methods, we will next include arm swing, where we connect hinge joints first selecting the torso then selecting the upper arm. Before introducing arm swing using hinge joints, be sure to disable “use” from the shoulder joints’ “fix orientation” menu. We’ve defined the hinge z-axis direction in the same manner as for the hips. Note, now the right arm will swing in sync with the left leg and the left arm with the right leg. Here we use a 50 degree swing rather than 45 degree for the arms.

If your animation path has abrupt changes in direction, you may find that the swinging lower legs contact one another causing erratic motion. In such cases it may be helpful to increase the knee joint damping constant. If you do so, it’s a good idea to use a step-function to disable the damping constant at the moment of impact. It may also be necessary to decrease the integration time-step size for better stability. 

You should now have a walking pedestrian. 

Spend some time fine-tuning the height of your animation path. This is best done by first selecting both the multibody and the animation path object simultaneously and using the “Restrict to Z” grip. This will adjust the animation path as a whole but keep the pelvis at the same relative height with respect to the animation path and elevate the other multibody ellipsoids as well. This is preferable to adjusting the first control vertex’s z position. Adjusting the first control vertex height will modify the pelvis height without moving the rest of the ellipsoids of the multibody which could cause instabilities. 

Once you are satisfied with the first control vertex’s position, move on to the remaining control vertexes. Adjust the heights of the remaining control vertexes directly using the “z” icon. Try to keep the feet as close to the terrain as possible without making direct contact, which could snag the feet. 

In our simulation, our pedestrian is impacted at about time = 5.857 seconds. Therefore, we’ll have our uniform animation path segment active for 5.857 seconds, after which we use the “off” sequence entry. Upon reaching the “off” sequence entry, the simulator takes over the multibody’s motion based on the last time-step’s data in the animation path. 

We want to terminate the arm and leg swinging motion at the moment of impact. Therefore, we set the braking time at 5.857 seconds for these hinge joints. 

Finally, we want the body to have no joint stiffness at the moment of impact, just as it does for the default multibody object. Selecting one of the joints for the multibody, left-click on the spring dropdown box in the “fix orientation” menu, then press edit. You should see the step function, which we programmed earlier, appear in the diagram tool. All other joints should automatically be highlighted in the left panel of the diagram tool. We set “period 1” to 5.857 seconds, which sets the step function for the spring stiffness value for joint articulation to 0 starting at time = 5.857 seconds. If you set any joint damping constants to stabilize the arm or leg swing motion, you should use a step function to disable the constants at impact as well. 

You should now see the expected behavior of a multibody impact.

One interesting benefit of converting multibodies to rigid body objects is the ability to visualize interposition steps. Simply select the multibody ellipsoids and enable the “step” option. Use “criteria:time” rather than distance. 

Note, the friction and restitution values for the multibody ellipsoids can be set by highlighting the ellipsoids and opening the contact menu.

Be careful. If the user transforms a multibody using the convert > "to rigid body" feature, the friction-body value used for the collision with any other object (such as a vehicle) will be the minimum value of the friction-body values specified for either object. The restitution value used for the collision will be the maximum value of the restitution-body values specified for either object. This differs from the default (unconverted) multibody object, where only the multibody’s friction and restitution values need to be set.

Finally, using the 3D measurement tool, we see our total throw distance is about 134 feet. From Searle, we expect estimated launch speeds of about 44 mph to 57 mph for our multibody, given a ground contact drag factor of 0.8.  Using the diagram tool to graph the torso and pelvis (hip) velocity vs time curves, we see our multibody has a launch speed of 51 to 53 mph, which is consistent with our estimate from Searle. Our vehicle speed at impact is at about 53.5 mph, also consistent with the Searle range.

If you are using the walking pedestrian as part of a predictive model, it is important to compare your results to the default multibody model’s behavior to ensure consistent overall behavior of your rigid body multibody object - take special care to ensure that the elevation of the animated multibody above the terrain mesh at the moment of impact does not significantly change the simulated throw behavior beyond a tolerance you deem acceptable for your case. Additionally, it is essential that you disable joint stiffness and disengage the animation path connection just prior to impact. Of course, as usual, check that your results are reasonable compared to those derived from traditional accident reconstruction techniques.  

If, on the other hand, you do not need a predictive model, but simply want to control the movement of the body, perhaps for an occupant ejection visual aid, you can also continue the animation path as needed to guide the multibody along a pre-specified path. Again, the animation path sequence can be switched off toward the end of the trajectory (in forward evaluation) to provide realistic final motion.


Animated Rider Motion

In the animation below, we see an example of using an animation path to animate the motorcycle rider's body separately from the motorcycle itself. The motorcycle has its own animation path as well. The benefit of this method is that the rider's body can be made to appear shifting, as if the rider is shifting his weight, independent of the motorcycle's motion. Additionally, the rider's feet and hands are coupled to the animated motorcycle object so that they remain in contact until the rider is thrown, at which point the connection is broken. In the image below, we also see that a helmet could be attached to the head ellipsoid since the multibody object was first converted to a rigid body. 

The video is shown below:

Note, by maintaining the animation path connection to a converted multibody, you can dictate how a multibody moves as a projectile. You can even enable the simulation at any moment along the multibody's animated trajectory for added realism. 


Multibodies Attached to Animated Rigid Bodies

You can also attached converted multibodies to animated rigid body objects. This is demonstrated below.

This method is extremely useful for animating rollover sequences resulting in occupant ejection. In such cases, a converted multibody can be held in a fixed position in the occupant cabin using spherical joints. The joint connections can be broken at the moment prior to ejection. This method was used for the following video:


Animated Meshed Multibodies

Multibodies can also be converted to rigid polygon meshes. These can then be converted to standard rigid body objects like any other polygon mesh object. The video below shows how to animate a multibody with this method.