projects, tech stuff, musings

procedural animation in HighFidelity

I have been working on a procedural animation system for High Fidelity that extracts harmonic information from motion captured data for subsequent replay. In doing so, I’ve created an animation system for High Fidelity that has the following features:

  • Cyclical, smooth animation sequences
  • Reduced animation file sizes
  • Highly precise control over timing and animation frequency

The system comprises a player, editor and a growing selection of JSON animation files.

walkTools in use - editing the walk animation
the walkTools UI – editing a walk animation

links

To view the system working, log into High Fidelity and open either the player script of the editor script. Note you will need to sign up at High Fidelity to create an account and download the client (Interface).

Open from URL
(File -> Running Scripts -> Open from URL, then paste one of the URLs below)

walk.js (player): https://hifi-content.s3.amazonaws.com/dave/walk-beta/walk.js
walkTools (editor): https://hifi-content.s3.amazonaws.com/dave/walk-tools/walk.js

The code is also available on github here.

movie showing current state of project

High fidelity is still in the alpha phase, so often solutions that work today may not work tomorrow! The most recent changes were to the way in which avatar pre-rotations were handled. Shown below is a short movie I produced to demonstrate how I adapted the system to the change.

bit of history

The project started life as a short job to create a walk animation at a time before FBX animations were available in High Fidelity. The first iteration used only sine waves to create the motion. Sine waves worked quite well for all but the legs joints. To create more compelling legs movement, actual motion capture data was converted into a format that the early player could use – namely, the correct leg animation curves were broken down into harmonics that could easily be replayed using the system.

Since it’s inception, the system has animated avatars in High Fidelity in a manner that matches their current motion state; if moving forwards on the ground, play a walk animation, if flying, play a flying animation etc. Great care has been taken to ensure that when walking, the feet do not slide; this required the implementation of an automatic stride calibration and calculation system. I based the system on the system described by David Rosen in his talk at GDC in 2014.

ongoing project

This first phase of the project is nearing completion. Once complete, I intend the apply the walkAPI to NPCs (non player characters) to create sophisticated behaviours. I will update here shortly…

Leave a reply

There is no content to display.