Collection: Shane Gavin - ICA Portfolio Semester 2

Spectators

Spectators in All the Way Down

My individual research last semester focused on the creation of large crowd groupings with interactive and reactive behaviours. In approaching a solution for the implementation proper this semester, I came to the realisation that this might not be the best solution. The original thinking behind the development of a system which controlled larger crowds was that placement of individual actors would be too labour intensive. As it turns out, this is not the case in UE4.

Additionally, animation sequences can be used to create more variety in crowd behaviours which can be more interestingly tweaked in individual actors. Because of this, the focus moved to creating an individual spectator prototype which can be configured in a wide variety of ways. 

The idea to approach the problem from this direction came from a third-party BluePrint I sourced for another project at the end of last semester: a factory for creating books. This implementation used 2 simple configuration properties which could be used in any combination to produce a total of 4 book variations. While this might not sound like a lot, the system was more than sufficient to populate a level with dozens of these books, without it looking repetitive. 

The system developed for All the Way Down features a single spectator actor which can be configured in a variety of ways. A pool of character meshes, idle animations, and reaction animations can be mixed-and-matched for each actor placed in the level. Further details of this implementation can be found on this page, and in the screen cast on the right.

Individual spectators can be configured in the following ways:

  • Spectators can be set to follow the bike, or not, by setting a reference to the bike actor, or leaving the reference null. 
  • The trigger volume which activates spectator training can be selected.
  • The trigger volume which activates spectator cheering can be selected. 
  • The spectator's idle animation can be selected from a drop-down list.
  • The spectator's reaction animation can be selected from a drop-down list.
  • The spectator's turning speed (for bike following) can be set.

Spectators (Video)

Persona

Adaptive animations in the Unreal Engine can be created and controlled with the Persona tool. This tool allows for granular control of various stages of the animation and animation-control process, from single animation sequences to full animation state machines.

Persona can be used to edit existing animations (imported from FXB files, as example) or to create new animations from an imported skeleton. The tool features a basic key-frames editor, live-animation recording, and a system for dispatching notifications at any stage of an animation sequence.

Once individual sequences have been imported or created, Persona can then be used to modify the attributes of the animation (playback speed etc.) and to combine multiple sequences into an animation state machine. Mono-directional transition rules can be added for fluid movement when switching from one animation state to another, and a system known as Blend Space can be used to create dynamic animations from interpolations between existing sequences. 

Relevant Journal Entries: 

Fuse Character Creator

Character meshes in All the Way down have been created with Fuse Character Creator--a tool which allows for speedy development of custom characters. The process for creating an character in fuse is as follows:

  • Point-and-click mix-and-match from a selection of body parts (head, torso, arms, legs)
  • Point-and-click mix-and-match from a selection of clothing (tops, bottoms, shoes)
  • Optionally add hair, eye wear, facial hair (not available in the trial version), etc.
  • Modify textures for any element as desired (skin, hair, clothing (broken into elements))

Once you have created a character, you simply upload it to the Mixamo online service and the character is auto-rigged for you. Here you have the option of downloading an UE4-specific FBX (and other formats as desired). Each character is approx. 7 megabytes in size including mesh and materials. When importing the downloaded FBX into Unreal, you can assign the standard Unreal skeleton. The advantage here is that any existing animations created on the standard skeleton can be used with the new mesh.

Relevant Journal Entries: 

Mixamo Service

The Mixamo online services is used to auto-rig characters made in Fuse Character Creator. The service also features hundreds of animation sequences which are available to use free, and royalty-free. The range of animations on offer is quite extensive and all can be previewed live in the online store. If you have uploaded your own meshes from Fuse, you can preview any available animation on it before deciding to download.

One you have chosen the animation sequences you want to download, you can download FBX files which are pre-configured for Unreal 4 (or other engines). When downloading, you have the option of obtaining the FBX with or without the mesh you are previewing. If you choose to download without the mesh, the resulting FBX will be less than 1MB. 

A total of 10 animations have been sourced from Mixamo for All the Way Down (5 idle animations, 5 reaction animations). Before discovering Mixamo, I developed 4 animations for the game from scratch. The time needed to source and integrate all 10 animations from Mixamo was less than that needed to develop a single one of these. 

I would highly recommend this service to anyone needing high quality animations.

Relevant Journal Entries: 

Look-at Mechanics

Spectators in All the Way Down turn (slowly, over time) to follow the bike as it passes by. Behaviour for individual actors can be configured in the editor.

A spectator's look-at target is configurable on the spectator instance. As with animation triggers, this property is optional--spectators do not have to look at another actor. In the final implementation, spectators can only follow bike actors. This restriction has been put in place because physics items do not update their position values which are used to calculate rotations. Instead, a custom property in the bike actor (a vector used as the camera look-at point) is used to calculate rotation. 

The look-at logic can be seen in the image below:

Trigger Volumes

Animation state changes in the level are achieved through the use of trigger volumes--spatial areas where player entry and exit can be detected. When the player (more specifically: the bike) enters one of these trigger zones, a boolean value is set to say the player is within the zone.

Each spectator can have 2 trigger volume references assigned to it: one to trigger their "cheer" animation, and one to trigger their look-at (turn-to) behaviour. Both of these references are optional (spectators can ignore the bike), and there is no restriction on which trigger volumes can be used for which behaviour. For example: the same volume can trigger a turn-to mechanic and a reaction animation, different volumes can trigger each, and two spectators standing beside each other can be triggered by different volumes. 

Alternating Playback Direction

The speed of animation playback can be controlled through a property in animation blueprints. Negative numbers are usable here for reverse playback. Additionally, each animation sequence can dispatch notifications on any frame. Linking these two behaviours together, I added "beginning"  and "ending" notifications to the start and end of each sequence, and added logic to reverse the current playback speed when these notifications are received.

This allows animations which are not perfectly stitched to loop seamlessly. 

For example: an animation which starts with a playback speed of 1 (forward) will send a notification when the end of it's sequence is encountered. At this point, the playback speed will be changed to -1 and the animation will progress in reverse. From here, the playback speed will "ping-pong" between 1 and -1.