Editorial
naturalmotion

NaturalMotion’s euphoria Technology: The Honeymoon is Over

Alex J. Champandard on March 14, 2008

euphoria, a physics-based animation system capable of synthesizing motion dynamically, has been getting a lot of attention recently. The gaming press in particular seems to have sunk to the level of screeching groupies. So, in the interest of providing you with balanced coverage, here’s a more technical (and possibly a little cynical) review of this system.

Versions of this Active Character Technology (ACT), or Dynamic Motion Synthesis (DMS), have been in the works since before 2001. After many academic projects, prototypes in previous companies, and multiple iterations within NaturalMotion, it seems the research is finally paying off. Additionally, by realigning their expectations of demanding a cut of the royalties to charging a flat fee instead, the company from Oxford has finally made it into the the games industry! Titles like Grand Theft Auto 4 and Star Wars: The Force Unleashed will include euphoria when they come out.

But how come this technology is becoming popular only now? Has DMS matured into an indispensable tool for developers? Did it take next-gen hardware for developers to try to improve their ragdolls a little, since they have the computation power anyway? Or is it that designers are finally finding creative ways to justify the licensing cost of technology they wouldn’t otherwise use?

Backbreaker Natural Motion

Screenshot 1: Games journalists eagerly jumping onto euphoria. Is there anything under there? (Official image from NaturalMotion’s upcoming game Backbreaker.)

The Technology

Historically, euphoria is a descendant from Karl Sims seminal work on evolving controllers for virtual creatures. He used genetic algorithms and neural networks to find optimal controllers for various different kinds of problems like crawling, swimming, fighting, etc.

Under the hood, NaturalMotion’s architecture has a similar structure to many other academic physics-based animation systems:

  • Simulation — At a low-level, the skeleton is setup with a complex biomechanical model. This includes constraints for the joints, and non-linear actuators for the muscles.

  • Controllers — To drive the skeleton, euphoria uses a form of neural networks (NN) as controllers to determine which forces to apply. These NN are evolved using genetic algorithms (GA) which pick the fittest controllers over multiple generations and trials.

  • Behavior — The top layer of the system is a nothing more than a traditional state machine. This is apparently implemented in Lua, which has become the standard scripting language for the games industry. There’s nothing revolutionary here, but it achieves its purpose.

All in all, the GA / NN combination is the most controversial aspect of this solution. They have a (deserved) reputation for being hard to tweak and not so easy to work with in practice. Particularly in the case of realistic motion, you have to put in so much effort to capture subtle nuances in a fitness function that it’d be faster to build the controller directly or basing it on examples.

As a side note, the fickle nature of the evolutionary approach is the primary reason why euphoria isn’t middleware; the team at NaturalMotion helps you integrate it. Most often, you have to request behaviors and they produce them for you. It takes a lot of experience to be able to capture requirements and express them as a fitness function that produces the desired results in a way that looks realistic.

euphoria Studio

Screenshot 2: euphoria studio for tweaking and visualizing dynamic motions. See the white paper from NaturalMotion’s website.

Active Ragdolls

With all this technology under the hood, how is euphoria used in practice? As it turns out, in a great majority of cases, applying active ragdolls (as originally branded by the company) is the exact same process as applying normal ragdolls into a game.

  1. When a force is exerted onto the character, switch the skeleton into physical simulation mode starting from the current posture.

  2. Keep the ragdoll simulation enabled for a few seconds until the skeleton reaches a stable or recognizable posture.

  3. The animation system can blend back into motion capture, finding the most appropriate animation to play.

In practice, euphoria is most frequently used as an improvement of ragdolls, taking control for a few seconds at a time before blending back to motion capture. The active controllers have the advantage that they can simulate basic instincts like protecting one’s head or breaking a fall. On top of that, the controllers can be used to drive the ragdolls simulation actively (instead of blending linearly) towards a desired animation posture so the motion capture animation can be blended back in.

