Hierarchal Animation


A Hierarchical Animation Demonstration Built with C++ and DirectX

Hierarchical Animation is a real-time C++ graphics application demonstrating parent–child transformations, articulated model construction, keyframe animation and animation blending.

The application combines a procedurally animated aircraft with a keyframe-driven robot, showing how complex models can be assembled from individually transformable mesh components. Local transformations are propagated through a reusable hierarchy, allowing child components to inherit parent movement while retaining independent rotation and positioning.

Developed as a focused graphics and animation project, Hierarchical Animation demonstrates how scene hierarchies, external animation data, interactive controls and rendering systems can be combined within a structured real-time application.


The Engineering Problem

Complex animated objects are rarely composed of completely independent parts. When an aircraft moves, its wings, propeller, turret and gun must remain attached to the main body, while some components must also rotate independently.

Animated characters introduce an additional challenge. Each body component must receive local position and rotation values from an animation while continuing to inherit transformations from the components above it.

The challenge was to create a reusable hierarchy capable of supporting both procedural mechanical animation and imported keyframe animation, while preserving a clear distinction between local component transforms, inherited world transforms, animation data and application behaviour.

My Role

I designed and implemented the complete hierarchical animation application, including the component hierarchy, recursive transformation system, hierarchy loader, animation parser, animation controller, aircraft behaviour, robot animation, terrain rendering, projectile system and interactive camera controls.

The project demonstrates practical graphics programming with an emphasis on transformation hierarchies, data-driven animation, keyframe interpolation, animation blending and the integration of animated models with wider gameplay and rendering systems.

Simulation Demonstration

Hierarchical Aircraft

Demonstrates parent–child transformations as the aircraft moves while the propeller, turret and gun animate independently.

Robot Animation

Demonstrates keyframe animation together with smooth transitions between Idle, Attack and Die animation states.

Interactive Scene

Demonstrates camera modes, projectile firing and the animated scene operating together in real time.

Architecture Overview

Hierarchical Animation is organised around a reusable component hierarchy that connects independently transformable mesh components through parent–child relationships.

Each component stores its own local position and rotation while receiving the completed world transformation of its parent. Animation systems update local component values, the hierarchy recursively calculates world matrices, and rendering and gameplay systems consume the resulting world-space transformations.

Core Animation Systems

The application is organised into three focused areas that combine hierarchy management, animation processing and interactive scene behaviour. Each area maintains clear ownership of its responsibilities while contributing to the complete animation demonstration.

Hierarchy & Transformations

Builds models from named mesh components connected through parent–child relationships. Each component calculates its local transformation and combines it with its parent matrix, allowing movement and rotation to propagate recursively throughout the complete model.

Keyframes & Animation Control

Loads external animation data, organises animations into reusable tracks and interpolates component positions and rotations between keyframes. The controller supports looping and non-looping animations together with blending between active animation clips.

Scene & Interactive Systems

Implements the aircraft, robot, terrain, projectiles and camera modes that demonstrate the hierarchy in practical use. Procedural component movement, gameplay-driven animation selection and hierarchy-based cameras reuse the same transformation data throughout the scene.

Together, these systems create a real-time animation application while preserving separation between model structure, animation evaluation, rendering and interactive behaviour.

Engineering Principles

PrincipleApplication
Separation of ConcernsHierarchy construction, animation parsing, pose evaluation, rendering and scene behaviour are implemented as focused systems rather than being combined within a single application class.
Hierarchical CompositionComplex models are constructed from smaller mesh components connected through parent–child relationships, allowing articulated objects to be assembled from reusable parts.
Local and World Space SeparationAnimation and procedural behaviour modify local component transforms, while rendering, cameras and gameplay systems consume recursively calculated world transforms.
Data-Driven DesignHierarchy structures and animation keyframes are loaded from external files, allowing model composition and animation content to change independently from application code.
Reusable System DesignThe same hierarchy architecture supports both the procedurally animated aircraft and the keyframe-driven robot without requiring separate transformation systems.
EncapsulationMesh components, animation clips, animation tracks, projectiles and terrain systems each manage their own state and behaviour through clearly defined responsibilities.
Recursive ProcessingComponent transformations and rendering operations are propagated from parent to child, naturally reflecting the structure of articulated models.
Loose CouplingAnimation channels locate components through stable names, allowing animation data to interact with the hierarchy without depending on component indices or direct ownership.
State-Based BehaviourRobot animations are selected according to user input and scene conditions, allowing visual behaviour to respond to application state.
Resource ReuseProjectiles are managed through an object pool, reducing repeated allocation and providing predictable runtime behaviour.

Key Design Decisions

Recursive Transformation Propagation

Each component calculates its local transformation before combining it with the world matrix of its parent. The resulting world matrix is then passed recursively to every child component.

Data-Driven Hierarchy Construction

Model structures are loaded from external hierarchy files containing component names, positions and parent relationships, separating articulated model composition from application source code.

Named Component Access

Hierarchy components are stored using readable names, allowing systems to retrieve and control specific parts such as the aircraft propeller, turret and gun without depending on fragile numeric indices.

Shared Hierarchy Architecture

The same component hierarchy supports both procedural aircraft movement and imported robot animation, demonstrating that the transformation system is independent from the method used to generate local poses.

Pose-Based Animation Evaluation

Animation tracks are evaluated into pose buffers before being applied to the hierarchy, keeping animation processing separate from component ownership and rendering.

Animation Blending

Transitions between clips evaluate both the current and target poses before interpolating corresponding component transforms, reducing visible discontinuities when changing animation states.

Technologies

Development

C++

Visual Studio

Git

DirectX 11

DirectXMath

TinyXML2

XML Animation Data

Engineering Approach

Hierarchal Transformations

Object Pooling

Parent-Child Scene Graphs

Keyframe Animation

Animation Interpolation

Animation Blending

Data-Driven Asset Loading

Recursive System Design

Real-Time Rendering

Separation of Concerns

Interactive Camera Systems

Engineering Outcome

Hierarchical Animation demonstrates how articulated models and animation systems can be built around a reusable parent–child transformation architecture.

By separating hierarchy construction, animation parsing, pose evaluation, world-matrix calculation and scene behaviour, the project supports both procedural mechanical movement and imported character animation within the same application.

The resulting system allows animated components, cameras and gameplay systems to share reliable world-space transformations while maintaining focused responsibilities and clear architectural boundaries.

Application Gallery

Main Menu
Human Controlled Game
Training Statistics*
Evolution Monitoring*
Environment Input Grid
Level Completion*

*need to replace with correct images!

Repository

Explore the source code to see how the architectural principles are implemented throughout the framework.