2
$\begingroup$

When I export the animation as fbx for UE4 there are lot of garbage animations some of which are 2 frames long and others are same length as the required animation.

Once I made a walk cycle of 180 frames with 30 fps and the exported animation was 40MB!!! Lot of it was garbage animation in which the mesh was just twisted and deformed like hell, but my correct animation was somewhere among them.

So can anybody tell me how to avoid it? or how to manage and export multiple animations as fbx? I don't know anything about actions or NLA nor can i find any proper tutorial on it.

what i do is make the animation using keyframing , ik and directly select the armature and mesh and export is using FBX with selected objects , baked animation ,all actions ,NLA strips checked in export.

Please understand that I'm not trying to render animation in the blender but I actually want to export it , so I am looking for how does actions and NLA editor work in relation with fbx export

Please guide me

$\endgroup$
  • $\begingroup$ Goddamnit this question gave me Tumbleweed batch LoL $\endgroup$ – user1062760 Feb 22 '15 at 9:18
  • $\begingroup$ If you used something like the riggify addon, then there is a bunch of junk that is getting exported in the fbx. $\endgroup$ – user13156 Mar 14 '15 at 4:24
2
$\begingroup$

Even without Rigify you get junk animation tracks. At least I get in my own hand made armatures. But what I do is keep an eye open in the NLA editor if there is any animation on objects I remove their tracks.

I'm gonna try and explain NLA and also FBX export to UE4 here, at least as my workflow goes.

enter image description here

I always create new action before I start animating to keep the "root" timeline clear. Open Dopesheet Editor, and switch to Action Editor (yellow cube icon). In this case Jump_1_End. Once done click the (F) to make a fake user and then the dubble down arrows (in NLA editor or to the right in header) This will save the Action to a NLA Track (you can rename them, something better than NLATrack.001 etcetera. I did rename my NLA Tracks to my Action Set name.)

Export to FBX, I use the default settings exporting both Action and NLA Tracks as separate Anim Tracks in FBX file.

enter image description here

You can check your export in Autodesk FBX viewer, I do this often to check that export from Blender and import in UE4 is correct. Somehow Unity can read .blend files and get Action animations without pushing down to NLA tracks and no junk data. How they do it, I don't know. I wish UE4 could read .blend files also :)

Anyway here you can see junk anim tracks, try and clean up in Blender by removing animations on objects etcetera and just have NLA track and Armature animations. To keep the junk animations to a minimum.

enter image description here

Drag and drop, or import how you want. But drag-n-drop requires you're hovering a couple of seconds with the FBX file in the Content browser. Once loaded (just went with default settings, it could find the skeleton and all) I clean up and remove the unwanted animation tracks. This works for me, in time I might find a better way. It's not super beautiful, but it gets the game done.

in the NLA Editor in blender you can stack and repeat animations this is good for checking loop points and maybe just have a overview of your animations before exporting. I use this for mock-ups sometimes. You can also blend NLA Tracks when doing longer animations, but in this scope. Game asset creation, you kinda just want to have each Action set in a separate NLA Track layer to get all animations into UE4.

To check your animations on your armature mesh, or skeleton mesh in UE4 you need to make a animation blueprint with simple blueprint logics, there are other tutorials on the internet on this and since it was not your question check unreal engines youtube channel.

$\endgroup$
0
$\begingroup$

Might be a bit of a late answer but it can be fixed during export.

What happens?

Most of the garbage in the FBX files are extra actions tied up to the different meshes as well as the armature as an object and not as an armature which might even duplicate content (for example having a BlendFile_Anim_ArmatureName_Animation asset and another BlendFile_Anim_Animation asset with the same keyframes). This plus materials that aren't compatible with UE4 and other objects make up the garbage.

How to Fix

The way to fix it would be to add the animations to the armature using the NLA editor and removing any animation that the meshes might have assigned. Then during export, in the animations section, uncheck "All Actions" and make sure "NLA Strips" is checked. In the main section select only "Armature" and "Mesh," leave "Empty," "Camera," "Lamp," and "Other" unselected; check "Selected Objects" if needed. Then export the file and import it to UE4. This should import the mesh, generate a skeleton (if you didn't select one during import), generate a physicals asset, and import only the animations selected in the NLA editor.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.