Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Humanoid: dynamicaly change bone length

Discussion in 'Animation' started by dozhwal, Jul 27, 2019.

  1. dozhwal

    dozhwal

    Joined:
    Aug 21, 2014
    Posts:
    59
    Hi,





    i must be stupid but i don't find any information about changing bone length dynamicaly.

    I like mecanim because we can use any existant animation and it works well.
    I know we must set an avatar by character, and we can retargeting. Humanoid animation saves rotation relative to parent only. and no rotation or scales to achieve that.

    But now, i try to make a dynamic runtime character, on which you can change clothes, blendshapes (fat, thin, man, woman,..) and i want to change bone length !

    How to do that with mecanim ?
    I tried some things :
    - change bone size : it changes the hierarchy
    - add a dummy at the end of arm/leg bones. change scale of bone. set the scale of the dummy at inverse scale of the parent bone. : it seems pretty okay but when i change thigh size, the character floats in air. (do i must change root position ? ) And it thinks that those extra transforms points are not good for performance.
    Or maybe, i should use "HumanBone" and "HumanLimit" thing ? But i can't find any example on the web.

    Thanks for your answer :)
     
  2. dozhwal

    dozhwal

    Joined:
    Aug 21, 2014
    Posts:
    59
    Up.
    Nobody have this usecase ? o_O
     
  3. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    It's a very common thing but it's rather advanced. The basic technique is create child bones and those are the ones you deform. But there is a LOT more to it you need a solid understanding of rigging and bone weights to do it yourself, and you need modeling software like blender.

    I suggest downloading UMA it does bone deformations like you want.
     
    dozhwal likes this.