让角色媲美真人运动员,EA分享:FIFA、Madden动作互动如何实现的?(双语)...
动画技术 41067 0
实名

通过了实名认证的内容创造者

发布于 2022-9-4 22:09:25

您需要 登录 才可以下载或查看,没有账号?注册

x


eemi.jpg

I'm Henry Allen, a senior software engineer on EA's Frost Animation team, and today I'd like to share some of the developments in multi-character interaction at EA, some of which might be used in other games and engines as well.

First of all, we can quickly understand the role of EA interaction system, due to the activities of the GDC said before the system, so we only do a short introduction to this, then we will enter the main content of today, around two topics, first, the multiple roles interaction system, not only to interact with other characters, will also interact with other objects within the game environment and, Take a kick like this.
我是Henry Allen,在EA寒霜动画团队担任高级软件工程师,今天的目的是分享EA的一些多角色互动的发展,其中有些方法可能会在其他游戏和引擎中也能被用到。
首先我们会快速了解EA的角色互动系统,由于之前GDC活动中讲过这个系统,所以我们对此只做简短的介绍,随后我们会进入今天的主要内容,围绕两个话题进行,第一,多角色互动系统的拓展,不仅与其他角色互动,还会与游戏环境以及游戏内的其他物体互动,以这样的踢腿动作举例。
eemi1-1024x580.jpg
Then we'll talk about motion and posture matching, and we'll look at two integrated motion matching techniques in our avatar system, which have something to do with the picture on the right.
随后我们会谈到运动与姿势匹配,会了解我们角色系统里的两种集成运动匹配技术,与右边的图片有些关系。
N-teract stands for Interactive Scene System, or EA's Multi-Character Interaction System, which detects multi-character interaction environments and then matches them with animations to create moments of multi-player interaction within the game. In the game, they are those real-time interactions.
N-teract是互动场景系统的缩写,也就是EA的多角色互动系统,用来探测多角色互动环境,然后与动画匹配、并在游戏里创造多人玩家互动时刻,在游戏里,它们就是这些实时互动。

For EXAMPLE, all defenses handle all player interactions, AND our multi-character interaction system is responsible for detecting player animations to determine when and which rules should apply.

So, how does this system work? First, the game's animated state machine determines which player the system will consider, while responding to a request for interaction and performing a quick interaction. Game creators have complete control over when and if such interactions occur.

The Interaction Evaluator is the central processing unit (CPU) that collects all requests and divides the same type of character Interaction requests into groups. In each group, it first considers the Master player (in our case, the person dribbling the ball) as an Interaction reference.

After evaluating the Master players, we then did an extensive check, quickly eliminating distant players from our database, and then identifying the appropriate rules and remaining players. Finally, we searched the animation database to see if there were any matching animations.

If a matching animation is found, the state machine starts playing the animation and enters the processing state to adjust the animation so that it interacts with the character.

Objects interact with their environment
比如,所有的防守都处理了玩家的所有互动,我们的多角色互动系统负责侦测玩家动画来决定什么时候哪个规则应该生效。
那么,这个系统是怎么运作的?首先,游戏动画状态机决定系统会考虑哪个选手,同时应答请求互动,并执行快速互动。游戏创作者对于这样的互动什么时候发生、会不会发生,都有着完全的控制权。
互动鉴别器(Interaction Evaluator)是中央处理器,它收集所有请求,并且把同一类型的角色互动请求分为一组,在每个组中,它首先会考虑Master选手作为互动参照,在我们的案例中,运球的人就是Master选手。
评估了Master选手之后,我们随后进行广泛核对,快速在我们的数据库中排除距离比较远的球员,然后确认合适的规则和剩余的球员。最后我们在动画数据库搜索是否有匹配的动画。
如果找到了匹配的动画,状态机就开始播放这个动画,并开始进入处理状态,来调整动画让它与角色互动一致。
物体与环境互动

We solved the problem of synergy between animation and interaction, but how do we add object and environment interaction to the system? To do this, we need to talk about passive actors in re-interactions, which we call ghost interactions.

