大家好,本小节我们来了解一下动画蒙太奇。进入到 mini 的动画资产目录中,直接搜索 equip, 在这个 mini equip rifles 单顶上面右击选择创建,找到创建动画蒙太奇,取名为 mini hoster weapon, 接下来我们把它打开,我们先看一下这里,找到插槽管理器,这里是一些第三人称游戏模板,为我们提供好的插槽。我们也可以自己添加新的插槽,可以把插槽想象成一个装置动画组的篮子,而在这个动画蒙太奇中,我们可以配置多个篮子。配置好以后啊,我们就可以到动画蓝图中, 根据我们的使用意图来判断使用哪一个篮子里面的动画。在这里我们把默认的这个插槽换成 four body, 然后再给他添加一个 upper body 的插槽。现在 upper body 里面还没有动画,我们还是把这个 mini equipre for 丹顶给他丢进来,注意啊,是丢在这个插槽里面的。好的,现在我们来看一下这个时候我们的动画蒙太奇里面有两个篮子,一个表示全身的,还有一个表示上半身。这里需要注意一点的是,插槽本身他只是一个标签,具体是要全身动还是上半身动, 是要到动画蓝图里面去设置的。接下来我们把这个动画猛抬起,复制一份,取名为 many anhoster weapon, 这两个一个是收起武器,一个是拿出武器, 动画是一模一样的,只是那个动画通知不一样。动画通知我们会在之后的课程中讲到,下面我们就要去动画蓝图里面设置了, 我们看到从 mislease 出来之后,就进入到动画蒙太器中,这里使用的插槽是 default slot。 我们从这先把它断开,把这一部分先放到一边,这里也先断开。我们先 先把上面这一块注视一下,这里就叫缓存 local motion 姿势。然后我们把 mist 的也缓存一下,这里搜索开始 pos, 选择新保存的缓存姿势,连接好以后,我们给这个缓存起个名字,就叫 mist。 开始注视一下,就叫缓存 mist 姿势。 接下来我们来制作全身动画的缓存姿势,右击搜索 misleads, 就它了,把它连接到这个播放动画蒙太奇的节点上,选中这个节点,把它切换成敷包的插槽, 把这个姿势缓存一下,取名为 four body cash。 备注一下,缓存全身姿势。下面来制作上半身的缓存姿势,搜索 layer bland, 选择每个骨骼的分层混合。我们看到这里需要一个基础的姿势,还有一个混合的姿势。注意啊,基础的姿势需要用到 mistate, 而不 是否包顶。接下来我们搜索 default slot, 添加一个动画蒙太奇的默认插槽,把它切换为 upper body, 连接到混合姿势零上面。那这里我们还是把 mist 的姿势丢过来。完事以后啊,我们把这个姿势又缓存一下,命名为 upper body cash。 好的,注释一下缓存上半身姿势。那本小节我们就先讲到这里,我们缓存了两个将要用到的姿势,一个是全身的,一个是上半身的。下一小节我们来看一下如何输出这个姿势。
粉丝7041获赞2.6万

