• Editor
  • Experiencing image distortion when using transform constraints.

Hi

I am trying to find the best way of making my animations work with multiple characters, so I don't have to redo all animations for each character.
For various reasons, I cannot make my artists draw the different characters on the same skeleton. I know that would be the way to go normally, but this project is just set up in a way that does not allow that kind of coordination.

This is my workflow:

  1. I make a basic character, character A, and rig him and make a range of animations for him (walking, running, idle, etc.). There are IK constraints on arms and legs, but none on the spine/neck/head. Legs and arms have one image for the whole limb and are made into meshes so they can bend at the joints. The torso and head are not made into meshes.

  2. Then I import a skeleton with the new character, character B, into the project. I use this skeleton as a guide by which I can adjust the bones so they fit character B.

  3. Using transform contraints as described in your blog posts, I reposition and rescale the bones to fit the guide for character B. The characters are humanoids and drawn in the same style (but varies in sizes, shapes and so on), so it's just small adjustments, a little scaling and a little positioning. I don't adjust the rotation of any bones (although I would love to) as I just can't make that work - everything gets weird if I try that :-)
    All transform constraints are built like the ones in the blog post. Each limb has its own constraint, all "local" with the root bone as target.

  4. I arrange the transform contraints under a new skin for character B so the bone adjustments are only done on this character.

  5. I then put skin placeholders on all bones and put the images for character B body parts of the new character into the skeleton of character A in each appropriate skin placeholder.

  6. Then I position and scale the images/meshes so they fit the character B guide, to which the bones were fitted in step 3. The scaling is often not 1:1 as the bone the image is attached to might have been re-scaled by a transform constraint to fit a shorter limb or something and the image seem to always inherit the scaling of the bone when attaching. (I have a feeling this last step might be the root of my problems).

To my own amazement, this whole thing nearly, sort of, works. Most animations look fine. Walk and run look great. There are some problems, though:

  1. - I loose the ablility to rotate spine/neck/head bones on character B (these bones have been re--scaled by the transform constraints). Making an IK for them makes it possible to move them again for animation, but creates other problems.
  2. - Some images on character B are deforming when their bones move. It might actually be all images, but some might be distorting so little that I don't notice it. If I make an animation with the character making a deep bow, the head distorts visibly, fx. It seems the limb images are not distorting, though - maybe because they have IKs on them?

My guess is that my issues result from me adjusting the scale of the bones through transform constraints as well as then re-adjusting the images themselves afterwards to make them still fit the guide. But I don't know how to avoid this.

Is there a way to achieve what I'm trying to do here? Should I go about it in a completely different way?
I simply don't have the time needed to make animations for each character seperately and, as described at the start of this thread, I unfortunately cannot make the artists all work from the same skeleton.

  • Nate ответили на это сообщение.
    Related Discussions
    ...
    • Изменено

    jjpixelc I don't adjust the rotation of any bones (although I would love to) as I just can't make that work - everything gets weird if I try that :-)

    Probably you are talking about the behavior when the Rotate mix is between 0 and 100. You should be able to adjust rotation with a transform constraint by checking Local and Relative, set Rotate to 100, and the use the rotate offset to change the bone's rotation.

    jjpixelc I loose the ablility to rotate spine/neck/head bones on character B

    Why? What prevents you from rotating the bones?

    jjpixelc Some images on character B are deforming when their bones move.

    Are the meshes weighted to those bones? With limited information I can only guess, but you may just need to reset the bind pose for the mesh using Update bindings. However, my guess is your problems come from nonuniform scale to adjust your character size.

    Do you really need to scale bones? The length of bones is only a visual aid except for IK and path constraints. If you aren't using those, you can just translate child bones instead of scaling a parent bone.

    If you do need to scale a bone, it's going to squish the attachments and child bones. You can deform meshes the reverse amount to make them look un-squished, but that only really works for attachments parented to the scaled bone. When child bones (technically all descendant bones) rotate, nonuniform parent scale is applied in the direction of the parent bone. That will cause your meshes to be skewed, they will scale differently at different child bone rotations. It won't be possible to compensate for such dynamic scale.

    You can workaround this a couple ways:

    Don't scale the bones. This should be fine everywhere except for IK and path constraints. IK constraints are more common.

    When you do need to use scale, then scale uniformly. That means scale X and scale Y are set to the same values. With uniform scale child bones won't skew when rotated. You can un-squish your meshes and they won't skew/deform when the child bone is rotated because they get the same scale in both the X and Y directions of the parent bone.

    Another option is to disable scale inheritance on the child bones. This allows you to scale a parent nonuniformly without skewing the child bones. You won't have to un-squish your meshes at all! Of course this comes with the drawback that scaling the parent no longer scales the child bones/attachments. That can make it harder to use squash/stretch in animations.

    One setup is to use a parent bone with nonuniform scale, a child bone that inherits scale, then instead of putting attachments on the child bone, add a new bone that does not inherit scale and put attachments on that. This way you can choose which attachments get affected by scale inheritance. Being clever about where you put this extra bone with inherit scale disabled can give you different capabilities.

    If you put the extra bone as a child of the child bone, then it can protect attachments that look like they are attached to the child bone from inheriting scale. The child bone will still inherit scale and may have other bones or attachments that inherit scale.

    You could put the extra bone as a child of the parent bone. Attachments you want to scale with the parent bone are attached to that parent bone (like a leg). Child bones are parented to the extra bone, so child bones will not inherit scale from the parent bone (ie a foot won't stretch when the leg bone is scaled for a taller character). When you need squash/stretch in animations, you can scale the extra bone to squash/stretch all the child bones and attachments.

    This can give you some flexibility, though you still won't be able to squash/stretch the root bone and have it affect everything. Note that at runtime you can set the skeleton scale X and scale Y to squash and stretch the entire skeleton, regardless of any bones not inheriting scale.

    jjpixelc Is there a way to achieve what I'm trying to do here? Should I go about it in a completely different way?

    Overall I think your approach is OK if you can work out the quirks, like avoid scaling as much as possible to adjust your skeleton for different characters.

    Hi
    This is great stuff!
    Just made a few tests and it looks like I'm going to make it work.
    Thanks a lot for your thorough answer!

    • Nate оценил это.