Tip:
Highlight text to annotate it
X
Voiceover: Hey everyone and welcome
to this weeks weekly Tips and Tricks Video.
This week we're going to be covering
how to get your skelmesh and animation
from Maya into UDK,
as well as quickly cover how
to set up this idle animation,
which is similar to what you may see
on some type of MPC type character in game.
So, okay, let's go ahead and get started.
Okay, so here we are in Maya
and what I've got here is basically
the character that you just saw rigged
to a straight FK skeleton chain.
Now, I've gone ahead and actually done
all the smooth binding and painted the way for all this.
So, in order to get your skelmesh out
and have a proper skelmesh inside of UDK,
this is really all you need is a character
or a mesh that has been bound to a skeleton.
So, since this has already been done,
what we can do from here is just go to 'File',
'Export All', and then I'm gonna navigate
to a folder where I want to place this.
Same files,
and since we've got 'FBX Export' selected,
I'm just gonna say 'thief girl skelmesh'.
And then under here,
what I'm gonna want to do under the 'Options'
is since I'm not gonna be setting up a separate material
what I'm gonna do is just under the 'Embed Media',
I'm gonna turn this to 'On'
and then that's just gonna take the textures with it.
So, from here we can just go ahead
and click 'Export All'.
And then we should be good.
And then what I'm gonna do next
is I'm gonna go ahead and open the animation
that we're gonna be using in this little tip as well.
So, back to my course here
where I had the animation example.
And then takes the idle animation
we're gonna use.
So, what you'll see here is
when it's low is we've got basically an idle animation.
Let me turn off that layer.
And regardless of whether it's mocap or keyframe,
we just got an idle animation that just gonna loop.
And let me just go ahead and adjust
the frame range real quick, okay.
So, what you'll see is we've got here
is we just have this idle animation.
It's all been baked down to this skeleton,
like I started to say,
regardless whether it's mocap or keyframe,
what you're gonna need is have
all the animation on the base joints here,
the skeleton with none of the actual controls
in the scene still.
So, once you have this, what we can do
is we can just go to the same thing.
We can just go to 'File', 'Export All',
I'm gonna navigate back to the folder where I want it.
Let's see, 'Files', 'Export' and then just say
'thief girl idle' and then under your 'Options'
just make sure you choose to include animation.
So, you know, if we wanted to bake the animation
and choose some of these options in here, we could,
but the animation's already been baked onto the skeleton,
so really all we need to do here
is just choose animation.
And then I can click 'Export' and then we should be good.
So, from here we can go back into the editor
and then kind of start to hook things up.
Okay, so here we are.
I've got the editor open
and I just went ahead and opened
the epic citadel map that ships with UDK
and the first thing we're gonna want to do
is go ahead and import these skelmesh.
So, I'm gonna go up to the generic browser up here
and I'm just gonna click 'Import' down here
and then I'm gonna navigate back to where that file is.
And this is the skelmesh here.
I'm just gonna click 'Open'
and it's gonna give us some options
what we want the package name to be.
I can just name this 'thief girl'.
I can keep the 'thief girl skelmesh' name the same
and then when you scrub down here under the 'Options'
just make sure that you have 'Import Materials'
and 'Textures' both checked and then just click 'Okay'
and then what it's gonna do,
it's just gonna kind of load all of that stuff in
and what you'll see from here
is if you double-click the 'Skelmesh'
and bring this over here into the recording window.
We now have our character inside of UDK here.
And as you can see,
if I click this little button
it's gonna show all of the skeleton
and you'll see we've got all those joints with it.
So, from here, what I'm gonna do
is I'm gonna go ahead and create and AnimSet
and begin to bring in the animations
or the animation for this example, I should say.
So, from here, we've got our new packages down here
which is where the 'thief girl' package was created.
And then if I just go ahead and right-click
way at the top here,
it's just getting a little cut-off
from the resolution of this recording,
but you'll see at the very top it says 'New Anim Set'
so if you just click that.
I'll just type 'thiefgirl_animset',
there really aren't any options here,
just make sure that if under the factory
'Animset' is selected, just click 'Okay'.
And then what we're gonna see is
by default, we're just gonna have
this BSP block in here,
so what we need to do first is change out
to our skelmesh, so we can do that
by selecting the skelmesh that we just imported
and then going back to our animset.
And under the 'Mesh' tab,
under the default 'Skelmesh' section,
just go ahead and click that green arrow.
And what that's gonna do is that's going to
import the skelmesh,
so as long as it's still selected.
So, from here, what we can do is we can go to 'File',
'Import FBX Animation' and then
let me go back to my source assets
and we're gonna wanna choose the 'thief girl idle'
and what we'll see now is we have her idle animation
if I kind of scrub through it,
but it's kind of hard to tell with this,
but one thing that we're gonna need to do
is under the 'AnimSet' tab,
there's this 'Anim Rotation Only' check box
and what's that gonna do is that's gonna say
that every single joint in this hierarchy
can only accept rotation values,
but the problem with that is the fact that
in our hips joint here we actually have
some translation moving back and forth,
so if we have that checked,
what's gonna happen, you'll see,
as I scrub through it,
we're gonna get a bit of foot sliding.
And what's happening-
That's because it's counter-animating
what's happening with the feet
since it's all been baked down.
So, when you bring the center,
any animation into an 'Animset',
you're just gonna make sure you un-check that
and you'll see that actually moved position a bit
and what happened from there
is you see that we now have this red warning
saying that, you know, because it's been moved
and this anim-rotation has been un-checked,
we now have to re-compress the animation.
So we can do that by going up to 'Animation Compression'
and 'Animation Compression Settings'
and we have a bunch of different settings here.
And 'Animation Compression' is basically,
what it does is it changes the accuracy
of your animation curves on all these joints here
and when you begin to get into game development
what's gonna happen is you're gonna start to see
that depending on the level or what's loaded
into that certain check-point of your game,
there's gonna be a certain amount of memory
that's allotted for things like textures and lighting
and scale meshes and animations,
so compression is going to sometimes be your friend
and sometimes be your enemy
because you're gonna have to re-compress sometimes
to different settings in order
to get a different quality of that animation.
So, since it says right here
that we're going to need to re-compress it,
what we can do for this example
is just re-compress at a high setting
and for here we can just go to 'Remove Trivial Keys'
and 'Float 96' should be fine.
I can just click 'Apply to Sequence'
and it will kind of tell you how much you saved
for compression on this specific sequence here.
So, now that we've done that
you'll see that we get that little error
that goes away and from here
we can go ahead and begin to hook this up
in the actual level,
so I'm just gonna move these off to the side,
but we're gonna need to make sure
that this skelmesh is still selected right here
because we're gonna go ahead and add that
to our scene right now.
So, let me go ahead and find a spot,
maybe go out here and have her, I don't know.
Let's say she's standing in this little
hallway section right here.
So, with that 'Skelmesh' still selected,
I can just right-click on the floor
and say 'Add Skeletal Mesh Thief Girl'
and you'll see that she gets added right here.
And then from here what we're gonna need to do
is go into our 'Properties'
and set up a few additional things
about what animation she's playing
and what 'Animset' she's kind of calling from
when she wants to play this animation.
So, the easiest way to go ahead
and find these features here,
the animation properties,
is just to type 'Anim' into the search field
and that's greatly going to reduce
the amount of searching that you're gonna have to do
in a bunch of these roll-outs here.
So, for starters, what we're gonna see
is there's this field right here
called 'Anim Sequename',
which is basically 'Anim Sequence Name'.
And that's where we're gonna want to add
the actual name of the animation
that we want her to play.
So, if we go back into our 'AnimSet' real quick,
go back to my 'Animation' tab.
I can just click this and hit 'Ctl+C'
and then drag this back off
and then hit 'Ctl+V' in here
and what we're gonna need to do next
is tell it what 'AnimSet' it's gonna be playing from.
So, if we scroll down here a bit,
you'll see that we have this section right here
called 'AnimSets' and you'll see that
you have the possibility to add multiple 'AnimSets'
that the character could be calling from.
Now, granted, we're only having 1 AnimSet,
so I can go ahead and delete this 2nd one I created,
but from here what we're gonna want to do
is add this AnimSet in.
So let me just go back to my content browser here.
I can select on that AnimSet that I created.
I could import that.
So now it knows when I say,
"Hey, play this animation thief girl idle."
It knows that it needs to play it from this AnimSet here
or else it's not gonna know
where to look for that animation.
So, once we have this all set
we can go ahead and remove this.
And there are 2 more things we need to check
and that's right here where it says, 'Playing'
and then right under below it where it says 'Looping'
and what that's gonna do
is that's gonna do as you would expect it to do.
It's gonna ensure that that animation plays in game
and that when it's done it just
kind of continues to loop through.
So, let's go ahead and look at this end game.
I'm just gonna close this down
and then I'm just gonna hit
the 'Play and View Port' button right here.
Okay, so what you see is we now have
our skelmesh animation in game.
It looks like she could be moved
a little closer to the floor here.
That shadow seems to be off-set a bit,
but that's kind of the fine details of hooking this up,
but what we've got is
we've got our skelmesh in game
and playing our idle animation.
Well, that concludes this Tips and Tricks Video.
Thanks again for watching 3dmotive.com