185

Tool Creation |Human Agents

184

Tool Creation |Human Agents

Animation Assets

Beyond the skeletal mesh, animations are also required to fully portray these agents. Within the simulation visualization, these animations are what allows these human agents to visually differ from dynamic architectural elements shaped like humanoids. As such, without this step, the agent models will be lifeless objects that float about within the simulation. (Fig. 3.3.42)

Within UE4, a single animation asset is referred to as an animation sequence. These sequences contain “keyframes that specify the position, rotation, and scale of a bone at a specific point in time.”[18] This allows these assets to drive the movement of the skeleton asset, which in turn drives the movement of the skeletal mesh asset. (Fig. 3.3.43) To implement these animations for the agents, we must procure a library of various animation sequences for every possible scenario. We can then utilize various tools within UE4 to set them up in a way where the agents can determine which animation to execute based on the task that the agent is currently doing.[19]

The first of these tools is the Blend space. This allows us to blend various animations together based on the value of multiple inputs.[20] With this, we can combine this collection of animation sequences to create transitional animations between different states, allowing the agent to move in a smooth and realistic fashion without having to use too many hard-coded animation sequences. (Fig. 3.3.44)

In order to set these states, however, we must also utilize animation blueprints. With this, we can establish various checks to determine if the agent is currently turning, running or falling, etc. Once this is set up, we can produce output variables to set various states within a State Machine. (Fig. 3.3.45) This then allows the agents to execute various animations or Blend Spaces depending on what the agent is physically doing within the simulation. For example, if the agent is currently turning right, the animation blueprint will check for this and set a variable for AgentTurningRight to be true. Once this is true, the state machine will go into the TurningRight State, which will tell the agent to use the TurningRight animation sequence. If the agent is speeding up from a walking speed to a running speed, the animation blueprint can normalize the speed between the two states to tell the Blend Space to generate an animation that smoothly transitions from the walking state to the running state.

Much like the character models, there are many ways to create these animation sequences, which can include manual keyframing or motion tracking.[21] To simplify this process, however, it is possible to download various animation files from sites such as Adobe Maximo. (Fig. 3.3.46) With this, we can quickly procure the library of animation sequences required to fully animate our agents within their tasks.

Agents become lifeless floating objects without animation

Simulated and Screen-recorded by Author.

Animation Sequence within UE4 drives the skeletal mesh asset.

Screen-recorded by Author.