While it may seem a terrible waste of technology to blend out the active ragdolls so quickly, toggling between physical simulation and motion captured animation is a very sensible approach, combining physical accuracy for responding to the environment and realism. But there are many different ways to implement this in practice…

Driving in Grand Theft Auto 4

Screenshot 2: In Grand Theft Auto 4, when you crash into something the passengers go flying through the windshield using active ragdolls powered by euphoria.

Alternative Solutions

euphoria is clearly better than inactive ragdolls in every area except performance. However, compared to animation synthesis based on motion-capture data, the decision is not so clearcut. It’s arguable whether a solution based purely on simulation could ever reach the realism of a mocap or hand-animated clips. So understandably, the majority of animation research these days is more firmly grounded in motion capture data.

The typical solution for animation in next-gen games is known as parametric motions. The idea is that you take many different variations of the same motion (like walking speeds, or the facing direction) then blend them together so that the animation can be controlled by a parameter. This approach is discussed in much more detail in this article about Crysis (Integrating Next-Gen Animation and AI) and you may be interested in reading the paper below:

Parametric Motion Graphs
R. Heck and M. Gleicher
Symposium on Interactive 3D Graphics and Games 2007
Read Details or Download PDF (0.3 Mb)

Some pre-release reviews of Grand Theft Auto 4 attribute many animation improvements to euphoria when in reality they can be attributed to the underlying parametric animation technology. For example, making sure that idle characters have their feet well planted on arbitrary floor heights can be handled by a simple parametric motion.

Another alternative is to integrate traditional physics simulation with motion capture to create very realistic falls. In the paper below, the ragdoll simulation is used to determine the best animation clip to play in such a way that it looks realistic. It may take more time to motion capture or hand animate these clips, but the results are ultimately orders of magnitude better quality.

Dynamic Response for Motion Capture Animation
V. B. Zordan, A. Majkowska, B. Chiu, M. Fast
Read Details or Download PDF (9 Mb)

Finally, for those curious how to drive a biomechanical simulation of a skeleton towards a particular frame of motion capture animation, look into feedback error learning. It’s a statistical technique that helps generate PD-controllers to move limbs towards their target position without oscillating too much. Here’s the paper:

SIMBICON: Simple Biped Locomotion Control
K. Yin, K. Loken, and M. van de Panne
ACM Transactions on Graphics 26(3)
Read Details and Download PDF (0.8 Mb)

The lesson learned here, is that you can easily and effectively leverage numerical optimization techniques to build high-quality parametric motions, and there are many cheap and effective ways to outperform NaturalMotion in terms of realism on many specific problems like falling or responding to bumps.

Scope and Applicability

Given all these alternatives, where does that leave euphoria in practice? Here are situations in which the technology is applicable:

  • When it’s not possible to motion capture because it’s too dangerous or expensive to hire stunt men.

  • When it’s too time consuming for animators to do it by hand.

  • If the local complexity of the physical simulation rules out a solution based on parametric motion blending.

  • If it’s possible to model the behavior using a fitness function for the genetic algorithms.

  • When the results don’t look too unrealistic or out of place in games…

Note that the process of creating dynamic motions with euphoria can be very time consuming too, due to the complexity of the task of building custom controllers. However, you can’t hire stock animators or outsource this work! It needs to be done by the people at NaturalMotion who can understand how the underlying NN controllers function.

You can apply euphoria to many different aspects of game animation, but it won’t necessarily show any improvements. Worse still, it could end up being a waste of time, and force you to revert to the alternatives mentioned above. It’s important to keep in mind that NaturalMotion is just another tool for developers to use, which is suited to solving a subset of in-game animation problems.

The Force Unleashed on Storm Troupers

Screenshot 5: A storm trooper turns into an active ragdoll in Star Wars: The Force Unleashed.

Defining Moments

In either case, you may well ask: what does all this technology do for gameplay? Where are those “defining moments” that NaturalMotion keeps talking about? If the active ragdolls are blended out so quickly, there’s not really enough time to control the behavior in a meaningful way.

