Dr. Llŷr ap Cenydd is the developer of two well known Oculus Rift demos: Ocean Rift and (my personal favorite) Crashland. As an expert in procedural animation, Cenydd has imbued his creatures with beautiful and organic animation that’s convincing and unscripted. In a guest article, he explains some of challenges and benefits of procedural animation and explains its importance in virtual reality.
Cenydd blogs about his virtual reality development work on his blog, Llyr’s VR Experiments. Most recently he announced that Ocean Rift will be coming to Samsung’s Gear VR headset later this year. You can also follow Cenydd on Twitter @sfaok.
The resurgence of VR has sent developers back to the drawing board in many respects; we have to rethink how we model depth and scale, how to interact with and move within a 3D world, how to display and navigate menus, load levels, present tutorials. Even staple graphics techniques like normal mapping and billboard particles are unsuited to VR due to a lack of stereo depth. The prospect of needing to maintain 60, 75, 90 frames per second also puts a much greater emphasis on game engine design and optimisation, especially now that we have an emerging mobile platform spearheaded by Samsung’s Gear VR.
“…one of the striking things you might find is how dead [virtual characters] appear without the breathing, blinking, eye contact and many other subtle queues we subconsciously perceive in living beings.”
Animation faces similar issues. If you try some of the more realistic VR human model tech-demos, one of the striking things you might find is how dead they appear without the breathing, blinking, eye contact and many other subtle queues we subconsciously perceive in living beings. While games continue to chase the elusive goal of photorealism, there remains a massive amount of work before characters in VR don’t regularly break the sense of immersion. Even the slightest hitch when an animation loops can be enough to pull you out of the experience. Furthermore, I believe this problem extends to data-driven animation in general.
I’m developing an app called Ocean Rift that aims to immerse the user in a vivid underwater world. One of the main draws of the app is the ability to freely swim with large marine animals like dolphins, orcas, humpback whales, and sharks. If I was to animate these creatures using traditional techniques, their movements would largely be constrained by the data.
While you can achieve fantastic results using a team of animators and advanced blend trees, there is still an inherent lack of realism when the underlying motion is driven by pre-set animation sequences. I wanted the animals in Ocean Rift to behave like they are real living things, capable of displaying the range of behaviour and dexterity shown by real-life equivalents, and crucially behave differently every time you visit. To get anywhere close to this I needed to animate them procedurally.
Procedural Animation
A glimpse at Ocean Rift shows the natural motion and convincing behaviors that can be achieve with procedural animation.
Procedural animation is a type of computer animation where the motion is generated automatically rather than being driven by predefined data. When applied to autonomous characters, this is sometimes known as Behavioural Animation where the character determines its own actions and this is reflected in the resulting animation.
“What you are essentially creating is a puppet that can pull its own strings…”
With Procedural Animation, you can take a 3D mesh rigged with an articulated skeleton and bring it to life by connecting its joints up to algorithms. What you are essentially creating is a puppet that can pull its own strings, and with carefully designed and fine-tuned algorithms it can lead to very organic motion that is both unique and entirely contextual.
The most famous early example of behavioural animation is Craig Raynolds’ Boids system, which he developed to simulate how creatures flock, herd, and school. The basic idea is that the complex motion seen in these natural phenomena can be simulated by prescribing three simple rules: don’t get too close or too far away from neighbours (separation and cohesion), and always steer towards the average heading of the local flock (alignment). Using just these three simple rules, it is possible to realistically simulate the motion of an entire flock of birds or school of fish.
While this type of behavioural animation has been used a lot in film and games to animate crowds (it also animates the fish schools in Ocean Rift), it is still quite rare to find procedural animation systems in modern games. One of the biggest examples is the Euphoria Engine by Natural Motion, which has powered the animation system in many of Rockstar’s modern games. However even these type of systems are largely limited to situations where the sub-conscious brain takes over, like being knocked off balance or falling over.