0
$\begingroup$

I'm new to Blender and having terrible difficulty trying to get an animation from Blender to Unity.

I have a scene with two animated tank treads that I need to export as an FBX and be able to use in a Unity project. However, the animations are simply not working either in unity or when I check the FBX in Maya.

It is basically tank treads animated by using an array on a BezierCircle. Exporting the FBX with animation selected did not work, and baking the animation seems to mess up the treads from working along the curve.

Blender scene file available for download here: https://www.dropbox.com/s/1soty7iz9xx06gy/tank%20treads%20blender%20scene.blend?dl=0

$\endgroup$
2
  • $\begingroup$ Hello and welcome. While files, images, and external videos or links may be helpful additions they should not be the only way to obtain information about your issue. Don't make understanding your question rely on downloading a file, watching a video or visiting an external site. Use the builtin tools to upload images or gifs, along with thoroughly explaining the problem in written form so it can be indexed and searched for thus helping future visitors with similar issues. $\endgroup$ Mar 13, 2023 at 22:44
  • $\begingroup$ blender.stackexchange.com/questions/57531/… $\endgroup$ Mar 13, 2023 at 22:46

1 Answer 1

0
$\begingroup$

The best way to transfer animations from Blender to Unity using FBX is bone animation. In your case it would be the best to apply array modifiers, create a rig with one bone for the tank body and bones for treads (one for each segment, but not necessarily for both sides, they both can be controlled by the same, single set of bones), make bones move with the treads, bake the animation to the bones, then apply curve modifier, parent everything to the Armature with empty groups and make sure to get each segment vertices assigned to appropriate single bone vertex group. The rest of the tank parent to the Armature and assign all its vertices to the one bone created for it vertex group and voila. That way the animation will be a bone animation and it'll be easy to export it correctly to Unity or any other game engine.

$\endgroup$
4
  • $\begingroup$ Thanks so much. I'll have to work through that since I'm mainly a modeler and animation is simply not something I tend to do. Just for reference, this does need to just be extremely simple. All the treads need to do is go one way and really I would just need one to send over. (I'm not the person working in unity just sending over models and they could probably just dupe it to the other side). They won't need to bend, or react to anything really. Just spin. Would the bone approach still be the best way or is there an even simpler approach? Thanks in advance! $\endgroup$ Mar 14, 2023 at 0:55
  • $\begingroup$ It's still the best approach. With round wheels you'd just need 1 bone for each but since it's tread you can't use just a rotation. Adding so many bones and parenting the tread to it is very tedious job, so I'd probably use some Python script, probably created by chat GPT :) $\endgroup$
    – Mzidare
    Mar 14, 2023 at 8:49
  • $\begingroup$ In maya for a round wheel I wouldn't even use a bone. In the past I simply keyframe one position, rotate wheel 360, keyframe that and I'm done. So you can see thats about the limit of my animation experience. :) Thanks again. Already started working on the bones and don't mind doing it by hand since repetition is the basis for learning. Do these bones need to be jointed together or just parented to each tread? Also do I dupe all the treads, make bones for each tread and parent, and then add the curve modifier so they all attach to the curve at once? Thanks again for all your help. $\endgroup$ Mar 14, 2023 at 19:10
  • $\begingroup$ All the bones have to be in one rig. Shouldn't be connected. I think the best way to make them move along the curve with the corresponding segment of the tread would be to create an empty for each segment and parent it to middle 3 vertices of the segment, create the tread bones in location of empties position on frame 1 and add "child of" bone constraint with the empty as a target. The tank bone can be fixed similarly, but create it in location of main body at frame 1 and add child of bone constraint with the main body object as a target. Then Just bake the animation and so on. $\endgroup$
    – Mzidare
    Mar 15, 2023 at 9:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .