Chapter 9 | Animations


Path Animation Tool

 

Creating an Animation Path

Virtual Tutor: Go to help > animation path > create to learn more about creating animation paths.

You can easily create animations with Virtual CRASH for Public Safety. To access the animation tool, simply go to Create > Animation > Animation Path (see below).

Next, hover your mouse over the vehicle you would like to animate. When the vehicle turns light blue in color, simply apply a single left-click.

As you move your mouse through the project environment, you will notice the linear vehicle path rotate accordingly in response. The first control vertex (CV) will be placed at the position of your first left-click.

Next, left-click along the path you would like your vehicle to follow. Each left-click will create a control vertex (CV) for the animation spline path. Issue a right-click to create the final CV and terminate path creation. After the path is created, you can left-click and drag to adjust the position of each control vertex parallel with the x-y plane. Note, just as with polylines and other CAD elements, you will not see the CVs unless your mouse cursor control is in “Select, Move And Manipulate” mode.

You can create additional CVs by hovering your mouse over the black lines between CVs. A “+” icon will appear (red circle below).

Simply left-click on the “+” icon and drag the new CV to the desired position.

To delete a CV, hover your mouse over the CV and left-click on the “X” icon (red circle below).

To translate and rotate the whole animation path at once, use the translation and rotation grips. These can be accessed by switching to one of the “Restrict To” modes (see Chapter 3).  

Setting Vehicle Orientation

Virtual Tutor: Go to help > animation path > interpositions to learn more about setting animated object orientations.

The orientation of the vehicle can be set at any arbitrary point along the animation path. To set the vehicle orientation, simply select the animation path, then left-click on the “interpositions” selection option (see below).

Next, hover your mouse over the animation path at the position you wish to input a new orientation. Left-click and hold on either the x (roll axis), y (pitch axis), or z (yaw axis) and drag your mouse to rotate the vehicle about one of those axes. As you move your mouse, you can read off the orientation data in the bottom left (blue box below). Pressing the “X” icon will remove this entry. You can also access and modify the interposition data in the “interpositions” menu in the left side control panel (red box below). Note, the yaw, pitch, and roll angles are set as a function of distance traveled along the animation path, not as a function of time.

You can add as many interpositions as needed. Virtual CRASH for Public Safety will interpolate the orientation data between interpositions for a smoothly changing animation.

An interposition’s location can be modified interactively by left-clicking and dragging the translation grip (red circle below) or by entering in the left-side control panel the distance along the path at which the interposition is to be placed (red box below). This is very helpful with fine-tuning the position at which the vehicle is to take on “key” orientations.

By default, a vehicle’s yaw orientation will automatically adjust to match the direction of the animation path curve. This option can be disabled by deselecting the “follow path” in the interpositions menu. This feature can be set independently for each interposition entry. In the figure below, the blue vehicle has the follow path option enabled, and the red vehicle has the option disabled. You will typically want to disable follow path when a vehicle abruptly changes or reverses direction, such as just after impact, since the orientation becomes decoupled from the trajectory itself. Note, the figures below were created using Virtual CRASH 4, which has the same path animation user interface as Virtual CRASH for Public Safety.

Virtual Tutor: Go to help > animation path > follow path to learn more about the follow path interpositions option.

Modifying the Path Attributes

By default, the animation path uses a smooth spline cv curve (see below). This can be adjusted in the animation path’s “misc” menu.

Using the type drop down menu, the animation path can be forced through the CVs (see below). Note, increasing the “steps” value increases the smoothness of the spline path.

Deselecting “smooth” will disable spline fitting, forcing the vehicle to follow the underlying polyshape.

Animation Sequences in Backward Time

Virtual Tutor: Go to help > animation path > sequences to learn more about using animation path sequences.

When an animation path is created, a default set of sequences is used as a template. These sequences are easily deleted or modified. The sequences for the animation tool by default are evaluated in “backward time”, therefore in the default templated sequences, the vehicle is first assumed to decelerate over a distance of 16.404 ft at a deceleration rate of 25.919 ft/s2. This implies an entry speed of 19.882 mph going into this final deceleration sequence. Going backward, the next entry is of type “speed  change”, which is an instantaneous speed change that is useful to animating collision events. The speed change here is -3.107 mph. This implies an entry speed of 22.989 mph (3.107 mph + 19.882 mph) going into the speed change sequence. This backward evaluation continues until the first sequence type “reaction” which has a duration of 0.8 seconds. The implied initial speed of the full animation sequence based on this backward-time evaluation is 32.161 mph. Virtual CRASH for Public Safety gives a unique way of viewing the sequence types used as well as the animated speeds via the speed graph which is plotted on top of the animation path. The speed values are shown at each position where the transition occurs from one sequence entry to the next (red boxes below). The graph is shaded yellow for uniform motion, red for deceleration, and green for acceleration.    

