Unreal Engine 5 Animation import Pipeline and how to export to Maya and back

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to the animation import pipeline overview class i am tony ballerin i'm a solution architect at epic games in this class we're going to talk about coordinate systems unreal data types input formats root motion on animation taking your animation back to maya how to update your assets in unreal and go through some simple retargeting i want to start with coordinate systems because i get a lot of questions about how should i create my characters why upper zia the industry mostly uses yup but because unreal ziap what are the problems that will come from that right well so here on the left you see i have a y up character and on the right i have maya set to z up and i literally change the rotation of the bones and reskin these both characters so they were as if they were natively made in y up or zia so that we can bring them both in to unreal and see the difference because in real we'll convert the coordinate systems to match what it wants so here we just bring it in with no skeleton preset you can scroll down look at the information and you can see it's yup and it's right-handed system unreal will flip the left and right-hand system for you as well so we convert the scene we bring manny in y up we look at it and you can see z up right unreal took the axes converted them to a zeo system so let's look at the z up where maya was set at z up bring this in clear the skeleton because we don't want to share that skeleton we want to bring it in fresh and you can scroll down see you can still keep the conversion scene on if it if it's already zee up it won't do anything and even though it says that it thinks it's y up we know that it's actually zia and z up is the preferred animation coordinate system you want in maya which we will see later load manny up of course z up it didn't switch it back and forth it just converted it to what it wants next i want to talk about unreal data types and the differences between skeletons and skeletal meshes here you can see the core asset types on the left we have the skeleton which is just a list of bones in the middle we have the skeletal mesh which is the geometry that is bound to those bones and on the right we have just the animation which is the movement of those bones let's inspect the actual skeleton in the reel you can see the bones in the center on the left is a list of the whole hierarchy you can select any of the bones and it'll highlight you can move it around you can also turn on the mesh assigned to those bones now we can switch over to the skeletal mesh tab and you can see the properties of the geometry that goes on the skeletal mesh this is where you'd set materials lods you can also see all the various skeletal meshes that are compatible with that skeleton and those can be different proportions but they all need to have the same base skeleton this is the base skeleton of quinn it's the low bone count which you can see here most of the bones are gray switching to the high bone count version most of the bones are white these are still compatible skeletons because all the extra bones are just leaf bones or child bones moving on to the animation tab is where we can choose whichever skeleton is compatible and play the animations as well this is really nice you can see how things look on different skeletons but here we can scrub around add tracks for game elements and see a list of all the animations that you can use for that skeleton there are two main formats of animation in unreal there are fbx files which we looked at and there are alembic files alembic files are a series of point caches that define where in space these points are they are not bound like traditional skeleton uh one reason you might use this approach is let's say you wanted to use a lattice and you wanted to make a a very unique deformation that you couldn't represent easily with bones this is this is common with uh lots of high-end character work facial animation sometimes you want to you want to deform something a claw simulation for example you'd see this a lot too so you can do whatever type of deformers you want in maya and then you can say export that to a olympic cache you know you just choose file and then the important thing though is that you write out the uvs if you want textures and you write the face sets out because that's on the other end unreal what unreal is going to assign its materials to so so you turn that on and you process the files it's going to run through and it's going to bake for every vertice it's going to bake every frame its position so one thing about that though is that these files can be very very big right so normally that character might be two megs uh this limit file is 174 megs right so it's it's much much more data being used then there are a couple ways you can bring it in you could bring it as a static mesh you can bring it in as a geometry cache which is what we're going to do there's also a skeletal mesh with a bunch of blend shapes but for this example and for most of the times we're going to use geometry cache and most of the settings are fine you can use the default settings now when you bring it in because it's a much bigger file it's going to take a bit longer uh than than most assets this is not too big so we have this u asset and you open it up to look at it and you don't see anything interesting so it's not the most convenient to deal with uh in that respect but you drop it in the world and what you'll see is this geometry cache has in the properties that you can adjust the offset right so you can tell that there's something there right so you're cycling through the animations that we had [Music] if you want to use this in your animations you are going to have to put this in a level sequence and then animate the geometry cache so just real quickly we just bring a level sequence in we can add this actor into the sequence limbic test and then you have to drill in the track and find the geometry cache and then that basically is the way if you wanted to to do this and you know there's lots of reasons why you might want lattice deformation on characters or background items so it's useful for that so root motion is something that i also get a lot of questions about and there's some really great things you can do through motion that aren't always obvious and so i wanted to share that so what is it first of all well on the left you can see that the root of the character is staying still and the pelvis and the rest of him are moving away on the right the root of the character is moving with the character so historically this is more in games useful but i can show you some ways to use this in unreal that will make your life a lot easier especially in the assembling of animation so here we have a dog and this dog has a walk cycle uh root motion is very nice for mocap because then the feet are always planted and the character stays still so this dog's motion he goes and stops and then you know if you loop it because the motion of the character is is in the clip it'll just snap back to the very beginning so what we can do is we can right click and tell the clip to match the root motion of the previous motion so it will essentially move rotate and snap the next clip at the end of the previous one right so here we can do it again and now the dog will continue to walk and will seamlessly continue forward without having to line up the the clip now if it's just going straight it's not that tricky but if you have a library of animations with rotations this becomes much more powerful so here we have a turn but the turn does not line up so we can snap it into position and now we walk and it turns now you see there's a pop there right so so this is a situation where uh unreal is not really a motion editing package here this is assembling the motion so you can do blends and you can do fancy stuff but there's there may be times when you need to like clean this stuff up afterwards if you're trying to uh um to do very different motions uh there's some control rig tools that we can bake to the controls but for this we're just gonna just try to get it close and just expect that then you know we're just assembling this we're blocking this stuff out we want to be quick and we want to uh try things out and not get so stuck in all the little details here so we get close um and then we say we want to uh to do this for the the next piece so we generally turn it right right so again the those two clips lined up very nicely so there was no blending needed then we want to get a little fancier let's say we want a jump right so line it up and right click say match your previous clip the root motion you could use any bone you could say the left foot or the pelvis the root motion is nice because it's set up for that so there's a jump so we're assembling these pieces and making a fairly complicated motion from a library of fairly simple pieces right uh and then let's say you know you you can decide you don't want that there because you're you're re-blocking your scene uh what you really want to do is you wanted to have the jump happen earlier so you can move the pieces around right click update the snap the point and now instead of having to manually try to line that up it can just automatically do it for you again snap it and now you have this complicated piece you've just decided oh we need to change it so now it's happening in different order uh so there's lots of use for for that kind of thing and then we can take that clip and we can save it into a single animation so we right click on the skeleton and tell it to export an animation sequence choose the location in your content browser where you want to save it and name it there's some export options but for the most part the defaults are fine and then it combines all your edits into a single clip this clip has no memory of where it came from it's an animation sequence that can be applied to any compatible skeleton it's z up and now we're going to try bringing this into maya and i'm going to show you why z up in maya is a good choice so there's a number of reasons why you might want to bring your animation into or back into maya some people call it round tripping if it started there so let's go through that step the first thing you need is an atom sequence in our case we just made it so we right click and export the asset animation to fbx i like to put ue as a suffix just so i know where it came from the fbx compatible format doesn't matter too much i usually keep it 2013 or 2014. the only thing you do want to do is make sure you click on the export preview mesh otherwise you're just going to get bones skeletons back in maya it's nice sometimes to see the actual geometry here we are in maya we navigate to that ue file drag it in you can see the feet zoom out there's the rig and the mesh can scrub and you will recognize it is in fact that same sequence we assembled looks turns jumps so this is a place where you could if you had better skills fix the sliding of feet but in this case since i don't have better animation skills i'm just going to show something obvious i want to do something that we can replace the animation in unreal and we can see that it's been updated right so we have a nice little jump uh the easiest thing for me to do is just to make that jump go much higher i assume that it was a super dog so i can go in i identify the z up and you see here because it was z up the animation didn't come in rotated weird it came in from unreal in a very nice format easy to manage and so so once we're in the z up now we can just overdrive that channel and select the elements and we can export it back out right in this case i put my on the suffix just so that i know it came from maya because you can get a lot of animations and just keep the system clean so updating your assets is something that's going to happen all the time you have a newer version of skeleton mesh you have a newer texture you have a newer animation in this case so you have your your elements and you just want to drop in insert exactly what you had with the new version right so one handy way to do that is just tell it to use a new source so everything will stay the same it will just replace the source file from what it was to the new animation you could import it separately and then find it and swap it but sometimes it's nice just to drop something in exactly where you want it and you're just replacing the source the last thing we're going to talk about is some simple retargeting this is something that you would want to do if you have a wide library of skeletons and you want to take that animation and you want to apply it to various characters why reanimate just because one character has got bigger shoulders or longer legs so here we see three characters that all share the same skeleton but they all have very different proportions so to set this up we're going to go into the skeletal mesh and turn on the options for showing retargeting options by default i think that i'll set the animation which is fine for the root but the pelvis you need to have animation scaled selected because uh the height of the character is going to affect how much the animation gets scaled uh and then for the rest of the bones you want to say skeleton because these are going to be applied in a way that fits the target skeleton and each skeleton can have different settings so you need to make sure that you need set them all up each one anything that's going to receive that animation so the root is animation the pelvis is animation scaled and then everything else is skeleton the grayed out bones that aren't accepting any animation those don't matter something you do want to be mindful of though is making sure that every target source is set correctly because you can have so many characters sharing one skeleton and so many animations from those different characters coming in with different proportions you want to make sure that the animation source matches the source of what the character should be so here if i select the wrong character you see that the source is different height so the animation doesn't know that it came from that skeleton and so it's going to retarget wrong so if you're finding yourself sharing animation and the character heights are wrong just make sure that you each animation knows the source skeleton that came with it so that wraps up this video on animation import pipeline there's a lot more you can do with modifying the animation in sequencer additive animation layers but hopefully with this you'll be able to have a good understanding of how to create your assets in maya bring them in and be able to work with them and build so that you can have a successful project good luck
Info
Channel: Tony Bowren
Views: 15,664
Rating: undefined out of 5
Keywords:
Id: XvnLMpvGZ34
Channel Id: undefined
Length: 18min 47sec (1127 seconds)
Published: Mon May 23 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.