- Düzenlendi
[Tips] Should you use the root bone?
In Spine, the root bone is the single bone that all other bones are under.
This particularly means a few things:
- All other bones inevitably have to move according to the root bone’s position.
- Your skeleton can’t have multiple root bones.
- The root bone can’t be deleted.
For these reasons, we typically recommend leaving the root bone alone at the origin point and without any animation. And that if you need to move your whole character, you can create a new bone for your character to have its own parent bone that’s a child of the root bone.
Why?
From a workflow perspective, it gives you flexibility to reorganize your skeleton.
It usually makes sense that your character’s parent bone is its hip. So you can safely start that way. But under certain designs and animation requirements, you may later decide that it’s better for your character’s parent bone pivot or handle to be closer to the floor, or be the head. If you used the root bone as the hip, or character bone, reorganizing becomes more difficult.
**Reorganizing your skeleton is usually difficult already. But having an animated root bone adds even more steps to an already difficult task.
It allows your skeleton to be more than one freely-moving thing.
Using and moving another bone around instead of moving and animating the root bone directly also leaves you room to arrange your skeleton according to more than one “freely-moving thing”.
For example, a common character setup is to have a character’s hip bone as the parent for your character's other bones, and 2 IK targets for feet. Animators usually want the freedom to move the character without moving the IK targets, so the feet can stay planted on the floor while the character moves their upper body around. In this example, 3 bones need to move freely: the hip bone, and 2 IK target bones. So you want these 3 bones as children of a root bone that doesn't move.
spineboy-pro’s skeleton is organized into several freely-moving things; In addition to Spineboy himself, plenty of IK and Transform constraint targets, but also the bone for the portal effect.
However, try to collaborate with your programmer or VFX artist for the implementation of effects.
We provide spineboy-pro as one previewable skeleton in Spine editor for convenience.
But in actual games, it may be better to have effects such as the portal effect, foot step dust, and gun blast effects as different skeletons or use a different rendering systems altogether (combined with engine-specific particle system) so they can be more freely positioned and controlled in code. It's helpful to be judicious about what to include in the skeleton and what to have as a separate entity in the game, both for the sake of making it look good and making it easy and logical to program.
For other reasons too, consult your programmer.
Check with your programmer if they have special use for the root bone for extra visual effects such as dynamic scaling.
In engines like Unity, this may be unnecessary since Skeletons are always part of a transform that can be manipulated freely. But for other engines and frameworks, the root bone may be the programmer's only straightforward way to control the skeleton's rotation and scale from code while also properly affecting the other parts of the skeleton. (If this needs to be done in code, make sure your bones don't have the necessary inherit settings disabled. As an alternative to disabling inheritance, consider using Transform Constraints instead.)
Depending on the needs, it may be beneficial for cleaner code to add an extra root-like bone just for your character to remain compatible with things like its separate IK and effects bones. So make sure you bring it up with your programmer when discussing what animations need to be made.
There's nothing inherently wrong about using the root bone directly. In fact, for very, very simple skeletons, you can do it without problems.
If your skeleton is the type of thing that gets spawned dozens or hundreds of times in-game, it becomes more important that you keep your skeleton as simple as possible. In this case, using the root bone instead of having an extra bone can be a good idea because means you save one transformation operation at runtime.
For most cases though, it can make things hard for you to do animate your skeleton or to change your mind about your skeleton's hierarchy.
Cool tip, always good to remember. Could be nice to have some more like it.
It could have its own forum sub category. Here, it's gonna be drown in no time
This was actually from a shorter support email. I figured it was worth adding a few details and gifs for everyone's benefit.
We could probably have a sticky or page that links to them so we can find them even if they're buried.
helpful
Good to know, one of the mistakes i've been doing a lot is box selecting the entire rig and animating it, not know that the Root bone I was selecting would influence everything.