Until recently, this certainly was the case for the average game; excluding cosmetic improvements to ragdolls, there was no benefit of euphoria that couldn’t be achieved equally well using other solutions based on motion capture.

“It takes the creativity of the best designers to find fun uses for this technology.”

However, while NaturalMotion’s offering isn’t perfectly realistic but it does provide some extra flexibility to the animation system. And it’s taken the creativity of some of the best designers in the world to finally find a use for the technology that justifies the licensing cost. In GTA IV and The Force Unleashed, whole sections of the game being built around Dynamic Motion Synthesis.

Grand Theft Auto 4

Who else but Rockstar could turn promising (but potentially average) technology into its own game mode, and make it incredibly fun? In the latest iteration of this franchise, euphoria is used for more than drivers flying through windshields or pedestrians being hit by cars. There’s a mini-game where you can stumble home drunk. You attempt to control the balance and let a DMS balance controller take over the animation.

There are many design and marketing reasons why this mission is inspired, but it also makes a lot of sense from the perspective of using NaturalMotion’s animation system. This turns out to be a great compromise between what the technology can provide, and what the design requires:

  1. The resulting motion is not smooth and realistic, it’s a stagger. euphoria’s balance controllers are relatively robust (AVI), but locomotion synthesis is an open research problem, so it’s far off from next-gen quality animation.

  2. By making it a drunken walk with “shaky-cam” graphics, the developers can cover up the fact that the motion is not too realistic and focus on the extra flexibility that a physics-based animation system provides.

For reference, the majority of the locomotion in GTA IV is handled by blending animations together and dynamically selecting the weights at runtime — in the traditional next-gen way.

Screenshot 6: Feel like staggering home drunk in the rain? (Grand Theft Auto 4 screenshot.)

Star Wars: The Force Unleashed

Another example of using euphoria as a gameplay mechanic thanks to great design is LucasArt’s latest game. In this game, you can use “The Force” to lift people in the air and throw them against things. Here, Dynamic Motion Synthesis is used to control the enemy characters as they fly through the air, waiving their arms or holding on to things. (Watch video.)

Once again, apart from the fact this fits into the game perfectly, this approach shines because it compromises between what the animation technology can provide and what the design needs:

  1. Technically, locomotion is very difficult to synthesize realistically, but animations with fewer constraints like hovering in the air is much easier for euphoria to handle. Also, people have few expectations of how this should look, so even if it’s not 100% realistic it’s fine as long as the characters respond to collisions.

  2. From a design perspective, active ragdolls falling don’t last very long. But thanks to The Force, players get to see the full extent of the physics-driven animation system, even if it’s only watching behaviors that look like dynamic IK grabbing for nearby objects.

In the video, you’ll notice other animations like dodging or avoiding objects dynamically. It’s unlikely that euphoria is behind those, as they could easily be achieved with standard animation techniques for better results.

Screenshot 6: .

Backbreaker

The final game that uses euphoria is Backbreaker, a football game and NaturalMotion’s first title. There’s not much information out there yet, but certain details are public already particularly the focus on tackles. The game could basically spawn a whole new genre: tackle simulator!

This makes sense from a technical perspective, since anything else but the tackles should be handled by motion capture animation. So it’s a great way to show off the technology. However, the big question is whether there’s fun gameplay there. Unlike the other two games already mentioned, there’s no innovative design mechanic here. (If there is, it hasn’t been announced.) So don’t be surprised if this title takes a long time to ship, or if it serves to convince a large publisher to buy them out…

Screenshot 7: Game designers have the ball. Can they run with it? (NaturalMotion’s Backbreaker.)

Conclusion

In summary, NaturalMotion’s euphoria technology is certainly very interesting, but it’s not as generally applicable to game animation as people would like to believe. This approach lacks the realism that motion capture can provide, and it’s arguable whether it ever will. The decision to use neural networks and genetic algorithms doesn’t really help in that department either.

