I’m trying to create a rig for root animations and I need help. Trying to learn how to do this is the hardest fucking thing I’ve ever come across with unity. Nothing but problem after problem after problem.
What do I select as the root node in the import settings? Can I just select “Rig” for the root bone in the generic avatar creation? Do I select “Rig” in the root node for animation settings?
Nothing I try ever works.
The problem I’m currently having is the animator.deltaPosition is always showing 0.
From my experience rigging, a rig should always have a root bone. Namely the bone that when you move, everything else moves with it. Usually your root hipe bone, plus foot and hand IK control bones will be children of it, sometimes other bones depending on the style or complexity of the rig.
And looking at my last project with a 3d animated character, said root bone is what I selected in the import settings as well.
That said, I never animated root motion myself. I’d always just do walk cycles, etc, on the spot, and move the character in tune with said animations, alongside speeding up and slowing it down. But I’d imagine said root bone is the one you’d animate for root motion.
Rigging is a pretty deep topic. Took me a while (few years) for it to become natural. Though I haven’t done it in a while; current project is 2d as well.
I wish unity would make a damn tutorial on this. There’s so many little “gotchas” and “tricks” you need to know to get stuff working.
Apparently they partnered up with mixamo and just expect all of the devs to use them instead of create their own.
If I can figure out how the deltaPosition is calculated I’ll be good. I don’t see why it would need a dedicated root bone though. You should be able to just select the hip bone since everything shoots off it. Mixamo holds the secret setting but I can’t figure out what it is.
What I described is a general rigging practice, and not specific to Unity. Rigs should have a root bone. It’s rigging 101. It’s not Unity’s responsibility to teach you how to make a rig; it’s a deep subject and speciality on its own.
When you say root bone you mean a bone created whose sole purpose is to stay at the origin (0,0,0) and have all the other bones parented to it and the child bones move while the root bone stays put right?
Why is that required? Can’t unity calculate root motion from the hip bone just as well? I can see it being required if you have separate bones that do not need to be parented to the hips such as weapons but for a generic character where everything is parented to the hips anyway it shouldn’t be required.
This is not Unity’s responsibility. They also won’t hand you a Photoshop tutorial for the same reason. This is a workflow issue that is mostly entirely done in an external program (eg Blender) and thus you should refer to general game animation rigging best practices.
There’s only the import phase and Unity’s animation system requirements regarding the bone structure that you may have to account for (if at all) but by and large general rigging best practices apply.
From what little I recall about animating, specifically for root motion animations, no bone needs to stay at the origin. In fact, if you move the root bone’s transform position then that’s how you get root motion.
But even non-root motion root bones may not stay precisely at the origin to allow for some hip bounce and such. It’s just that the overall character should stay centered about the origin but not necessarily precisely.
Anyone correct me if I’m wrong because that is just some things I picked up from animators, not first hand experience.
No, like I already said, it’s the bone that when you move, everything else moves with it. It doesn’t have to stay at world origin.
It’s literally how you make a rig. You have a root bone that you can use to move the entire rig.
No, not everything should be a child of the hip bones. Generally your feet, knee and hand bones are not, so they can move freely due to IKs. Those are the bones as I already mentioned are children of the root bone.
You can see the relationship lines, where in this case the hip, knee pointers and foot IK bones are children of the root bone, and it seems I made the hand IK’s children of the hip bones.
Not sure what you’re doing wrong then. I just put together a quick test, and it works for me. I’ll attach the small test, done in the latest Unity 6 version (6000.0.32f1).