In this interaction, we have two characters to interact with in the middle of the victim, the role of the middle did not actively participate in any one of two interactive, he is a passive participants, after being knocked out, who was not involved in the subsequent interaction, but the arrival of the first character will be crushed by another active participants, these are all controlled by the player or AI, This makes sense for environmental interaction.
我们解决了动画与互动的协同问题,但该如何将物体与环境互动加入到这个系统之中呢?为此,我们需要讨论再次互动中的被动参与者,我们将其称之为幽灵互动。
在这个互动当中,我们有两个角色与中间的受害者互动,中间这个角色没有主动参与两个互动当中的任何一个,他是一个被动参与者,在被击倒之后,没有参与后续的互动,但第一个到来的角色被另一个主动参与者击倒,这些都是由玩家或者AI控制,这对于环境互动是有意义的。
This system can be used in real-time interactions where a character is not involved in any interaction at all. Instead of serving as a reference point, this "shadow" is triggered by the dribbler and interacts with his movement. This is a typical contextual interaction where the passive participant's interaction is completely influenced by the other characters.
这个系统可以用在实时互动之中,一个角色可以完全不参与任何互动,而不是作为一个参照点,这个“影子”由运球者触发,并且会对其运动作出互动,这是典型的上下文环境互动,被动参与者的互动完全受到其他角色的影响。
Since the other role simply provides context for the passive actor, technically this passive role needs to be another role, and matching this role should be easier than matching other roles.
由于其他角色只是为被动参与者提供上下文环境,从技术上来说,这个被动角色需要成为另一个角色,匹配这个角色应该比其他角色的配对更简单。
The other tool is the causal controller. We need a trace locator that you can customize and use to locate it in the scene and determine the corresponding interaction and animation. We also updated the code in the database to match these situations.
其它工具是因果控制器,我们需要追踪locator,你可以对其进行自定义,并作为在场景中对它进行定位,并确定对应的互动与动画,我们还在数据库更新了代码来匹配这些情况。
This is a creative prototype of our early character interaction. We created some animations to interact with the wall in order to determine where the character's hand would be placed to trigger the interaction, and then we used locator to represent the wall's position in the world, which the character could use to re-interact with the wall.
这是我们早期角色互动的一个创意原型,我们创作了一些动画与墙壁互动,以便决定角色的手放在什么地方可以触发互动,然后我们用locator来代表墙壁在世界中的位置,角色可以利用这些locator重新与墙壁互动。

You can also use it for simpler interactions, like when a character touches a texture on a wall, or when a player character hits a wall, you can have them push against the wall with their hands instead of their face. Or, you can do different angles, styles of interaction with doorknobs, or even different character types. Alternatively, you can interact with treasure chests, or with furniture, or anything else.

We also allow content creators to identify these locators to support more complex interactions, which means that our game systems carry the logical information they need to use.
你还可以用它做更简单的互动,比如角色触摸墙上的纹理、或者玩家角色撞到了墙壁,你可以让他们用手推墙壁,而不是脸直接撞上去;或者,还可以做不同角度、风格与门把手的互动,甚至是不同的角色类型。亦或者,你还可以做角色与宝箱的互动,或者与家具等任何物体的互动。
我们还允许内容创作者识别这些locator,以支持更为复杂的互动,这意味着我们的游戏系统承载了他们需要用到的逻辑信息。

Speaking of more complex interactions, this is a scene from a Madden game, where the red locator represents where the character first falls. In the game, when a foul action occurs on a line, you can use a locator on that line to match the corresponding animation.

In this case, when the character approaches the Locator, the corresponding animation can be triggered to present the appropriate multi-character interaction. In real-time games, they serve only as reference points for interaction.