What’s clear though, is that this approach based on physical simulation provides a lot of extra flexibility to designers. So, to the credit of the people at Rockstar on Grand Theft Auto 4 and LucasArts for The Force Unleashed, they’re the one that are making this experimental technology shine by creating innovative gameplay.

So even if the rest of the games industry doesn’t necessarily need this kind of technology, when it’s in the hands of designers who have the budget to experiment, great mini games can come out of it!

Can you think of entertaining uses of this kind of physics-based animation system?

Discussion 6 Comments

Bourbaki on March 14th, 2008

Just a small game that also makes use of this kind of technique. [url]http://www.fun-motion.com/physics-games/sumotori-dreams/[/url]

Sergio on March 14th, 2008

How do all these technologies work with non-human characters? I can imagine doing motion capture with a horse (although it will be expensive), but not with an alien-like monster. Also, I don't know if Natural Motion provides physical models for animals or how long it takes to develop a new one. I can certainly see both endorphin and euphoria-like technology being useful for those characters, possibly in the line of what the Spore team is doing. I agree that more time is needed to evolve the technology and make it more robust and accessible, but I don't think it's limited to minigames.

alexjc on March 14th, 2008

Hi Sergio, Thanks for your great comment. You're spot on about the non-human characters. The modeling tool endorphin (non-interactive) was used to animate the horses in the film Troy I believe. Right now though, it takes a fair amount of effort to produce new animations; it's probably equivalent to hiring an artist. As far as I know, the whole process of getting new "behaviors" from NaturalMotion takes a while. You write a design document with a specification, then they try to figure out how to model it, and eventually come back with a controller that requires tweaking and iteration... Don't get me wrong, I think there's a *huge* potential for animation middleware that works in a physically accurate way and is ultra-realistic at the same time. But euphoria, as it is, can't provide that. I believe coming at the problem from an approach grounded in motion capture (or by hand animated examples) will be more fruitful. What the Spore team is doing (with a budget no doubt bigger than NaturalMotion's) is far better suited to procedural locomotion than euphoria. The similarity is closer to what Ken Perlin is doing than the Karl Sims stuff. Alex

oblongata on March 27th, 2008

Hi, I guess I should confess that this is my first post here. Great, great, great site. My brain is currently on overload from all the information. I just wanted to add this [URL="http://www.gamedev.net/reference/business/features/demonightviI/page5.asp"]link to talk by Ken Perlin[/URL] that demonstrates some of the Actor Machine software he's been working on for a while, since you mentioned him. You all probably have seen it, but I thought I'd add it just in case. Cheers.

tuan.kuranes on March 27th, 2008

On that exact topic, the DANCE toolkit is particularly interesting : " DANCE is a portable, open, plug-in based, object-oriented software package for physics-based character animation. One of its goals is to provide researchers with a common platform where they can test their control methods and share their results. In addition, it provides the common, yet complex functionality that everyone needs in a physics-based animation system, allowing researchers to concentrate on their research work. DANCE has been used for a variety of physics-based applications that include biomechanics modelling and composeable controllers. " [url]http://www.magix.ucla.edu/dance/[/url]

avok23 on May 31st, 2008

As stated in the article it seems this methodology has been in existence since the early 90s. I found this 284-paged paper "Simulating Humans: Computer Graphics, Animation, and Control" [URL="http://repository.upenn.edu/hms/"]University of Pennsylvania[/URL] which pretty much describes the whole behavioural controls a bit more. I am begining to grasp why they used NN and GA simpy because i cant think of any other method that would be dynamic or as adaptable as those two. Also apart from LUA ( used for behaviours) are there any other form of plugin type-code (like scripts but not scripts) that could be used. How much proccessor penalty would and animation system using scripts to control cost? I looked at the endorphine tutorials and a single animation can hold over 5 behaviours and more constraints if morphine or euphoria are used to modify the data at run time each animation frame the game would probably end up crawling. Lastly when you said "But there are many different ways to implement this in practice…" what other uses did u have in mind?

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!