游戏邦在:
杂志专栏:
gamerboom.com订阅到鲜果订阅到抓虾google reader订阅到有道订阅到QQ邮箱订阅到帮看

以状态变化和路径控制增强游戏动画生命力

发布时间:2012-02-06 22:12:06 Tags:,,,

作者:Mike Jungbluth

游戏中的角色动画不能只是依赖于电影中所使用的方法。即使你完成了动画的制作,也还是需要努力创造出具有情感吸引力且能够带来移情作用的角色。如果你想在游戏中充分使用动画创作的12大原则,你首先必须知道游戏和玩家是何时并如何使用你的动画。

状态改变和路径控制是游戏中2大动画应用方法,能够加强或破坏角色的个性,目的和意图。

状态改变

当角色因为某种触发事件从一个动画场景转变到另一个动画场景时,其状态就会发生改变。这种变化经常出现于战斗情节中,即从袖手旁观到加入战斗中并发动攻击。

在这个例子中,触发事件可能是玩家按压了某一个按钮或者非玩家角色(NPC)所发起的某种形式的交战。然后会上演一个过渡动画,即角色开始拿起武器或挥舞拳头。

战斗状态(例如骄傲、好斗、胆小等)能够体现角色的个性,而当状态改变用于其它触发事件时,游戏角色便可能变得更加栩栩如生。状态改变赋予了角色一个目的,并让他们能够表现出自己想要征服的一个目标,并以此引导着他们的全部生活。

通过状态改变,角色开始变得富有意识。这便能够解释为何声音和视觉是战斗之外两个最有效的触发事件。当玩家在接近NPC一定距离之内发出了某些声响时便触发了声音事件。

而视觉触发事件则是指出现在NPC前面的一个圆锥形内部的景象。除此之外,气味触发事件也可以通过相同的方式呈现出来,或者结合现实中真正的气味物理性。显然,触觉和味觉更接近于战斗,它们需要一个提示性的物理触发机制。

在潜行类游戏中,声音就是一种非常重要的触发事件。当NPC对一个声响做出反应并进入警惕状态时,这种“猫捉老鼠”的游戏(游戏邦注:即隐蔽躲藏类游戏)就会瞬间活跃起来。而视觉当然也具有相同的功能,你能够在自己躲避的圆锥形区域范围内找到敌人的身影,或者发现正在户外走动的敌人。

我很难想出哪些游戏使用了气味触发事件,尽管当玩家藏在垃圾桶,滚桶或者下水道时,肯定能够想象其中的恶臭。愚蠢的猎人常为了掩饰自己而使用各种气味阻断剂以及无味肥皂,但是却因此而更容易暴露自己的位置。

在潜行类游戏中,玩家总是会最大限度地发挥自己的感应能力去寻找敌人,同时游戏也会赋予那些被追捕者一些此类感应能力。

近距离触发事件可以赋予角色第六感。当玩家进入NPC的圆锥形半径距离时,他的第六感便会凸显出来。这与声音触发事件的半径相似,但是与声音触发状态改变有所不同,玩家只要踏进这个区域便会立即触发事件。

Senses_Triggers(from gamasutra)

Senses_Triggers(from gamasutra)

在《生化奇兵》中,当你逼近Little Sister时,忠实地紧随其后的Big Daddy便会发生状态改变。它会停下脚步,凶狠地转向你,犹如一只母熊,好像在警告你如果再往前一步就会遭到攻击。

虽然这只是一个非常短的时刻,但是却具有非常重大的作用。这个触发事件十分契合角色的个性和意图。在此Big Daddy的目标也随着其状态改变而改变,从保护Little Sister转变为保护它们免受你的攻击。

《塞尔达传说:天空之剑》也巧妙地使用了近距离触发事件。在Skyloft Bazaar中有一个小贩,每当你接近他的地盘时他就会兴奋地上窜下跳。相信看到他期盼你购买商品时的兴奋感,也会让那些在现实生活中同样具有买卖经验的人产生共鸣。

而当你什么都没买并离开后,他会马上泄气,并转身离开,这也算是为游戏添加了不一样的乐趣。尽管只有一些动画和近距离或视觉触发事件,但这个NPC却因此而比许多主角更富有情感和生命力。虽然动画确实很有趣,不过让角色更加真实而生动的却是触发事件以及状态改变。