So, can these locators interact with moving objects? The biggest problem is the ballistic arc, because you can't change the locator's position to fit the moving object, which would look unnatural, so the characters interacting with it need to move. But you also can't match its current position, because the characters are moving away from their original position and chasing the ball's direction, and they need to be consistent, so we need to predict the motion to determine the future position.
说到更复杂的互动,这是Madden游戏里的一个场景,红色的locator代表了角色第一次跌倒的位置。在游戏里,当一个犯规行动在某条线发生的时候,你可以用这条线上的locator匹配对应的动画。
在这种情况下,当角色走近locator的时候,就可以触发对应的动画,呈现合适的多角色互动。在实时游戏中,它们只是作为互动的参照点。
那么,这些locator能够与运动中的物体互动吗?最大的问题是弹道弧,因为你不能改变locator的位置去适应运动的物体,这样会看起来不自然,所以与之互动的角色需要移动。但你也不能将它当前位置匹配,因为角色离开原来的位置在追逐球的运动方向,他们需要保持一致,所以我们需要预测运动以确定未来的位置。

Here, for example, Madden's team predicts where the football is likely to move, with each dot representing a locator in a system so that players can match and interact with any one position as it is. While this approach may seem very simple and intuitive, we have found it to be very useful.

Motion matching and interaction
比如Madden团队在这里预测了足球可能运动的位置,每个点都代表了一个系统中的locator,这样玩家就可以根据实际情况匹配并与任何一个位置互动。虽然这种方法可能看起来非常简单和直观,但我们发现它非常好用。
运动匹配与互动
If you're not familiar with this, dynamic matching is an animation technique that gives the character a path to follow, and more and more of our animation teams are starting to rely on this technique to achieve high fidelity animation without sacrificing player control, and we need the same ability in multi-character situations.
如果你对此不熟悉,动态匹配是一种动画技巧,给出一条通道让角色照着走,我们越来越多的动画团队开始依赖这个技术,它可以在不牺牲玩家控制的情况下做到高保真度的动画,在多角色情况下,我们也同样需要这样的能力。
在Madden游戏里,我们让动态与拉力系统匹配以实现恰当的互动。

Here the blue route is the predicted route of the ball carrier and the gray route is the route of the ball catcher. If there is an intersection between the two routes, we will find the interaction corresponding to this situation and then use dynamic matching to bring the defender to the desired position so that the animation does not require any delay.

In this case, it can be adapted to multiple defense situations and can adapt to different angles of interaction, because participants predict in advance using dynamic matching, reaching the optimal position before interaction and animation begin.

However, this is only the dynamic matching of a single role, how to achieve in the multi-role situation?
这里蓝色路线是运球者的预测路线,灰色路线是抢球运动员的路线,如果两者的路线有了交集,我们会找到与这种情况对应的互动,然后用动态匹配将防守者带到理想的位置,以便动画不需要任何的延迟就能呈现。
这种情况下,它可以适配多种防御情况,能够适应不同角度的互动,因为参与者在使用动态匹配提前预测,在互动和动画开始之前就达到了最理想的位置。
不过,这只是单个角色的动态匹配,在多角色情况下如何实现?
This technology is actually in the EA team of eight people have been studied initially, they adjusted the motion matching technology to check motion matching quality under different positions, so that the players in different reference points to get the best dynamic effect, and then make the reference points can be used by another role, so that it can use role in many scenarios.
这个技术实际上在EA最初的8人团队就已经开始研究了,他们调整了运动匹配技术以检查不同姿势下的运动匹配质量,以便让玩家在不同参照点得到最佳的动态效果,然后让这个参照点可以被另一个角色使用,这样就可以在多角色场景下使用。

This is one of the earliest creative animations, showing two characters fighting against each other and reflecting on the fight, and even doing a very attractive demo, such as two characters matching through the game code. However, they quickly encountered the problem of multi-player matching, which remained unresolved for many years.

For example, how do you choose partners to participate in the many possible situations? Or what about participants who are outside the effective distance? How to deal with passive or ghost participants? For example, if the victim had a more appropriate movement, it would make the interaction seem more natural.

