Very basic animation question

Hey, I’m an animator trying to use Unreal for the first time with a group, and I’m having a very hard time working out the animation system. I apologize in advance, because I think my question is probably pretty basic, but I’ve been stuck here for hours poring over tutorial after tutorial and I still can’t get this to work. I am probably overlooking something simple but I’m way past the point where I care if I look like an idiot for asking a simple question. I am also probably going to over-explain so I don’t accidentally leave out any critical details.

I have a script that puts objects in the scene and has them move around. Other group members wrote that script, and I mostly get it, and it works fine. I want the objects to loop an animation while they move, so they’re not just sliding around. I just want it to do the one animation forever, no fancy events or anything.

I have a mesh file, which is just the geometry and no rig. I have a rig file, which is a skeleton with the mesh bound to it. I have an animation file, which is the skeleton animated for 52 frames, no mesh. All of these were made in Maya and exported as .fbx, and each of those fbx’s can be opened in Maya again and contain exactly what you’d expect them to. Nothing but the animation file has any animation on it, and the animation file has the 52 frames of animation and nothing else.

The mesh is already imported in, because I’ve already had it moving around with the script. So, I import in the rig file. “Import as Skeletal” is checked, with Skeleton set to “None” so it will create a new one. Import animations is unchecked because there aren’t any. So now, in the Content Browser, I have a Skeletal Mesh named Bird_rig, a Physics Asset named Bird_rig_PhysicsAsset, and a Skeleton named Bird_rig_Skeleton. Then, I right-click the Content Browser, and under “Create Advanced Asset”, I go Animation->Animation Blueprint. Under Target Skeleton I select Bird_rig_Skeleton. I hit okay and rename it Bird_anim. Finally, I import the animation file. Under Skeleton I select Bird_rig_Skeleton. That adds the Animation Sequence Bird_flap to the Content Browser. Here’s where I’m at a loss.

So first off, I double-click Bird_anim. In the preview window I can barely see the bird mesh there, because it’s so tiny that it almost starts clipping through the camera if I zoom in enough to actually see it. In the anim graph I have “Final Animation Pose”, and I can drag Bird_flap from the asset browser and connect it to the “Result” on that. When I do, and recompile it, the tiny tiny bird does the animation on loop in the preview. So, presumably, that’s doing what I expect it to, except for the part where it’s tiny. But, that’s not enough to make the bird flap when I hit play, it’s still just sliding around through the air.

I don’t know where to go from here. Most tutorials about this stuff have you adding components to an object which is already in the scene, but these objects are added via the script and don’t exist in the scene before it starts. Even if I manually add a bird mesh in there, nothing I do seems to make it animate at all. I suspect I have to add the animation to it inside the script that creates it, but I really don’t know how to go about that. Any help that anybody can give me on how to proceed from here would be greatly appreciated.

You won’t need the mesh file I don’t think, as it won’t be skinned and will effectively be a static mesh. You’ll want the skeletal mesh underneath the Character Blueprint, as judging by your steps, the CharacterBP would presumably still be using the already-imported static mesh.
Then in the character BP you can set the mesh to either use the Animation BP, or the animation asset itself, which may be where it’s not connecting properly.

Regarding the whole fact it’s so small, are you sure that the scale factor is correct? Just a thought

The scale factor was not correct! I had been fooling around with the import scale thing in Unreal, but as soon as I realized I could change the scale factor in Maya as I exported, it fixed the scaling issue right up. Thanks for that!

As far as the animation is concerned, it got more complicated. The script wanted a static mesh, but I sorted that out (it was a whole ordeal) so that it expects a skeletal mesh instead. For some reason that turned the birds sideways, but that’s easily fixable. The animation still isn’t playing. Do I need to do something else with the blueprint? All I’ve really done is plugged Bird_flap into Final Animation Pose and compiled it–do I need to do something in the event graph, even though all I want is to have it loop the same animation forever? Do I need to do something to get the skeletal mesh to accept the animation blueprint besides having it plugged in to the “Mesh” field at the top of the blueprint? This is probably something stupid and obvious but I’m not seeing any good examples of how to go about it.

EDIT: Okay, I’ve narrowed this down more. If I just drag a Bird_rig from the Content Browser into the scene, I can set its Anim Class under the Animation header in the details pane to “Bird_anim”. When I do, that bird flaps its wings, but does not do any of the other things that the script is supposed to make it do. The rest of the birds that the script adds will follow the script but not animate. So, I just need to set the anim class somehow in the script that creates the birds. Not sure how to do that now, though.

EDIT AGAIN: OKAY! I got it. I needed SetAnimInstanceClass. Everything is working now.