显然,过渡动画在这种状态改变中扮演着重要角色(正是在这些时刻,NPC才真正开始经历情感与思维过程的改变),但是如果这些过渡动画没有搭配合适的状态改变,那就会立即破坏玩家在游戏中所体会的现实感。

路径控制

你可以创造非常具有个性和重量感的角色行走或奔跑周期,但是如果角色完全遵循直线或者无趣的路径前行,那也不会有多大意义。动画制作人员总是很容易忽视路径控制的作用,并且众多设计师或者程序员只会在各种关卡中随机地对其做出改变。

事实上,在每一个情境中让角色专注于任何特定路线是一项非常艰巨的任务。而一个较容易处理的方法便是思考当你在传送一系列动画时,你的角色基于何种路径前行。

就像一个将军的行进表现就不同于刚入伍的新士兵。将军可以稳步沉着地从一个场所走到另一个场所,但是新士兵却会反复停下脚步,观察周围的情况或者根据周围的环境而不断放慢或加速。

Path_Personalities(from gamasutra)

Path_Personalities(from gamasutra)

路径控制同样也能够为动物或生物添加一些意识或特征。例如观察蜘蛛是如何前进。不只是它们腿部的运动,还要注意它们的前进路线。你会发现它们总是会走一会,并停下来非常长时间,后朝着另一个方向再次前进。并在前行一会后再次停下来,如此反复。

这种断断续续的移动能够在动画中创造出犹如真实般的蜘蛛移动。这时候也不再需要复杂的移动矩阵,停止以及开始等动画效果,你只需要告诉设计师贯穿整个关卡去设置路线,并避免直线型的长路线即可。

如果我们将状态改变添加到路径中又会是怎样一种情况?当然了,添加更多有趣的因素和交互性内容肯定会加重制作人员的工作量,但是这么做也有助于创造更有趣且更合适的路径选项。

如果在一个关卡中,每个AI都拥有1至2个目标,那么你便可以在经过AI的路线时使用触发事件引发它们的状态改变。这么做可以让这些角色显得更加智能,而不只是听凭玩家摆布的傀儡。

让我们以疯狂的怒犬穿过一片荒漠或者一只迷恋春天罂粟花味道的兔子为例。在这两个例子中,它们的移动都非常奇怪,所以使用突然=转向便是最合适的路径控制方式。

现在让我们假设任何一种动物穿梭在一个场景中,或者仍是以喜欢罂粟花味道的兔子为例。不论是哪一种目标位于这些动物的路线中,它们都能够触动这些兴奋的动物发生状态改变,并因而上窜下跳。

如此便让玩家能够创造出更多可能性。玩家可以奔跑或是在这些动物分心时进行交战。而当动物被追踪时,玩家可以通过安插适当的目标去诱导这些动物转移方向。而作为游戏设计师,你可以用一些标记去突显这些目标,进一步促使动物去追逐这些能够满足其欲望的目标。

说到路径控制时便是不得不提分层动画。在现实生活中,人们不只是简单地从一个行动过渡到另一个行动,完全完成一个动作后才转向下一个行动。

想象你正走向一扇半敞开的门。你将不会只是走向它,停下来,推开门并走进去。相反地,你会连贯地完成这一系列动作。为角色提供这样的时刻能够让它们显得更有意识。而分层便是实现这种目标的一种方法。着眼于控制这些能够引起兴趣的目标,能够显示角色在不打破其流程状态的情况下仍保持对某事物的兴趣。

《神秘海域3》便使用分层方法让Drake在经过墙壁时伸手去碰触墙壁,从而更加自然地融入这个游戏世界。同时也因此更好地突显出他的个性,体现出这个不断跌倒但却仍然不停挑战困难的角色。这种设置同时还要求他具有装备IK,尽管对于NPC来说,这实在是太过于昂贵的技术投入,但确实是值得考虑的有效方法。

针对角色去控制路径所带来的额外好处便是能够改变游戏玩法。而如果路径控制真的能够与角色的目的和个性相匹配,它也不应与其设计相冲突。

