Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

How to scale a character's torso/limbs without causing grief?

Discussion in 'General Graphics' started by JoeStrout, Nov 13, 2020.

  1. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,840
    We'd like to take a standard character model and make them more dwarf-like (for example) by shortening the torso and legs. The obvious way to do this is to scale the spine and leg bones by some non-uniform amount like <1, 0.6, 1>.

    But this worries us because Unity says non-uniform scaling causes performance problems. And of course it causes all manner of weirdness (shearing, etc.) when those bones start rotating.

    In some cases we might be able to avoid most problems by countering this non-uniform scaling further along the chain. E.g. if we have Spine0 -> Spine1 -> Spine2, and scale Spine0 to <1, 0.5, 1>, we can set Spine2 to <1, 2, 1>, and then everything after Spine2 experiences normal <1,1,1> scaling. But this doesn't work when the spines start rotating (which of course they will do when the character is animated).

    upload_2020-11-13_11-17-31.png

    Yikes.

    This seems like the sort of thing that ought to have some simple solution, but I'm not seeing it today. The only real solution I can come up with at the moment is to write a big pile of code to modify both the skeleton and the mesh, shifting the bones closer together and scaling the mesh in the T-pose, then "baking" that into a new mesh and skeleton that has the desired shape while everything is still at standard scale.

    But before I go to all that work... is there a simpler or off-the-shelf solution?
     
  2. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    2,067
    That might be the long hard tiring route. x_X

    Put the model in blender or maya. Remove the skeleton rig from the model. Scale down the model to look dwarf like.

    Scale down the rig separately from the model, then put the rig back into the model. You might have to do some adjustments on the original rig, that has been scaled down, since sometimes scaling down rigs or even a few bones, can sometimes cause odd problems or weird mesh distortions, when it is put back into the model.

    Or re-rig the model with a new bone rig. Combine it with the character mesh. Then import the model into Unity.

    This might be an easier solution than writing a ton of code, but I will honestly admit, it won't be super easy, because bones and rigs can be finicky sometimes.
     
    Last edited: Dec 15, 2020