Self-Animated Studio Item
Self-Animated Studio Item
Read my Studio Item guide. I will only be talking about the animation parts here. You may also need to look
into animation in Blender and Unity if you need more explanation than what I give.
We are making what I call a self-animated studio item. That is, a studio item that has an animation you create
(as simple or complicated as you want) which endlessly loops. I will be doing this on a skinned item, but it can
be done on unskinned as well. I will be animating part of the item, but another part of the item will have
dynamic bones which react to the animation with physics.
Page 1 of 7
Self-Animated Studio Item: Blender
So back to Blender we go, in the same project as the other studio items. We will be creating an animation for
the item, which in general involves changing transforms on bones and taking snapshots of those changes (called
keyframes). The game will interpolate the frames in-between to make a smooth transition from keyframe to
keyframe for whatever properties you changed (position, rotation, and/or scale). Sometimes you want to
animate all the bones, sometimes you only animate some of them and leave the others as dynamic bones.
So I made this slug. Modeled it, UV unwrapped it, made a color mask and main tex, rigged it, skinned it
(automatic weights, no weight painting). I made 2 "Actions" for the armature in the Action Editor: roll and jump.
Nothing fancy, just takes some time. Created keyframes for bone rotations and base position in pose mode. I
didn't animate the eye stalks because those will be dynamic boned. The animation was being cut to my last
keyframe when I looked at it in Unity, so I duplicated my last keyframe and moved it to the end, since I want it to
hold that pose for a bit. All the other export settings are the same, but I had to go into animation settings. I
don't have much knowledge on this animation stuff, there might be a better way to do this.
Page 2 of 7
Self-Animated Studio Item: Unity
For import settings the Model tab is no different. The Rig tab I didn't change but here's what it looks like just in
case.
On the Animations tab I checked the Loop Time and Loop Pose boxes. You gotta do this for both animation clips.
My animations end in the same pose as they start so I don't think I need the Loop Pose but it shouldn't hurt.
From what I understand you need the Loop Time for the animation to loop otherwise the model just freezes at
the end of the animation.
Page 3 of 7
I did the usual stuff:
import textures and change import settings
create the material and fill it out
drag the FBX into the preview scene
make sure root Game Object has identity transforms
change layer if desired (I didn't)
drag the material onto the mesh
add MB and fill it out
add dynamic bone if desired (and fill it out)
So now to add the animation on the item, we need something called an Animator Controller, which is a state
machine that controls which animation is playing. So I make a new folder in my Mod's folder called Animation,
then right click -> Create -> Animator Controller. Editing for this is done in the Animator window.
So I created a Jump state and a Roll state and filled in the animation clips (which were imported with the FBX)
and created no-condition transitions between them. This makes it so the jump animation plays, then the roll
animation plays, then the jump animation plays again, back and forth. We won't have proper control over the
animations like you would if you were making your own game.
Page 4 of 7
So now we put the controller on the item's Animator.
Page 5 of 7
Now make the prefab, bring it back into the scene, and the animations should play when you hit the Play button.
But I've decided I may want a slug that only jumps or a slug that only rolls. So I create 2 more Animator
Controllers: 1 for only jumping and 1 for only rolling. They each have only 1 state, no transition. So I rename the
prefab to "Slug JR", then rename the prefab instance to "Slug J" and drag the Slug_Jump Animator Controller
onto it. I drag the prefab instance into my prefabs folder and now I have a jumping-only slug prefab. Then I
rename the prefab instance to "Slug R" and drag the Slug_Roll Animator Controller onto it, and drag Slug R to
the prefabs folder. So now I have 3 different versions of the same item, the only difference being the animation
controllers (you could also give them different materials or different default colors or something). Oh, and don't
forget to assign them to the AB.
So now to the list files. These are going in the same Monsters category as Blob, so I only need to edit the
ItemList. I put a child attachment point for the slug's "head" so I can put a hat or something on him, and set
Animation column to TRUE. And allowed patterns with Color 1, which is the slug’s back.
And the BoneList... which is is missing some antenna bones because I didn't notice the automatic skinning didn't
use them for some reason, and I'm not not going to go back and fix it at this point. This shouldn't happen to you
if you're properly moving bones around to see if there are bone weight problems. It only happened to me
because I was being lazy, and because I was leaving them alone during animation because they're dynamic
bones.
Page 6 of 7
Self-Animated Studio Item: Result
As usual, test the basics first. The animations should start immediately when the item is added to the scene. It
turns out the FK doesn't completely work because I animated the "base" bone to move the slug, but I did not
skin the slug to the base bone. This caused it to not show up in the generated bone list, so turning on FK doesn't
stop the base movement of the animation. So when FK is on, the jump animation causes the slug to go up and
down still, and the roll animation causes it to side to side, while all other bones are frozen in the pose. Also the
dynamic bones are too floppy. But the animations are working, and the animation speed slider works too. By
setting animation speed to zero I can work around the FK problem, but I should probably go back and change
the bone list.
Page 7 of 7