不同路径让不同职业的角色都能够感受到独特的体验。就像在某一款游戏中,你想要尝试着在同一时间控制一定数量的敌人,而这时你所面临的变量便需要你对此保持高度警惕,提防随时会从任何地方蹦出的敌人。路径控制以及你在路径中所安置的元素和障碍,都是用于定义角色在游戏世界中的位置以及玩家对其感受的重要内容。

总结

就像电影动画人员需始终确保任何内容都不与整体脱节一样,我们也必须让优质的动画效果贯穿游戏始终。如果你能够在执行过程中让角色体现出自己所倾注的心血,你就会发现游戏动画也能够像电影那样创造出令人难以忘怀的角色。

本文为游戏邦/gamerboom.com编译,拒绝任何不保留版权的转载,如需转载请联系:游戏邦

Growing game animation: State changes and pathing

by Mike Jungbluth

Character animation in games cannot rely solely on the methods used in film. Creating emotionally engaging and empathetic characters in a video game doesn’t stop when you finalize the animation. If you want to fully apply the 12 principles of animation into your game, you need to be aware of how and when your animations are being used by both the game and the player.

State changes and pathing are two important in-game applications of animation that have the power to either strengthen or destroy the personality, intent and objectives of a character.

State changes

A state change is when a character changes from one set of animations to another by some sort of trigger. These are most often used in combat to change from the standing idle and suite of animations to the combat idle and the attack suite of animations.

In this case, the trigger is either a button press by the player or some form of combat engagement of the NPC. This then plays a transitional animation of the character drawing their weapon or putting up their dukes. Pretty standard fare that is built out of necessity and function more so than personality.

Certainly the personality of a character can be reflected in their combat state (proud, aggressive, timid, etc), but it is when state changes are applied to other triggers that a real life and awareness can be breathed into a character. State changes give characters a purpose and outline a goal or objective they intend to overcome and that is what drives the entirety of life.

With state changes, characters take on the appearance of having senses. Which explains why sound and vision are two of the most common triggers outside of combat. Sound triggers are activated when the player makes a certain amount of noise within a certain distance from an NPC.

Vision triggers most often happen as a cone of sight in front of an NPC. If you wanted, a smell trigger could function in the same way as either or a combination of both if you want REAL odor physics. Obviously touch and taste are much closer to combat, needing a prompted, physical trigger.

Sound is certainly a staple trigger in stealth games. Nothing makes a cat and mouse game come alive more so then when an NPC reacts to a sound and enters an alerted state. Sight of course follows the same function, be it moving through the vision cone of an enemy as you slide between cover or leaving an unconscious enemy out in the open to be found.

I can’t think of any stealth games that use smell and odor, though the amount of trash bins, barrels and sewers the player hides in, one would think the stench could be a factor. As silly as that sounds, hunters use all manners of scent blockers and odorless soaps to camouflage themselves, so it could certainly be added and tracked.

In a stealth game that is all about the player using all their senses to hunt their enemies, giving some of those senses to those being hunted is a powerful piece of player/game connectivity.

Giving a character a sort of sixth sense would be done by proximity triggers. This is when the player enters into the personal radius of an NPC. It could be the same as their sound radius, but instead of noise triggering the state change, just crossing into the volume would trigger it.

When you encounter a Big Daddy in BioShock, dutifully following a Little Sister, the moment you step within a certain proximity of them, the Daddy has a state change. He stops and menacingly turns towards you, like a mother bear, letting you know if you get any closer there will be repercussions.

Such a small, simple moment, but incredibly powerful. The trigger matches the personality and purpose of the character. The goal of the Big Daddy takes on a specific objective with this state change, from just generally protecting their Little Sister, to now protecting them from you.

The Legend of Zelda: Skyward Sword uses a proximity trigger in a wonderful way as well. There is a marketplace vendor in the Skyloft Bazaar that excitedly jumps up and down as you approach his stand. Seeing him get so excited at the prospect of you buying his goods adds a sense of life anyone with retail experience can relate to.

But the added spice was when you walk away, and he instantly deflates and turns his back as he walks away utterly destroyed that you didn’t buy anything. With only a couple of animations and a proximity/visual trigger, that NPC became more empathetic than a lot of main characters. While the animations are fun, it is the trigger and state change that makes him come alive by allowing him to wear his heart on his sleeve.