hello, guys! welcome back to another video in this video i wanted to show you guys how you can create animontoshes such as this one right here or you can play animation montage only the upper half while blending it in with your running locomotion as well as in addition playing animations from the root bone up, so you can play say getting in the car animation or picking up items inspecting items whatever you want so that you can play either or animations that are blended from the root bone up or animations that only use the hip bone up and all this is very easy and very simple to set up here is the animation blueprint so without further ado, let's go ahead and jump right into the video so first up what you want to do is download the project files here? i just have a couple animations from miximo that i've already retargeted and once you've downloaded the project files we can go ahead and create a new third person blueprint project i'm just going to name this animation montage all right and with our project open we can go ahead and drag the animations in and for the skeleton we'll just use the ue formatican click in port all and this will take about a couple minutes all right now that it's finished importing we can go ahead and in our project what we're going to go ahead and do is right click all of these and create a montages and with the animations what we can go ahead and do is just make a new folder and drag all of the animations and that folder just for now we don't need them all right so the first thing that we need to do is we need to define which animations we want to play from the root up and which animations we want to play just blending from the hip bone up, so for example the entering the car and a may kick stance move picking up fruit all for these will be the root up and then the quad punch in the reload will be played from the hip up, so to distinguish both of those what we need to do is go into one of our root animations and what we're gonna, do is we're going to create a new default slot? so to do that we click this little montage down button and click here slot manager it's going to pop open this new window right here that allows us to add a new slot, so we're gonna add a new slot we're not going to add a new group, so click on the default group and add a slot and we can enter a name for this i'm just going to name this root slot press enter and there we go so now to assign this new slot to this animation we just click here the slot drop down and change this from slot name to root slot, you're gonna see our character here instantly goes to an a pose or say if you have a t pose it'll go in a t pose click save closes and reopen the animation and then you see it place fine you're also gonna notice in the default root slot here it's changed so now we know that it works okay, so we're gonna go ahead and do is do that for the rest of these three, so we can go ahead and slot name change that to root slot save that reopen it same with this dance move here change it to root slot save and reopen and then for the pickup fruit same, thing okay, so all four of these are set up and now these other ones so we're just going to use the default slot to define the ones that we want from the hip up you could make more slots if you wanted to blend from different locations, but for now we're just going to stick with two so now what we need to do is select our third person character and edit our animation blueprint so to get to the animation blueprint you can either navigate it through your content browser or you can click edit third person bp and we'll bring up the third person blueprint select your mannequin we can go to our third person and amp p here if you hit that little magnifying glass it will pop up here in the content so in here we're going to go out to our animation graph and we can disconnect that now basically what we want to do is drag off our default and type in save so it will new save cash pose so essentially what we're doing is you can't have multiple of these default state machines pretty much you could only have one output flowing so in it order to have multiple of these you have to save the pose to a cash, so we can go ahead and select that and rename it to pose cash then we can call that pose cash by typing in pose cash and you can see it it's right here so that allows us to copy and paste it and pretty much use two of the same thing right and now what we're gonna do is a layered blend per bone and essentially what this allows us to do is to blend two different animations based on bone and off of our post cash here we're gonna drag off into default slot and if you've ever messed with animation montages before you've probably already done this before and then off our layered blend per bone we're going to click on that under the layer setup zero we're going to add this branch filter and this is essentially the bone that we're going to blend it at so for our default slot we're going to blend at our spine sir one bone and for the blending you can either leave it at one what i like to do is leave it at four and this just chooses how far up the spine will the animation blend you can mess around with this number later now off of this we're going to copy paste a pose cash here and copy paste a layered blend per bone that up there hook the post cash up to the base pose then we'll do a default slot and hook that up into the blend pose zero first things first when it changes default slot to our root slot and then for our layered blend per bone we're going to change this from spine zero on to root which is essentially the root bone and if you're using any other skeleton the way that you can find this out if is if you go to the skeleton the very top of bone not that very top is the root, so i believe for genesis characters like dazz characters it's like genesis eight male or genesis eight female, but essentially the very top bone is the root, so we do root right there and the blend depth you can set that to one okay, so that's pretty much all you need to set up there animation wise now to demonstrate our animation montages we're gonna add a little blueprint so in our third percent character blueprints event graph we can add a one key and then a two key and basically we're going to play and a montage and then off of here we'll do a select and for each of these we'll just select the root animations so i'm just selecting the content browser and then hitting this little arrow so all for these and then we'll do a random int maximum of four and hook that up for the index okay, so that we'll just select one of the animontojeges that we have and randomly play it as for the two we'll only play the ones that we're blending from the hip up, so we'll go ahead and do another select and then we'll just select the quad punch animation the reload and then we'll do a random int between two okay, so if we hit play now, we should be able to hit one and you see we're playing the root animation and then from if we hit two we're playing the animation blending from the hip up, so you can see we're reloading here and then we're also punching but then we hit one getting in the car or we're going in inspecting things or playing animation pretty much from the root bone up, so this is very helpful if you're doing dance, moves emotes and stuff where you want the full character to move and it's also helpful if you're just trying to play animations that will blend with your locomotion with jumping as well so yeah that's pretty much all i want to show for this tutorial it's a very basic way on how to set up your animation blueprint to common state for two different types of blending hope you guys learned something new in this video and if you guys like the video make sure you hit the like button and subscribe and i'll see you guys in the next one。

欢迎各位来到亚娜虚幻学院,本节课我们来学习一下关于这个蒙太奇,那蒙太奇的话,从这个基本功能上来看,好像跟我们的上节课学习的动画合成好像差不多的感觉,但是呢他们的用法全是不一样的, 那么在这个动画合成的话,我们是可以直接拖到这个,就是我们可以直接把动画合成拖在我们的这个状态机当中使用,但是这个蒙太奇却不能 蒙奈期的话,主要他的所有的动画这里面的东西我们是用来剪,可以这样来说就是说我们剪切某一段我们的动画,用蓝图去驱使去调用它,比如说,嗯,你要涉及一段这个连招,就是连招性 动作,当然这个动作里面也许我们可能不一定是每一个动作都会用的到,我们这时候就会像剪切一样,可以把这个动作切成一段一段的去这样进行使用。就比如说我只用攻击一这个动作,然后呢当他 这个鼠标就是说他没有松开,他一直按着,就是像我们游戏里面经常遇到一种,我如果说按住鼠标按了一下,然后立马松开了,他只会这样抡一次刀,假如说呢,我们嗯 一直按着鼠标没有松开,那么他可能就是说这样轮两次或者三次或者更多这样的一个连招的一个功能出来。所以呢,咱好今天我们来认识一下这个蒙太奇的一个基本最简单的用法。嗯,我们先来看一下,课前我先 做了一个视力,那么在这个功能当中呢,就是我如果说按一下鼠标左键,我这时候按了一下,我立马松开了,只是按了一下它是这样的一个攻击动作,假如说呢,我一直按着鼠标左键,我现在没有松开它, 他就会有两种这个攻击动作一直在循环,那么假如说我突然你们来看一下 一二,我如果松开了,然后他这个循环的话,播放完了以后,他就会回到我们的一个待机状态,这样的话就是, 嗯,我们游戏当中很常见的一种情况,我按一下就是一个普及普通攻击动作,然后呢我如果一直按着的话,他会产生一个连招。 当然今天呢,我们只是做的一个很简单的,他其实处理也不是多么完美,我们只是说先来认识一下蒙太奇的一个基本用法,至于更细节的话,最好大家可以最好做一些更深入的一些判断性的一些研究。 那么至于怎么判断我们,我一会会给大家做一个很简单的一个示意,所以在此之前呢,我们先把有一些我做过设置的地方,我先删掉, 想恢复到我们基本的一些地方,我们一步一步来看一下, 那么这时候他就没有任何的攻击动作。 我们现在呢先新建一个蒙太奇在右键当中,然后这首歌动画,蒙太奇选择我们当前这个角色,谷歌, 我们双击打开它,然后在资产浏览器当中,然后我们去找我们可能想要放进来的这个动画,但是这个动画的话, 你可以组合多个动画进来,就是这样的话方便于你比如说剪切这一块使用,然后再剪切后面这一段使用,这样的话你可以跳跃着多种组合进行使用,不一定只用一个, 那我这一块我就先拿一个,这样视力比较简单一些。我们先找一个攻击动作, 这个空气动作当中他有好几个连招组成的,当然你也可以再拖一些其他的进来,然后我们随便先拖一个吧,我一会举个例子, 这是另外一个,那么在这个蒙太气当中呢,我们早可以看到只要有这个紫颜色的这个像标签一样的这样的东西,那么他就可以问我们把这个动画的一剪切开,比如说 我现在前面这半段不想要想,只想让他从这儿抡刀这个动作,我右键在这个地方指的是蒙太奇这一行右键,然后新建一个蒙太奇片段,给他命一个名字。然后呢 我们再往后拉这一段,看他播放到啥地方, 差不多就是这个地方吧,我们可以拖动底下这个条,把它放大一些, 然后再新建一个, 这样子的话他中间这一块呢就是一个单独的一个动画可以进行使用了。我们点开这个蒙太奇片段这块看一下, 默认这块他可能会这样连续起来,然后我们可以把这一块呢叫点击一个清除,然后他这样他就每一个是一个独立的动画,我们点击播放看一下,我现在点击这一块这个预览,就是我中间这个攻击一这个地方,他就只会 这一块攻击,我们看一下点击播放这样子的话,我们在调用动画的时候,他就只会调用中间这一段这个动画,就是我们可以这样对动画做一个剪切,然后呢我们再剪切第二段, 第二道门可以是一个抡起长了一个的, 那正好我们给他先移出连接吧。然后在这个攻击一的地方,我们可以点击这个小方块,就会选取下一个片段,就让他播放谁,我们可以让他播放,比如说攻击动作二,让我们看一下 啊,这时候的话,我们需要在这儿点一下预览攻击一, 然后攻击二,他就会往往反于攻击和攻击二,那假如说我在这一块再增加一个攻击二呢?他这就很明显变成了一个循环的一个样子,这样子的话我们在第一次的这个播放的时候,他会播放一次攻击一, 然后攻击一播放完了以后就一直在攻击二进行循环。这样主要取决于是我们在编辑一些连招的一些判断的时候,怎样可以做出一些各种各样的变化,以及于你攻击二这一块的话, 我们是不是在可以考虑增加一个攻击三,然后呢把它掌握一直排序下去,或者说我们给他增加一个新的动画片段,我们刚刚在这一块不是新增加了一个其他的一个动画资产,我们可以在这呢 增加一个蒙台器片段,比如这一节是公祭四,如果这个位置觉得自己没放好的话,我们可以放大以后,鼠标拖动它,紫色的这个标签可以移动它, 这是我们把攻击三这一块的话,我们可以把这一块取掉,然后这一块直接加了攻击四,那我们这时候来观察一下他的播放是怎样一个播放的,他是先从播放攻击一,攻击二,然后直接跳到攻击四, 那么他会形成这样的一个攻击片段,所以这样的话我们是不是就可以对他进行任意化的一个组合了?嗯,那么本田和作为蒙太奇的一个初步认识,我们先来做一个最 简单的一个功能实现,接下来我们需要在这个动画蓝图当中,动画蓝图当中你首先要把你这个嗯磨难器的这个插槽 插槽给他加进来,那么插槽的这个名称呢?将要他可能会有多种多样的各种名称,你可能也许会新建一些其他的名称产生,或者说其他的插槽,我们可能会根据动画的需要做各种各样的这个感叹号的话,是因为你这个基本上是重名的意思, 我们直接在这一块去搜索他这个 slot 就可以了,这样的话很快就可以找到 slot, 然后就可以看到一个默认的一个插槽,就是蒙太奇这一块,然后我们可以看到他这个对应 这个插槽名称呢,正好就是我们当前用到的这个默认的这个插槽组这一块如果说你新建的有其他的,我们可以在这边选择其他的就可以了。 嗯,在这一块的话,我们只需要在状态机然后中间连接一个蒙台器插槽到这个输出出姿势这一块就可以,然后我们点击保存以后,在我们的蓝图当中我们来驱动一下他, 那么我们用到的是鼠标左键,当左键播放了我们这个蒙太奇的一段动画,我们输入一个扑来,然后 按一个 m 葬就找到了这个播放蒙太奇,记得是这个前面这个亦不加载的这个符号,而不是说有的同学可能会用成这个, 我们用的不是这个东西,注意好这两个两者之间的一个区分, 那么关于这个的话,我们需要把这个网格体连接给他,然后资产这号选择我们的这个蒙太奇,你要播放他的两一段动画呢,那么这个动画名称就是我们在这块的这个命名的名称,这个我们把攻击的这个片段名称复制过来, 那么这时候我们一个基本的一个茅台系统化就已经实现了, 我们先点击编译,然后运行,按一下鼠标左键就可以看到呢,他已经开始播放了。 当然这一块这个播放的话,我们这个是攻击一,但是他好像连接了攻击二的动作,所以我们可以把这个直接连接取消掉。因为他刚刚我们看到播放了两种动作,现在呢我们按一下 他播放完了以后,就会回到我们的一个原本的一个待机状态当中,那我们现在呢正好让他在 连续播放一个,就是当这个动作一完成了以后,然后我们就紧接着播放这个动作二,就是我们刚刚工作攻击二的这个动画,我们看一下 按按了一下鼠标左键,然后他第一个动作播放完了,就开始第二个动作,这时候第二个动作完成了以后呢, 在他这个完成时,我们可以直接又跳转回来, 这样的话就代表一个死循环了,就是完成了又回到了造原型的这个攻击的这个动作,我们看一下, 那么他也会这样循环起来。嗯,但是我玩游戏当中有时候会遇到这种情况,就是鼠标松开了以后,他肯定是不再进行攻击了, 那么遇到这种情况的话,我们就需要去做一些处理,比如说我们这块我新建的一个空变量, 我们可以设置他鼠标这个左键为针的时候, 那么就是说他这时候鼠标左键为针,就是代表我一直正正在按着这个鼠标左键为针的时候呢,他才会播放这个第二段动画。那么假如说鼠标松开了以后,我们这一块就应该为假, 他就不会再执行这个第二段动画,我们试一下效果,那么整个,嗯,一个梳理的意思就是我一开始把这个变量设置为真,那么他肯定是按照一个正常的一个走向,假如鼠标突然松开了,称为假了 美甲了以后呢,他就不再执行任何的一个事件了, 这时候鼠标左键是一直按住的,如果松开了, 我点了一下,然后这时候我松开了他就只会直接这么一段动画,所以呢然后你们可以 发散自己的一个想象,做出各种各样的一些组合,比如说这个动画突然被打断了,然后我可能会出现一个其他的一个什么动画之类的。 所以呢本节课我们作为这个先初识一下蒙太奇的一个基本功能,那么基本就是这么多内容,所以今天我们就先讲到这里。

the ones that we want from the hip up you could make more slots if you wanted to blend from different locations, but for now we're just going to stick with two so now what we need to do is select our third person character and edit our animation blueprint so to get to the animation blueprint you can either navigate it through your content browser or you can click edit third person bp and we'll bring up the third person blueprint select your mannequin we can go to our third person an mbp here if you hit that little magnifying glass it will pop up here in the content so in here we're going to go out to our animation graph and we can disconnect that now basically what we want to do is drag off for default and type in save so it will new save cash pose so essentially what we're doing is you can't have multiple of these default state machines pretty much you can only have one output flowing so in order to have multiple of these you have to save the pose to a cash so we can go ahead and select that and rename it to pose cash then we can call that pose cash by typing in pose cash and you can see it it's right here so that allows us to copy and paste it and pretty much use two of the same thing right and now what we're going to do is a layered blend per bone and essentially what this allows us to do is to blend two different animations based on bone and off of our post cash here we're going to drag off into default slot and if you've ever messed with animation montages before you've probably already done this before and then off our layered blend per bone we're gonna click on that under the layer setup zero we're going to add。
