top of page

Video Game with Motion Capture
University Project 

Guardians is a game I made for my third-year project with the use of motion capture.
The project required me to use a motion capture system and use the footage for animations in a video game. For the game, I used Unity and some assets from the Unity store to help with sound, music, and the environment. 
These are the elements of this project required me to use or do:
  • Programming in C#
    • Combat, Weapons, Player, NPC, state machine, UI, Input and Animations 
  • Unity Game Engine
  • Game design
  • Motion Capture
  • Animations
  • UI
  • 3D modeling in Blender
    • Weapons, Characters, and buildings
​
​

Video Game footage

Motion Capture Footage

Game Development

image.png
Here is the Development path for the project.
2022 - October Start.
  • Research games with motion capture 
  • Study and practice Unity and blender
  • Game concept 
  • Game Design
  • prototype code for player inputs and movement with animations 
  • Create models for the game
2023
  • Capture motion (later than planned due to studio accessibility).
  • Develop motion footage into animations with Blender and Unity
  • Animation state machines in Unity
  • Programming in C#
    • Player​
      • Player combat ​
      • Input Manager
      • Movement
      • Collision
      • Animation Manager
    • NPC
      • Ai state machine​
      • Movement
      • Collision
    • UI​​
      • main menu ​
      • Player Ui health bar
      • Objective menu and update
  • Finished August 2023


​

 
During development, I followed the Agile methodology.
 

Problems and solutions

Throughout development, it felt like one step forward and two steps back.
From problems with motion capture footage and programming bugs.
Here are a couple of examples of problems and how I solved them.
 
  • Blender editing problem
The markers in Blender would end up causing performance issues making it very difficult to edit and Blender crashing. This was due to there being 72 markers on the skeleton which was captured at 120 frames per second with the motion capture system. In Blender that would end up showing 8,640 markers per second.
The problem with this was that alot of the footage was 10 minutes long and Blender would show that in the graph at marker into a keyframe. The solution to this was simple but I wanted to edit the weight of the character in Blender to avoid the mesh being manipulated incorrectly. However, I wasn't able to edit if the software would crash all the time.
  • Solution ​
For the weight, I used the blender auto weight tool which created the weight of each bone automatically from a T position of the character. Cut down the footage to the movements I wanted and needed, and edited some of the bone weights that were applicable. ​
I used the Unity rigging system, root motion, and animations to cut and edit the footage to be usable for the game. In Unity, the footage was alot easier to edit by lowering the frame rate down to 60fps for each animation. 
​
​
​
​
​
​
​
​
​
​
​
​
 
​
  • Collision Problem
weapon collision was done with the use of collision boxes on each weapon. This caused an issue with when the weapons were holstered by the player or enemy characters it would cause them to collide with the character box making the models collide with themselves and glitch. ​
  • Solution ​
In a script for the weapon collider have the box collider disabled on awake removing the problem. The weapon collision is then applied by calling a method within an attack animation to set collision to true followed by another method to set back to false at the end of the animation. This allowed collide to take place during combat attacks and not all the time. ​

 
image.png

Ai State Machine

image.png
Roam State Code
image.png
Chase state Code
image.png
Attack State Code
image.png

Game Modals

motion data.JPG
This is the data of the motion capture footage in Blender due to the quality of the motion capture footage there were alot of errors in some of the animations due to massive drops in framerate or the position of the actor and the markers weren't been captured correctly. 
 

In-Game Screenshots

gameworld.JPG
bottom of page