#UE5 Series: Importing Animation to Unreal Engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone Reza here and welcome to my channel I'm here with another Unreal Engine tutorial and this one I respond to a patreon request on how to export animation from your 3D package straight into Unreal Engine this is a good question simply because so many things can go wrong if you're unsure about the workflow I will cover both keyframe animation import and mocap animation import into unreal just to be able to thoroughly cover this topic for you guys while I'm using Autodesk Maya this method should really work with any other software packages that you may have there's a lot to cover so let's get started [Music] while I use Autodesk Maya for demonstrating today's tutorial Autodesk has developed a plugin called unreal a live link for Autodesk to stream animation data from Maya to Unreal this plugin only works with limited versions of these apps so please check the Unreal Engine documentation and the Autodesk app store if you wish to use live link for this tutorial we try to aim for a technique that works for Maya and other common 3D application packages in case you don't have access to the Plugin or have compatibility concerns this method is still very fast very effective and I hope you find it useful with this out of the way let's Dive Right In [Music] alright here I am inside Autodesk Maya I'm going to explore keyframe animation using control rigs full skeleton and keyframe animation first so what I have is a raptor hopping on a hard surface and looking away the whole length is about 80 frame 24 frames per second so let's go through the sequence and see what exactly is happening looking at it and so there's really not much to it we've got camera animation as well but I don't want to export camera I don't want to export lights I don't even want to export the textures what I want is animation I can set them all up again in Unreal Engine 5 where I have a proper environment that matches my animation but how will I be able to export the animation out of the rig that I have right now let's have a look at the outliner I've got a folder just a background static meshes environment if I may I really don't need that in here I have if I just expand this I've got all the controls and the skeleton if I go to show and tell you what I'm just going to go and show all so we get to see the skeleton and the control rigs and of course I've got the mesh here and certain non-scale nodes for the neck and eye preserved in this group with that in mind let's see the workflow on this type of Animation export I'm going to hide the nurbs curves and I'm going to hide all the joints just to be able to see everything clearly with this type of Animation you need to go through two separate steps First Step you need to extract the skeletal mesh and in the Second Step you need to export just the animation you may say Reza what do you mean skeletal mesh skeletal mesh in Unreal Engine is your mesh or number of meshes that can be exported as a single fbx and your rig so to get this skeletal mesh first you need to select your mesh and select your entire skeleton and Export it as a separate fbx few reminders before you do that you need to be mindful of three things first things first make sure there is no repetition in naming convention so if I go in here and let's say I'm going to go to controls hold down shift and click to really expand every single sub directory you can see that everything has been named properly now Maya is a little bit forgiving with naming convention basically you can have two Untitled bones as long as they are in separate folders but remember that can be a recipe for disaster as soon as you bring that skeleton into unreal so make sure there is no similarities in names every single piece should have a unique name that's the first thing the second thing is I'm not using any referencing here but if you do then make sure to go to reference editor as you can see I have no reference here but let's say you have in that case you right click on a reference and you go in here and you import object from reference that's the second thing and last reminder is make sure there is no prefix how do I check that I'm going to go to Windows General editor and namespace editor just to make sure there is no name spacing if there is any selected press delete and the window will pop up and you click on merge with roots and that should take care of the namespacing that will remove the namespacing from your hierarchy so there won't be any issues when you export that skeleton or skeletal mesh as Unreal Engine likes to call it into the application all right with that in mind let's get to work what I'm going to do I'm going to expand my entire skeleton I have no business with controls we do not select them you can even delete them if you want to I'm going to go with skeleton and I'm going to select the first one and scroll all the way I'm going to expand a little bit and select the very end joint and I know there are some effectors from ik handles there will be some constraints there will be some clusters not to worry it's not going to break anything and on top of that once that's done I will shift select the mesh great now it's time to export our skeletal mesh I'm going to go to export selection I'm going to go to its option box fbx obviously is what we want I'm going to go to export and I'm going to create a folder called this assets and I'm going to create a another folder here I'm going to call this keyframe Annie because I will have another folder with mocap dot on it very soon hopefully in this tutorial and let's export in here so I'm going to call that skeletal Raptor so I know what I'm dealing with on the right hand side options let's go through the settings really quick just to make sure that we are sort of ticking all the right boxes so mostly defaults in Geometry make sure smoothing groups is on tangents and by normals is on because we are going to import them we're not going to let unreal to have a take on that sometimes you run into funky results smooth mesh on reference asset content on we certainly do not want animation well if you want to even turn on animation that is totally fine because during the import process we can ask unreal to disregard animation so that's not going to be a problem but we certainly don't want to enable big animation we definitely don't want to do it we want to do it manually as our second step skin blend shapes with I don't have any blend shapes but it's no harm let's just leave it on I don't really need cameras or lights but I do want constrain or skeleton again sometimes you just leave them on that's no problem you can at any point of time just remove them from your scene in Unreal Engine embed media I certainly don't want that because it adds to my file size and I really don't use the data I will texture everything inside Unreal Engine 5. axis conversion if you don't want to convert the scene in unreal then in that case set it to Z if you set it to the default y then make sure to convert the scene when you bring your model alright that should be good to go export phase one done now let's go to the phase two which is to get the animation all right to export animation first I need to um collapse the skeleton and that's probably the most important folder for the second phase again but let's just for the sake of Simplicity remove all the things that we don't need for example I don't need my static objects I do not need my lights I can even go ahead and change the background and sort of simplify the viewport a little bit I certainly don't need the mesh as well so I'm going to go ahead and delete it now I have the Bare Bones with the control curves I'm going to select again the entire skeleton right but this time I'm going to bake it so I'm gonna go into key edit and then keys and then bake simulation I'm going to go to the option box reset the settings and bake so what this does it inserts keyframe per bone throughout the entire 80 frames another thing that you need to be mindful of is you need to make sure that your time frame shows your entire animation if you somehow set it to 50 and your animation goes to 150 you're only capturing that 50 frames my animation is 80 frames goes all the way to the frame 80 and I don't have any other keyframes after that that's why my time frame is set to 80. all right cool with that out of the way I probably don't need to have the control curves anymore so I can get rid of those because now the animation has been baked very cool I probably don't need that non-scale group that I've had so that can go to my render camera I can go to right so none of these are required I can just select the folder with the animation in it and Export it I'm even going to get rid of this layer that I've had now let's go to export selection and I'm going to go to export file this time I'm going to call that animation Raptor changes we need to make in here obviously animation is the priority still bake animation should be turned off because we don't need it we don't have deformation we don't have constrained skeleton if you want to leave them on that's fine I'm not really again too worried about those I just need to make sure that embed media is off just to have a much simpler and smaller file size big animation is off animation is on again access conversion be consistent if you pick Y for the previous one pick y here and convert the scene during the import process alright that looks good to me go export and now we have successfully exported the animation time to fire up Unreal Engine and see how we can connect these two fbx files so we just see one animated character here I am inside Unreal Engine ready to go it's a blank scene I don't have anything so I probably need to create my own folder hierarchy to be able to start with this project so starting with my name and the main content keyframe any export feel free to put underscore but no space and inside that we are going to have our assets so one folder can be cinematic and the other folder can be props and of course the other folder can be materials and textures excellent I'm going to go into prop you can either right click go to import and import the fbx files one by one you can go to add and add all the assets into Unreal Engine 5 one by one or you can just simply drag and drop well once you drag and drop it opens the fbx import options where you want to make sure that skeletal mesh is enabled that's your skeleton import mesh is ticked because you're just a imported your geometry as well we want to have geometry and your weights coming in we don't need to know about vertex color impact it won't be applied to what we have right here animation we certainly don't want to bring animation remember we have another file to deal with animation import meshes as bone hierarchy and that will bring in all the meshes that you may have in your bone hierarchy to be imported without any glitch it's very useful if you have multiple components as opposed to one single mesh I have one single mesh so to be honest with you turning this on and off will not make any difference I would leave this section also as is I'm going to go to transform I really don't know where I want to place the character so I'm not going to make any adjustments in transform 2 because well I would like to drag and drop it and position it myself in miscellaneous if you remember my conversion I did not touch that I did not switch to Z in Maya so I need to make sure that convert scene is on I don't want Force front x-axis and I don't want convert scene unit moving forward with material I do not want to bring the material from my 3D app I actually want to create it by myself and import textures I again don't want that because I want to bring it manually I want to check the color space and it's just a matter of plugging the textures into my material in the material graph that is no problem at all there is really not much else there is probably one thing that I missed at yes that is normal import method so I don't want the compute normal to be the case I want to import normal and tangents that's why we take the normals and by normals during the export process if you remember so we want to bring it from Maya into unreal as opposed to Unreal you compute and we may run into some artifacts all right I think it's all good to go and the good thing about this workflow is you cover it once I don't need to really cover that for the next method that I'm going to show and I'm going to import all and I'm going to close and if I go to the mesh itself and press F you can see that the mesh has been successfully imported and we don't see any glitches or artifacts which usually happens when you have normal issues with with object and of course I have the skeleton as well if I click on that you can see the skeleton tree which is um quite enjoyable to see to be honest with you you may have noticed that some of these bone icons are solid and some are Hollow just if you're curious about it I mean it's not going to make any difference to you whatsoever but in case if you're curious the normal bone icon influences vertices so they actually play role in your rig and if you see some Hollow ones those ones actually don't influence vertices in your skeletal mesh there's really nothing else here to cover sometimes you see a socket icon and if you see that I don't have it here but sometimes you see a socket icon which is a static point that acts as an offset from a point to a bone in case if you run into it that's what it means I don't think I have one here you can create your own bone you can create a virtual bone it's a different topic but if that happens that bone will be colored purple again a completely different topic I'm just giving you some side knowledge in case if you have slightly different rig compared to mine all right um it's all good let's go ahead and import our animation it's all good let's go and import our animation so I'm gonna drag and drop my animation here and now pay close attention to the mesh section you need to make sure that Unreal Engine is actually detecting your skeletal mesh and this is a great sign because Unreal Engine says all right you've got a rig and a geometry and I can see it and I have an animation and that animation aligns with your rig animation lens exported time that 80 frames that we did sync conversion definitely applies and that is it I'm gonna import all excellent now I have the animation I can easily drag and drop my animation and bring it into a position so our actor is looking that way if I go ahead and move my actor so it's actually looking at my Raptor I should be able to see the animation and just double check your keyframes make sure there is no repetition or similarities when it comes when it comes to naming convention and you should be all good to go all right fantastic um from this point you can just bring in mega scan assets you can import your own assets what I can do to make it even better is I can go to material and of course hopefully that part definitely something that you already know but let's say I'm bringing a master material called Raptor and that Master material can be assigned to this uh Raptor right here so I can sort of frame that drag and drop in there and I can just easily go into textures and I can simply bring in my texture so I'm just gonna select these two bring them here that goes to base color and this one goes to normal right and I can go ahead and apply the change and take it from there so from this point onward you can start adding to your scene and just improve on what you have so that method is already done let's go and switch gears let's have a look at a different example where you don't have control curves let's say you have a mocap and keyframes already been baked into joins let's see if the workflow is different identical somewhat similar or what we should really do things that we need to worry about all right see you in the next chapter [Music] all right let's have a look at a different example now I have a brand new scene in Autodesk Maya on the surface it looks the same we have a rigged character animated character and in case if you're wondering about the ACT um this is the guy who's being extra careful his hat probably too much to drink or maybe he's sleepwalking we really don't know but let's say in this particular example which is a mocap data we do not have control curves and the keyframes on each bone is already been baked now always remember in in scenarios like this or you may have a slightly different scenario the objectives are not going to change just to remind you all objectives are how to export skeletal mesh from your preferred 3D application how to import your skeletal mesh into Unreal Engine and how to verify that skeletal mesh was imported properly so I'm just going to select the character shift left click on the hierarchy just to be able to expand I'm going to hold down shift and select the first one go all the way to the very last chain with the shift key held down click to be able to select pretty much all of it let's go into export selection and let's have a look at export attributes so last time we went through the Raptor I'm gonna use pretty much the same naming convention Skillet tall and instead of raptor I'm just going to put the name guy in here you just need to make sure that the animation has been turned off bake simulation is definitely has to be off as well again when it comes to cameras lights so on and so forth we really don't care we embed media we want that to be turned off and with access conversion we want that to be set to Y and if that's the case then we definitely do scene conversion in Unreal Engine everything else should stay the same remember I'm still um planning on importing the tangents and binormals and smoothing groups now I'm just going to hit export and I'm going to switch back to Unreal Engine I'm going to go into file new level and let's create another basic level and within Reza I might actually have a brand new level called that mocap mocap level so everything is nice and organized and we can just make sure that we're not losing any information and go one step back and create another folder and call that props that's where we import our assets gonna drag and drop the skeletal mesh skeletal mesh should be checked import mesh should be checked we're not going to make any other changes in here of course import content type geometry and skin weight as discussed in the advance we are not going to change anything in animation we do not want to have any animation although this skeletal mesh comes with animation we tend to take that off for now since conversion we are going to go through that the only thing I would like to check again under Advanced is to make sure that we're importing normal and tangents of course everything else stays the same we do not want to create material well there's no material in that scene in particular but if there is any I would highly suggest you not to bring any material but to create material inside a material graph in Unreal Engine I'm going to go import now if I were to open this skeletal guy you see this so if you run into that problem and that is actually quite common not to worry switch back to Maya and just be inside the modeling menu set go into mesh display and make sure to harden the edges [Music] just gonna right click and re-import and voila we have the healthy mesh with no artifacts or funky normals that's all said there is no animation in here which is great let's switch back to Maya and Export animation [Music] we know what to do now I'm gonna sort of get rid of everything else and the camera and then I'm going to select the character right here pressing f on it we actually we don't need the character so all we need is right now the animation so I'm gonna go through the same process holding down shift left click to expand the hierarchy going all the way holding down shift left click to select all the bones and I'm going to go into file export selection fbx export selection and in here I make sure the animation has been checked back animation should be off and that is really it again just like the previous example be consistent with your axis conversion this time I'm going to actually call that animation guy fbx surely can come up with a better naming convention but that will do for now let's switch back to Unreal Engine and let's drag and drop the fbx file in here and you can see the skeletal guy has been detected successfully well that's great animations already been enabled for us syn conversion is there and that's to be honest with you all we need I'm gonna go to Advanced to make sure for example import meshes in bone we probably don't need that the rest can stay I'm not going to transform anything or scale anything yep that should do import all now if I bring our guy in here I'm just going to zoom in I'm just going to change the lighting ever so slightly so we kind of do get to see the character a little bit if I go and play you can see I load up the animation quite beautifully and again ground rules will stay the same you can just go ahead and create your material inside the material graph and just assign it you can create the material instance you can put these Snippets of Animation into your camera sequencer and basically put together your shots one after another and finish your project that is really it it's fairly straightforward but you kind of need to know the order and how to approach these sort of different types of Animation baked animation versus keyframe animation rigs hope you found this video useful and use these two methods in your own projects have a great rest of your day and until the next video see you guys later
Info
Channel: SARKAMARI
Views: 10,536
Rating: undefined out of 5
Keywords: ue5.1 tutorial, unreal engine, unreal engine 5, unreal engine 5.2, unreal engine tutorial, unreal engine tutorial for beginners, maya to unreal engine 5, maya to unreal engine 5 workflow, maya to unreal engine, maya to ue5 animation, maya camera to ue5, maya ue5 livelink, import maya animation to unreal engine 5, how to import animation from mixamo to unreal engine 5, ue5 import animation, ue5 import fbx animation, unreal engine 4, ue5.2 demo
Id: JkhMZUVcYc8
Channel Id: undefined
Length: 31min 49sec (1909 seconds)
Published: Sat Apr 29 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.