After years of experimentation, it became clear that it would be a waste of resources to develop multi-character interaction matching separately from existing character motion systems. We realized that the team needed to work together to solve this problem, and we had two strong systems, but how do you get them to work together?
这是最早的创意动画,展示了两个角色对打和对打反映的动画,甚至做了非常具有吸引力的demo,比如两个角色通过游戏代码匹配。然而他们很快遇到了多玩家匹配的问题,并且很多年都没解决。
比如多种可能的情况下,你如何挑选参与的合作者?或者在有效距离之外的参与者怎么办?如何处理被动或者幽灵参与者?比如被击打者如果有更恰当的运动,就会让整个互动显得更自然。
经过多年的尝试之后,很明显的是,如果将多角色互动匹配与现有的角色运动系统分开研发,会是对资源的浪费。我们意识到团队需要一起努力解决这个问题,我们有两个强大的系统,但如何让他们一起工作呢?

Since motion matching supports multiple characters, they are all matched by reference characters, and are all driven by the animation database. So we started by replacing the original scenario database with a post-match database, which also worked, but didn't fulfill the potential of both systems.

We get what we need, but we lose quite a bit of functionality.

So we went back to square one to find a different approach.

After years of experimentation, it became clear that it would be a waste of resources to develop multi-character interaction matching separately from existing character motion systems. We realized that the team needed to work together to solve this problem, and we had two strong systems, but how do you get them to work together?
由于运动匹配支持了多角色,他们都在通过参照角色做匹配,并且都是通过动画数据库驱动。所以我们一开始是用后匹配数据库取代最初的场景数据库,这也是行之有效的,但并没有发挥两个系统的潜力。
我们得到了需要的效果,但丢失了相当多的功能。
为此,我们回到了原点,以寻求不同的方法。

One possible option is to combine the two databases, but the problem is that the functions of the two databases are very different. For motion matching, each match with the function is based on how well it matches the original animation. If either fails, we reject the match.

So we went back to square one to find a different approach.

After years of experimentation, it became clear that it would be a waste of resources to develop multi-character interaction matching separately from existing character motion systems. We realized that the team needed to work together to solve this problem, and we had two strong systems, but how do you get them to work together?
一个可能的选项是将两个数据库合并起来,但问题在于两个数据库的功能差别很大,对于运动匹配,每一个与功能的匹配都是基于它与原始动画的匹配度多高,如果任何一个失败,我们都会拒绝匹配。
Therefore, we keep two systems inconvenient, but if we encounter a multi-character animation, we send it to the motion matching database to find a solution, finding multiple entry points for the same animation.
因此,我们保持了两个系统不便,但如果遇到多角色动画,我们将其发送到运动匹配数据库以寻找解决方案,为同一个动画找到了多个进入点。
This allows us to keep both databases, use selected features and maintain matching styles. We hope that by interacting, matching, and rejecting some frames, our server can do wide matching, limit the number of frames that need to be checked, and address some of the scaling performance concerns.
这样做可以让我们保留两种数据库,使用选定功能并保持匹配风格,我们希望通过互动、匹配和拒绝一些帧数,我们的服务器可以做到宽相匹配、限制需要检查的帧数,解决一些规模化性能方面的担忧。

The aforementioned two characters on the case in a passive role, also use the sports match, the beginning, choosing to make the first interactive system struck the victim from the front, but due to time delay problem, the latter was struck just turned, sports match at this time is not appropriate, although set off a new animation, but in terms of coherence is poor.

After tweaking, we chose to hit from behind and matched a more natural animation, which gave a better performance without completely changing the front and back of the passive participant.
前面提到的两个角色击打被动角色的案例,也使用了运动匹配,一开始的时候,系统选择让第一个互动者从正面击打受害者,但由于时延的问题,后者被击打的时候刚好转过身去,这时候运动匹配就不合适了,虽然出发了新的动画,但在连贯性方面表现的很差。
经过了调整之后,我们选择了从背后击打,并匹配了更自然的动画,这有了更好的表现,而且不用完全改变被动参与者的前后面。

It needs to be clarified that we initially chose this frame to appear in the interaction, because the characters were designed to interact face to face with each other. However, when they actually met, the shadow participants turned around, so the interaction point here failed, triggering a new match and choosing to hit from behind.

The later interactions were more natural, though the hands and feet of the two characters would have been better if the animation had been completely changed. Which brings us to our next topic, continuity choice.

Traditional interactions include the selection and playback of animations. If two characters interact with each other and sometimes three characters collide, one of the functions of motion matching is to switch any frame in the database to any frame in the other database as needed, so as to provide consistency to the player.
需要澄清的是,我们最初选择让这帧图片出现在互动中,因为当时设计的角色互动是彼此面对面的,然而当真正相遇的时候,影子参与者转过了身,所以这里的交互点失败,触发了新的匹配,选择了从背后击打。
后来的互动效果更加自然,当然,如果能够彻底改变动画,两个角色的手脚互动会更好一些。这就说到了我们的下一个话题,连贯性选择。
传统的互动包括动画的选择与播放,如果有时候两个角色互动变成了三个角色碰撞,运动匹配的一个作用就是按照需要把数据库里的任何一帧切换成其他数据库里的任意帧,以做到向玩家呈现互动的连贯性。

For example, here the green path is the default path, and the blue path is the animated match that is updated in real time.

We added a number of features and options, and we finally added an interactive system to map the features available in motion matching so that the two systems could work together as efficiently as possible, which is just the first change of its kind.

Challenges encountered

Not surprisingly, there are some challenges to this design, and I don't have time to go through them all, but I'll cover a few here.

Traditional interactions include the selection and playback of animations. If two characters interact with each other and sometimes three characters collide, one of the functions of motion matching is to switch any frame in the database to any frame in the other database as needed, so as to provide consistency to the player.
比如这里绿色的路径是预设路线,蓝色的路线是实时更新的动画匹配。
我们增加了多个功能和选择,我们最后增加到了互动系统之中以映射运动匹配中可用的功能,以便让两个系统尽可能高效率协同,这只是首个类似的改变。
遇到的挑战
不意外的是,这样的设计也存在一些挑战,我没时间一条条细说,但这里会谈到一些。

The first is the unstable selection, when FIFA was first done, we felt very unstable, more than one frame or two, it is difficult to select the same animation, you should choose the corresponding animation as needed, but this method is not always possible. One of the big reasons is the existence of different matching styles, especially the complex matching request in the interaction, mainly for each entry point, because any condition is not met or a specific frame is not matched, will completely change the matching choice of motion matching for this frame.

The main way we solve this problem is to expand the tolerance of animation matching. In other words, after selecting the interaction, we should be able to select a wider range of matches, which makes the motion matching more stable.

Another big problem we faced was the Pathing process. Generally speaking, interactions that support animation collaboration will issue commands during the interaction, that is, Root motion.
首先是不稳定的选择,当FIFA最初做的时候,我们觉得非常不稳定,超过一帧或者两帧就很难选择同一个动画,本应该根据需要来选择对应的动画,但这个方法并不总是能做到。其中一个很大的原因就是存在不同的匹配风格,尤其是互动当中比较复杂的匹配请求,主要是对于每个进入点,因为任何条件不满足或者特定帧没能匹配,都会完全改变运动匹配对这一帧的匹配选择。
我们解决这个问题主要的方法是拓展动画匹配的容忍度,换句话说,选定了互动之后,我们能够选择的匹配范围应该更大,这让运动匹配更稳定。
我们面临的另一个比较大的问题是Pathing的处理,通常来说支持动画协同的互动会在互动的时候发出指令,也就是使用Root motion。

As shown in the animation, we felt this approach was promising, but when it came to using Root Motion to co-interact, it took away control of the player's character and severely affected gameplay.

For example, the blue player control path never coincides with the green path, which is a bad game for FIFA. Fortunately, the FIFA development engine gives us more options, and we can change Pathing just by changing the animation.

We tried this, thinking that while there would be some dissonance, it would not be so obvious. Because essentially, it's about motion matching, not precise motion coordination.

Performance is also something we focus on. FIFA has a lot of data and systems, so let's talk about some of the optimizations we've made. We soon found that such an interactive system would have many frames of static graphics in the traditional interactive scene.

In this very extreme case, for example, the interactive animations of the two characters don't actually change much.

By default, we have one entry point every 4 frames, so in 300 + frames, we added 75 entry points, so we could have changed to one entry point every 8 frames, but the overall interaction would have been less precise, as the different frames shared some matching conditions.
如动画所示,我们觉得这个方法比较有前途,但真正使用Root motion协同互动的时候,就夺走了玩家对角色的控制权,严重影响了玩法。
比如蓝色的玩家控制路径从来没有和绿色应该有的路线重合,这对于FIFA来说是破坏游戏体验的,幸运的是,FIFA研发引擎让我们有更多的选择,我们可以只需要改变动画而去改变Pathing。
我们做了这样的尝试,认为虽然会有一些不协调,但不会如此明显。因为本质上来说,这是为了做运动匹配,而不是精准的动作协同。
性能也是我们关注的点,FIFA有很多的数据和系统,所以说说我们做的一些优化。我们很快发现这样的互动系统在传统互动场景下会有很多帧的静态图形。
比如这个非常极端的情况下,两个角色的互动动画实际上没有多大的变化。
默认情况下,我们每4帧就有一个进入点,所以在300多帧动画里,我们加入了75个进入点,这时候我们可以改为每8帧一个点,但整体上会让互动不那么精准,因为不同的帧之间共享一些匹配条件。

However, many of the matching conditions in this animation are the same, and because the character actions and angles are largely static, the final choice we made was to reduce the number of entry points from 75 to 4, which greatly reduced the database for motion matching to deal with and significantly improved performance.

Another optimization I'd like to mention is Path Matching. The solution is to add more matches to the interactive system to make Path Matching in the motion Matching system more efficient, and also to further reduce the number of frames sent to the motion Matching.
不过,这个动画里的很多匹配条件是相同的,因为角色动作和角度很大程度上是静态的,最终我们的选择是,从75个进入点,减少为4个进入点,也让运动匹配需要处理的数据库大幅减少,对性能提升很显著。
我想提到的另一个优化是Path Matching,解决方法是在互动系统中增加更多的匹配项,让运动匹配系统中的Path Matching更有效率,也进一步减少了发送到运动匹配中的帧数。

For example, if the green arrow is the required path in the game, the dynamic path that follows the red arrow is bad because it will go in the wrong direction in the future. The interaction has no future matching concept, so we added the remote matching condition, which added a lot of animation and resulted in poor action matching performance.

It is important to note that increasing the size of the interaction will result in increasing the coverage of the animation, which may increase exponentially if there are more interactive characters.
比如,假设绿色箭头是游戏里需要的路径,动态路径会按照红色箭头走就很糟糕,因为它会在未来走到错的方向上,互动没有未来的匹配概念,所以我们增加了远距离匹配条件,这增加了很多的动画,导致动作匹配的表现不佳。
需要注意的是,如果增加互动规模,会答复增加动画的覆盖率,如果互动角色更多,可能会指数级增长。

However, this is great for 2-3 character interactions, you can do continuous Requery pose matching like we did, or choose a better start frame, and I think it can also be used in multiplayer interactions where you only need to pose matching for two fewer characters.

As we can see from the animation, these interactions are presented at the expense of some action coordination while maintaining gameplay. I think this aspect can be improved in the future, such as Root motion and precision coordination to achieve higher fidelity visual effects. However, our team is very happy with the results so far, and we hope to use it in more games, so that's all I have to say.
不过,对于2-3个角色互动而言这是很好用的,你可以像我们那样做continuous requery pose matching,或者选择更好的起始帧,我认为还可以用到只需要给少两角色做pose matching的多人互动之中。
我们可以从动画里看到,这些互动的呈现是在保证玩法为前提的情况下牺牲了一些动作协调性,我认为未来可以在这方面做出提高,比如通过Root motion和精准协同以得到更高的保真度视觉效果。不过,我们队目前的效果非常满意,并希望将它用到更多的游戏之中,以上就是我分享的全部内容。


评分

参与人数 3元素币 +30 活跃度 +18 展开 理由
befu + 6 + 3 先定一个小目标,赚它一个亿元素币!
b888888 + 9 + 7 天下武功出少林,世界资源入元素。
啊盛ZGS + 15 + 8 有点小激动

查看全部评分

本帖被以下画板推荐:

造风者~
使用道具 <
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表