Obviously transitional animations play a big part in these state changes, as those are the moments that the NPC is having the actual change of emotion or thought process, but if those transitional animations aren’t set to an appropriate state change, the illusion of life can break down quickly.

Pathing

You can create the most amazing walk or run cycle, full of personality and weight, but if the character walks in an entirely linear and uninteresting path, it will all have been for not. Pathing is something most animators never pay much attention to, as its implementation happens by any number of designers or programmers throughout various levels and can change at the drop of a hat.

In fact, focusing on specific pathing of a character in every instance would be an incredibly large undertaking. But something far more manageable is thinking about HOW a character will path when you deliver the suite of animations.

How a successful General of an army walks from place to place is going to be different from the drafted recruit freshly thrust into a war. The General may very well walk from destination to destination without stopping. But a new recruit will very often stop to look around or slow down/speed up depending on what is around.

Pathing is also a great way to add some awareness and appropriate traits to animals and creatures. Watch how a spider walks. Not just the cycle of their legs, but how they path. They will walk for a bit, then stop. Often for a significant amount of time. Then they will just take off in another direction. Stop for a brief moment, then continue on.

This staccato movement is as significant towards creating a fully realized spider as how the animation looks. A complex animation matrix of turns, stops and starts aren’t even necessary. All you would need is to inform the designer that places the pathing throughout the level that long, linear paths is out of character.

What if we add state changes into the pathing? Adding in points of interest or interactables certainly add work to the plate of everyone involved, but they are also powerful additions towards creating interesting and appropriate pathing options.

If throughout a level each AI has one or two objects that can grab their interest, you can use those as triggers for a state change when placed throughout the AI’s path. This gives the character a little bit of business in the world, making them feel like they are there for more then just the player’s use.

Let’s use a rabid canine walking across a wasteland as a test case for all of these pathing options. Or a hopped-up rabbit that loves the smell of poppies in the spring if you want something a little more light-hearted. In both cases, their movement is certainly going to be erratic, so pathing that uses sudden directional changes would be best.

Now let’s say there are random animal carcasses littered across the landscape or poppy patches in the case of the rabbit. Whenever one of these objects is inside of the path of our furry friend, the object triggers a state change that has the elated mammal jump into the middle of it all, rolling around like a pig in filth.

With this, a myriad of player possibilities take place. The player could run or engage while it is distracted. When being chased, the player could lure the creature away by putting one of these objects between them. As a designer, you could even tag these objects with a buff that emboldens the creature after it has satiated its desire.

Layering animations is also a powerful tool when it comes to pathing. In life, a person doesn’t just go from one action to another, completely finishing one before moving onto the next.

Imagine you are walking towards a door that is slightly ajar. You wouldn’t walk up to it, stop, push it open and then walk through. You would do that all as one continuous motion. Giving moments like that to a character is what makes them seem aware. Layers are a way to achieve this. Adding in a look at control to those objects of interest helps to show a character is interested in something without breaking their flow.

Uncharted 3 uses layers to have Drake’s hand reach out and touch a wall as he passes by, helping to cement him in the world. It also fits his personality that as someone who is always tripping and falling down that he would want to continually balance himself against a solid object. This also requires IK on the arms, so it is most likely too tech expensive to be used on NPC’s, but it is something to think about it.

As you can see, the added benefit of thinking about pathing as it relates to characters is that it varies the gameplay as well. And if that pathing truly matches the intent and personality of the character, it shouldn’t be dissonant with their design.

In a stealth game, those varied paths make each class of character a unique experience from one another. In a game where you try to control the amount of enemies you take on at one time, this variable keeps you on your toes as to when and where to engage in a play space. Pathing, and the elements and obstacles you place within that path, are what define a character’s place in the world and how the player perceives it.

Animation doesn’t stop at export

Just like film animators follow their shots throughout the pipeline, making sure everything matches the performance laid out, we need to follow our animations throughout the game. If you apply all the thought and energy you instilled into the character into their implementation, you will find game animation can create as memorable characters as any film.(source:GAMASUTRA)


上一篇:

下一篇: