Unreal Engine 5 - Vertex Animator - Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial I'll go through the the vertex animator plugin that was created for real engine 5.1 to 5.3 at the moment uh so here I already have it enabled so after enabling you need to press Start engine then you should see this icon up here and once you open it you'll see this window and here you have three options uh so to get started we actually need to create the vertex uh animated static mesh uh so for that uh in this tutorial I'll use the sample content so if you press here it will import those uh here you'll see a few different files that technically you could already start setting up the the animations with this uh but in this case I'll use just the skeleton mesh to show you the full uh progress of the of this so let's start by exporting the skeleton mesh and here I'll just save it as SK factory worker Source just to have a separation there I'll disable these options here and Export uh so the next steps uh you can choose if you want to do it with another 3D software I recommend using blender because there is also a plugin for that uh an addon actually uh the addon will be listed in the uh documentation and yeah I I think the documentation has it so for that you go here install this and enable it uh next let's import the the fbx so we go to that same location tutorial files sample content and import it so the process here is relatively simple so as you can see uh we don't need materials at the moment the basic idea here here is chopping up the model into parts so let's say if we cut it here here here here here and maybe one cut here one cut here one here uh basically all the main joints of the body uh because we don't need the fingers and we don't need any other uh smaller bone so the idea is to chop the model like this so let's just disable the annotations uh just a second I forgot where that was well anyway let's skip it that for now uh okay so to get that going uh in this case I'll just use Alt J to try to quadric uh not to make the topology into quads just to make it easier uh but the process here is literally the one mentioned so you are just going to select select uh detach or split if necessary so for instance here maybe we can split in this part and then we detach it and yeah uh this process is a bit tedious uh but in the end I'll just open the other file so we don't waste that much time with this but what you should have is something like this in the end let me just hide the skeleton for now so if I change here and yeah random uh so as you can see you have several different parts uh the only extra step I took here was to close the the parts as you can see it was done pretty quickly so the mesh is not perfect but you actually can do of course a like a better job doing that so that that is basically the main part of the process uh after that another step is actually renaming the static meshes so for that I recommend using uh let me just just disable so I can show it so for that I I recommend selecting the Armature going here to the object and put it in front just so you know which bone uh you have seen and then here on the skeleton just enable names uh basically what we need to do is rename the piece to the bone that is here so as you can see in this case I already have all of them renamed so the head piece has the head bone name so it it's just that on the whole process like in this case here I picked the spine to because it's more or less in the middle of the piece but usually for arms and legs you pick the of course the major bone and then you just leave the foot uh in blender that is almost all the required manual work so after you reach this point uh having only the Armature and the different uh split pieces here uh and of course enabling the the add-on uh you see it here so you have the vertex animator tab uh this option here is just if you have let's say you downloaded the skeleton from mixam mode then you can put here make some more rig and you can remove the that string for the name just to make it cleaner this is just like an extra feature uh the main thing here is actually to select the Armature that you want to use in this case we just have one so you just select that one and you generate the files uh watch out here here now it says generated successfully meaning everything went correctly uh one thing that can go wrong and may go wrong is let's say that you have uh a bigger skeleton let's say something like this like a giant model and you try to do the same process yeah actually here it didn't didn't happen the issue but uh let's do it differently then let's say you have uh like a limb that goes a bit longer than usual uh of course assuming that this is a human scale and this is just to show the edge cases okay let me try to replicate that issue so we have this and we stretch this arm a bit bigger than usual uh if you receive this option object left arm 001 is outside the 1 M uh 1 M length uh you notice that a few pieces on until that one will remain the in uh basically what that means is that uh if you enable this collection called bounds priew let's enable it uh basically each piece can't go beyond these bounds uh because the Shader is limited to this one M bound uh meaning that if you do need uh let's say an arm like this to be exported uh the ideal solution would be to actually rescale the rig so let's say something like this and then when you generate the files again that will be generated successfully because nothing will go out of bounds so that's just something to keep in mind in case it happens uh and yeah if you want to check what's being exported uh in the same file location that you put the blender file oh this one in the same location uh there will be three files being exported yeah this is actually the source so let's put it here so I have a text file an SK uh sample blender SM sample blender which in this case inherits the name of the file so the first option you need only in the engine yeah uh of course everything will be needed in the engine uh the second file is uh the skeleton mesh uh this is just in case you have uh race scale the model so just to make sure that everything fits correctly uh it also exports the skeletal mesh and this is the static mesh and just so you know how the static mesh should look I'll just import here so it's static mesh and as you can see it just looks like a bunch of uh pieces scattered for some reason this shouldn't happen but yeah let's see how that that will behave in the engine so yeah in any case let's just for that arm yeah so yeah basically if you notice anything weird going on in the engine it might be because of the bounds uh I know that that that issue might happen because of the scale of the the skeleton and the scale of the mesh so there is this balance that needs to fit correctly so yeah just be mindful that these bounds need to be respected so anything let's say that uh that case happens where the arm goes beyond it means that the part Beyond will be animated with the another with the next section of the mesh so yeah just to keep that in mind uh and yeah let's just re reexport with the correct the correct length of the uh generated successfully and just to make sure let's import it again in the engine static mesh yep that's how it should look no part should go beyond the limits yep so yeah that one we got ready uh so basically if you don't use blender uh there is a section in the documentation that sh that that uh goes through the exact needs of that so if you check this one manually processing the mesh on Page Six you actually see all the uh all the changes that the plugin that the add-on does so you can just follow these uh in this case just to keep it short as well I'll just explain the blender uh workflow so yeah the blender part is done so the next step is let's just create a new folder so I new folder here and and here uh sample content okay let's import the skeleton mesh I'll just create a new skeleton I do not want materials now and yeah so this is the skeletal mesh now I import the static mesh no materials as well yep uh another check that is important to do is actually dragging both to the scene just to see if this scale is correct uh and this is a very important step because if they don't match it it doesn't need to be exactly matching just make sure that it's not like that this is not like this oh oops if it's something like this you should probably uh either edit this one or edit the skeleton MH but basically the sizes should be consistent uh and also another thing that we will need is uh actual animations so for that in this case I'll just use mixim let's just call [Music] the just log in here uh the animation can also be from inside the engine if you want to do retargeting from uh an asset asset package to your uh to this skeleton that's also doable so in this case let's let's just wait yeah of course you need to upload the character so let's pick tier sample content let's upload the skore sample blender let's just wait a little bit yep so it should automatically detect your rig so let's just hit next next and let's look for a l just to to actually test it uh let's say I don't know this one yeah so H yeah I think that's a good one we don't need the skin so let's just without the skin the skin meaning the actual mesh so only the animation will be exported and that's everything we actually need so I'll just put a name dance 01 yep so after that we do the importing we make sure that the skeleton is correct so this is skeleton here yep and yeah one thing to make sure also is that yeah the simple rate just to make sure set it to 30 because sometimes mix some animations come with like higher sampling rate and that can take a long time so you may notice that some of the animations have this issue of the rotation so you just come here to the import rotation type 90 on the x axis and PR Port animation so that should be yep that's correct now again let's just make sure that yeah the sizes are consistent uh that can also happen and sometimes that the animation and the actual skeleton mesh have different uh different sizes so yeah let's go to the to the actual plug-in now so this is the interface and in this case let's create a new rig so you open that uh this case let's call it factory worker which was the original name of this mesh uh you drag the static mesh here skeletal mesh here uh this bone order is the text file that was exported so you just need to open it select everything copy and paste here uh basically this is the order of the elements that you have exported uh meaning that if you if you notice here like it starts from ahead then hips then left arm left foot and so on so this is literally the sequence of the Parts uh and they have the exact name of the bone as well and that's really important to make sure it's correct in case you do the manual workflow and yeah let's just create a rig uh let me delete that one and you'll notice that in the center of your scene there will be a replica of the uh static mesh and that's mostly for previewing purposes so in this this case let's let's start uh making some animations so this section is meant to create animations as soon as you drag the animation in you'll see that the name Will Change also the FPS may change uh I think the default is 15 if I'm not mistaken you can give whatever name here so I'll just keep the default so anim uhor Dance One add animation and it will clear again so in theory you can just create another one and so on so yeah uh you also notice that there is this blue button saying the name of the animation painting bake uh basically what that does when you press is literally baking the animation so let's do it now so you see a process and the preview of the animation here and once that's done you will be taken to a folder where that animation is saved let's see let's see yep so uh this is the exported assets uh there is a blueprint just for previewing purposes so it already has the material assigned to the static mesh and everything uh if you check the assets folder you'll see the material and the uh baked information here you also have the animation asset here uh you don't need to change anything inside and I honestly don't recommend changing anything because it may affect the animations uh and also under the name of the the factory worker which was the name of the rig you'll see the rig file and the source is basically the static mesh so you kind of contain things inside here uh in the assets folder you also notice this is the master material it's a copy of the one from the plugin so you can freely change this and this is the current animation the current material so here you can do whatever you want the only thing that you need is this part here of the material and if you create an animation from that uh if you create an instance like this the only thing you need to change is actually this so you need to assign the animation data and the animation settings in these ones uh and you have these other parameters which you can test for yourself and yeah that's pretty much the baking part so technically you could already use this uh you notice that the materials are white but it's just a matter of actually assigning the correct material so if I go here and apply here you'll see that yeah it's there so it basically works that way uh you also know not is a few extra options here uh the first one being the bounds editing uh because one of the problems with this type of animations is this as you can see the model disappears when I tilt the camera and that's because the bounds are actually this so the model looks different but the bounds of the objects are like this so when the camera goes outside that the model just goes out uh and that's why you need to change and fix the bounds for that so you just enable preview here uh press G uh the green box is this is representing these values which is uh like a recommended bounds and the red one is the current bounds so technically when the camera goes uh when the red part goes out of the camera the model disappears and that's how bounds work so what we want is in this case let's just apply the green one so you can use the default values here and just apply new bounds so in this part here uh as you can see now the bounds are correct I don't know what happened but basically now you can actually see the whole character and it doesn't disappear unless you actually uh go with the camera out of those bounds and yeah that's the desired Behavior Uh you can also reset the bounds and yeah uh either reset apply new bounds you can copy from a static mesh so let's say you have you want to use these exact bounds you can just pick here apply the bounds and yeah so yeah that's pretty much that and the next thing is the optimization method so the optim optimization method basically means if you want to use lods or Nite uh Nite don't actually doesn't seem to work that well with World position offset so I recommend using lods uh here you can uh basically apply the same uh profiles from the the static mesh editor so in this case I'll just put the high detail one usually it's it's pretty okay and that should apply to the static mesh and yeah uh that's pretty much the workflow so you adjust the mesh you import the files here and then you may ask why what's the main advantage of this te technique over using actual skeletal meshes uh so I actually put together this is small demo uh you can also download this from the uh Marketplace page and also in the documentation if you check the end of the documentation here you'll see there are a few links so you can actually just check those uh this is the link so it's a builded project let me just open that I'll just close this because my laptop is not the best so I'll just open this and this is basically a stress test project so as you can see here it's using the vertex animator and lods so let's just expand the count so let's see how far I can go uh expand expand so at the moment we have a a, 700 uh yeah let's put a few more yeah so maybe 2300 uh instances as you can see the FPS is not ideal uh but keep in mind that my laptop has a 2017 so it's kind of oldish model uh but let's compare to skeletal meshes plus lods which they are using exactly the same profile so meaning the same reduction so let's see the difference 25 to 30 and if I put LS you can see that it decreases uh the main advantage is usually for big crowds because it doesn't actually uh affect that much the performance if you put in a better computer you can go up to I don't know 10,000 uh characters like this and you can easily just Swap and if you want to randomize animations like having multiple animations you can also do that and usually doesn't affect performance that much the main factor here might actually be the uh the static meshes the poly count of the scene so yeah technically you can you can try to go further to see how your computer behaves and yeah if you like it just go for it this project is basically meant to for you to compare the result and see for yourself if this is good enough as you can see the only downside is the character is actually kind of Cho it up but depending on the on the output and the distance that you need to see them it actually looks quite good so yeah like you can build huge crowds without affecting that much the performance and yeah that's it yeah thanks for watching and yep have fun
Info
Channel: Emerson Rosa
Views: 787
Rating: undefined out of 5
Keywords: vertex, animator, unreal engine, vertex animation, shader, plugin, crowds, unreal engine 5, tutorial
Id: skP68byWACg
Channel Id: undefined
Length: 26min 58sec (1618 seconds)
Published: Fri Mar 01 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.