Final Product

Capture14_editedPlease, Download and Play the Game:

https://www.dropbox.com/sh/wup75rn6euhwcoh/AAAHj2ysSd1aV_7yeFGl2Izna?dl=0

Controls are

  • W,A,D,S for movement
  • Hold Shift to Walk
  • E to Shoot

(To download and play, download both files onto desktop. Open the one named ‘Final.’ CTRL ALT TAB to exit or ESC)

 

Advertisements

Animation Controllers in Unity

Capture10.JPG

Goals

Create an animation controller for the player, blending animations together and creating realistic transitions.

Technique

Technique one: As above, create a transition from entry to Idle, then make transitions from other states. This technique worked but gave me less control over the transitions.

Technique two: As below, create a transition from entry to a Blend Tree. This allowed me to keep track of the amount of ‘turn’ and ‘forward’ motions the inputs are receiving. By doing this I was able to add turning motions to the movement by triggering different moments in the animations where it would (luckily) tilt to one side. The numbers represent the amount of movement on X and Y plus the speed.

Capture11.JPG

Then all I needed to do was trigger the animations through code. (The shooting/force is the same deal.)

Reflection

Blend tree was a headache. I can’t talk about it reflectively if only to say i’m glad I never have to learn that again.

Post-Mortem

Naming the original data clips with giant naming conventions was a terrible idea as it wasn’t able to be changed in Unity. Also unfortunately the blend tree options only allow you to use forward and turning motions – so I was unable to add a backwards walk which would have been easy enough to do if it had. I was never able to figure out how to implement the backwards walk so I had to scrap it. I also lost the Heavy Breathing Data somewhere along the line, but it didn’t fit well with the structure anyway. From this point it was clear that the game had a ‘soft’ aesthetic as apposed to and ‘action’ one. I never intended a specific one,  but I am happy with the results.

Importing to Unity

Capture08.JPG

Goals

Create a working prefab of edited animations in Unity

Technique

  • Change the Rig settings to Humanoid
  • Adapt the animation settings per movement – whether the Root transformation follows the player (cycles) or stay centre of the model (stationary movement.) Capture09.JPG
  • Adjust the key frames and Timelines so the animation loops properly. If the steps don’t match up Unity tries to blend them together – it ends up looking like a weird limp if it’s off. Above is an example of a Idle Movement.

Reflection

It took a while to understand the settings, but looking at Unity Sample Assets allowed me to unravel the character animation system enough to understand it by looking at one of their characters. This process reminded me of the importance of even steps in the walk/run cycles.

Post-Mortem

The Raw Mocap Data Footage didn’t capture enough steps for the cycles to be perfect. Also the ‘force’ clips were especially difficult because they were hardly symmetrical. In future I would make the actress stop and start in similar poses.

 

Mocap Data to Maya Skeleton

Capture04.JPG

Goals

To create a working model to import into Unity with the Model, Animations, and Bones/Rig attached.

Technique

My first technique was to follow the 002_Retargeting_to_Maya_character.pdf, and use animation layers in Maya to edit the animations. Unfortunately after animating a fair few rigs I tried importing to Unity and it became deformed. The animations worked but I couldn’t attach the animation to any other models and it always deformed any models attached.

Capture06.JPG

Model exported with Animation and Rig in Unity^

Capture05.JPG

FBX Export of Model in Unity^

The second technique I tried was to skip the animation layers in Maya and move onto 003_Mocap to Maya skeleton.pdf. Steps:

  • Import Model and characterize skeleton in Motion Builder
  • Merge the Solved Data to the scene
  • In the Character Controls window select Actor from the Source drop-down menu
  • Re-size the models to fit each other
  • Bake to Skeleton

Capture07.JPG

Reflection

It’s a real shame I didn’t figure out how to get the edited animations into Unity, but this did allow me to move into Unity faster which is a software i’m much more comfortable with. Learning Motion Builder and Maya in such a small frame of time was a challenge.

Post-Mortem

Taking out the animation layers made it difficult to get balanced and smooth walk/run cycles. Fortunately Unity had options to cut up the key frames and blend them together – it was just a lengthy process and probably would have been quicker with a edited animation in Maya.

After watching this issue pop up a few times with other students I realized it was the compatibility that was wrong with the import. The model imported and the saved Maya animation changes were in different locations and scales, so unity tried to put them together and it failed. I’m still not sure how i’d fix this issue,  I don’t know Maya enough to  have a clue where i’d change the scale and locations on import but i’m almost certain that was the cause.

Solving Mocap Data in MotionBuilder

Capture03.JPG

Goals

To transfer the cleaned up Data from Cortex to Motion Builder and apply it to a model.

Technique

  • File>Motion File Import
  • Attach Character Actor to the Data Points and Scale to Fit using, Scale, Rotate and Position.
  • (View>Orthographic>Producer Front etc.)
  • Re-target the Mocap Markers to the Different Parts of the Actor body

Reflection

Having many different takes really hindered the process. Re-targeting the Mocap Markers was tedious to do 8 times in a row. I was at first unsure how close to the markers the actor had to be, but after trial and error I eventually picked up the best technique for the models shape.

Post-Mortem

The final walk ended up with the feet curling inwards- I tried to change that in this stage but it still stuck. I think the live actress was walking uncomfortably in the mocap suit on her feet – I remember her mentioning it a couple times. The character -actor in Motion Builder also didn’t quite fit right with the Maya model. A model designed specifically to match the live actress could have fixed a lot of issues I had.

Post Processing in Cortex

Capture13.JPG

Goals

Use Cortex to prepare/clean the Motion Capture Data for Motion Builder.

Technique

  • Select individual markers in the left hand Markers window where they are listed from top to bottom.Select a marker in the 3D view window, and its XYZ animation curves appear in the graph window.
  • Identify unnamed markers and fill gaps where markers have disappeared.
  • Fill any gaps using Cubic Join for small gaps (a few frames), and Virtual Join for larger gaps.
  • Smooth the data where necessary.

Reflection

The process was a lot more user-friendly than I expected. The pdfs were great and easy to understand.

Post-Mortem

I wish I had remembered to Record this process, as the Cortex software wasn’t always available.

Capturing The Data

Capture02_edited.jpg

Goals

To capture the Motion Capture Data, having the actor:

  • Walk Slow
  • Walk Fast
  • Jog
  • Sprint
  • Stand Idle
  • Look fatigued
  • Walk Backwards
  • Throw some kind of force with her hands

Technique

I instructed the actor to keep her back straight, head up and to ensure her steps are as even as possible. For the force movements I demonstrated the movements and even let her physically push me around to get the effect.

Capture02

Reflection

It was my first time working in the Mocap Suite and it had been a while since an assignment had pushed me out of my comfort zone. I have never been a good actor or animator – but keeping in mind the end in-game result helped me focus on the type of movement I needed. I felt like it was easier, and more fun than I expected. The facility’s  at AUT for motion capture are incredible, I’d defiantly want to do it again.

 Post-Mortem

After completing the project I realized a giant list of things I did wrong at this point. I should have analysed other player controllers in game engines to know what I need to capture. I was missing small things like slight turns that would have been easy enough to capture. If I were to do it again I would have the actor walk/run/jog in a straight line and in a cycle. Then I would be able to create a more convincing turn in-game. I would also stop them from walking out of the capture area – as that caused a lot of headache.