Chain Chomp

What I Learned

The Chain Chomp was one of my earliest Unreal projects, originally made in late 2019. My goal was to get a feel for each aspect of creating a game asset. As such, I did the programming, model, animations, and VFX on my own. (Though I did stop short of creating sound effects).

 

This project familiarized me with aspects of Unreal’s AI features, most notably behavior trees and the nav mesh. I also learned how to integrate different types of assets into a cohesive game element. For example, using an animation tree to implement transitions in time with the behavior tree. The animations, in turn, implement anim notifies which drive the VFX.

The final product most closely resembles Chain Chomp’s appearance in Super Mario Odyssey. However, in Odyssey their behavior is fairly limited to support the game’s capture mechanic. I did not implement a capture mechanic, so I tried to make its behavior patterns more dynamic.

Nature assets credit: Advanced Asset Packs, Unreal Engine Marketplace. https://www.unrealengine.com/marketplace/en-US/product/advanced-village-pack

Behaviour Tree

The chomp is set up to chase the player within a certain radius. It has three behaviors based on where the player is within that radius:

    1. If the player is in the chomp’s sight radius, but more than a minimum distance from its position, the chomp will return to the center, pull back to the edge of its movement radius, and lunge. 
    2. If the player is within a minimum distance of the chomp, it will give chase to the player instead of lunging.
    3. Lastly, the chomp will return to the center and idle when the player leaves its sight radius.

fig 1. Example of the behavior tree running in real time.

The behavior tree in the video implements these states [fig 1]. A selector chooses the first appropriate behavior out of the three listed.

Additionally, any time the player gets close enough, the chomp will freeze, play a biting animation, and launch the player. This functionality is implemented separately from the behavior tree. After the animation finishes, the chomp resumes its behavior tree.

Animation Blueprint

Animations are controlled by one state machine [fig 2], which directly connects to the animation graph output.

All information needed for state transitions, including the chomp’s position, velocity, rotation, direction, etc., is pulled by the animation blueprint’s event graph.  The event graph also implements all of my animation notifies, which control the visual effects.

fig 2. The animation state machine.

Art and Assets

Model, Rig, and Animations

I made the chomp’s animations hand in Blender [fig 3], as well as the mesh and rig.

The chain is just a string of static meshes and physics constraints. A suboptimal approach, but it was an easy way to get secondary animation in this standalone project.

fig 3. Walk cycle and animation curves in Blender.

Textures

Textures were done in Substance Painter [fig 4], imported to Unreal, and implemented in a minimalistic shader graph.

fig 4. Chomp and texture layers in Substance Painter.

VFX

I made three particle systems in unreal engine’s cascade editor.

Two are dirt clouds for different walking states, one for normal walking and one for lunging.

The other is a shockwave that plays at the end of a lunge [fig 5].

fig 5. Sparks / shockwave particles system in cascade.