The sequence entries can also be visualized within the simulation environment by left-clicking on the sequences selection option. 

New sequence entries can be placed on the animation path simply by pressing the “add sequence” button. Use the “type” dropdown menu to select which sequence type is to be used. Note, as you change any of the input parameters to the various sequences, your animation results update in real time.

Synchronizing Animation Paths

Virtual Tutor: Go to help > animation path > collision to learn more about how to set up an animated two-vehicle collision sequence.

Below two vehicle animation paths have been created in order to animate a t-bone collision. Each animation path has a “zero” entry which is as a reference point to help synchronize animation paths. To adjust these points, simply left-click and drag on the “0” icon (red circle below).

Adjust both icons to ensure the vehicles intersected at the proper location. Notice, this will modify the “distance offset” (Virtual Tutor: see help > animation path > distance offset) parameter for each animation path. Using the “t0” icon lets you adjust the “time offset” parameter.

Left-click on the t0 icon and drag your mouse right to input a time offset for your vehicle’s animation path. This is very useful to help synchronize complex interactions between multiple objects. Note, as you drag your mouse right, you’ll see the relative positioning of your animated objects update in real time, helping the fine-tuning process. Using the t0 offset feature on the red pickup helped simplify making the three-vehicle collision animation sequence shown below.

Virtual Tutor: Go to help > animation path > time offset to learn more about adjusting the time offset parameter in animation paths.

Animation Sequences in Forward Time

You also have the option to evaluate sequences in “forward-time”. This is analogous to the process of working with Virtual CRASH simulations, in which driver inputs are defined in a time-forward manner. Below, we’ve removed all prior defined sequences and used the “evaluate” drop down menu to select “forward”.

To give our car an initial speed, we can simply use the “speed change” sequence type to instantly give the car a speed of 25 mph (see below).

We next define a uniform speed sequence in order to have our car drive at a constant speed over a fixed distance or time interval (specified by the “use” dropdown menu). Note, in the figure below, the speed in and the speed out of the yellow shaded uniform motion segment is 25 mph.

We can continue adding as many new sequence segments as needed. Here, after the initial uniform speed segment, our vehicle then accelerates at 5 ft/s2 over a distance of 50 feet, thereby increasing the speed at the end of the acceleration sequence segment to 29.282 mph. The car then decelerates for 72.29 feet and then resumes traveling at a constant speed of 22.395 mph. Of course, animated impacts can be created in forward-time evaluation in the same manner as in backward-time.

Suspension Effects

Virtual Tutor: Go to help > animation path > spring effect to learn more about adjusting animated vehicle suspension effects.

The path animation tool works by coupling the vehicle model to the path animation node (the blue dot observed on the animation path) using a damped spring joint. This path animation node acts much like catapult, forcing the vehicle to follow the desired path. This spring coupling gives the freedom needed to allow the vehicle to pitch and roll in response to lateral and longitudinal accelerations as the vehicle travels the animation path. Suspension effects, that is pitch and roll, can be enabled by using the “spring effect” slider in the sequences menu, which can be tuned from 0% to 100% (default setting is 0%). At 0%, the vehicle will not change pitch or roll angle in response to lateral or longitudinal accelerations. Note, even when spring effect is set to 0%, the wheels will continue jounce and rebound in response to the terrain. Also note, with spring effect set to 0%, the vehicle will exactly follow acceleration progression indicated by the sequences inputs of the path animation tool, including abrupt step-wise transitions from one acceleration sequence input to the next; however, if set greater than 0%, the spring coupling between the vehicle and animation node will effectively cause smooth (not perfectly step-wise) acceleration transitions over a few hundred milliseconds time interval as the vehicle transitions from one acceleration sequence input to the next. As always, use the diagram tool or report dynamics output to ensure the desired vehicle behavior (speed, position, and orientation versus time) is within an acceptable tolerance for your use case.

The vehicle suspension properties can be further modified as usual by going to the vehicle’s axles menu.



Tags: making animations, how to animate, path animation, interpositions, sequences.


© 2022 Virtual CRASH, LLC. All Rights Reserved