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

Use one animation with multiple skeletons?

Discussion in 'Scripting' started by mmelson, Sep 18, 2008.

  1. mmelson

    mmelson

    Guest

    Joined:
    Sep 18, 2008
    Posts:
    3
    We have a series of models that have nearly identical skeletons (they do have the same number of bones with the same names, the bones are just of different lengths), and we are looking for a way to share animations between them. We have done this in the past with Granny3D from Rad Game Tools which has an API to do exactly this, but I'm not sure how I'd do something similar in Unity.

    Does anyone know of a way to do this in Unity? Also, we are brand new to Unity, so if anyone has a solution that more the "Unity way" of doing it, I'm all ears.

    Thanks

    Mike Melson
     
  2. Dakta

    Dakta

    Joined:
    Apr 8, 2008
    Posts:
    492
    I need the exact same thing! Somebody, help us!

    I hear you can use Ani.Mate to , somesort of scripting thing, to do this, but another method, or an easier way to do this would be good.
     
  3. IPete

    IPete

    Joined:
    May 15, 2008
    Posts:
    414
    Guys,

    I think you can - but the best way is to knock out a quick test.

    I use a T-pose character and have lots of separate animations. The T-Pose character has an animation component attached. The animations are listed in the animation component. I have all the animations running correctly as I need them under player control in script.

    If the only difference is bone lengths, are these differences large or small? I would hope that smaller differences wouldn't be a problem, but I would guess that large differences would be.

    IPete2.
     
  4. mmelson

    mmelson

    Guest

    Joined:
    Sep 18, 2008
    Posts:
    3
    Yeah, we had one of our artists throw together a quick test. We had two animated columns with similar skeletons, and when we applied the animation from one column to the other, there was a drastic change in size of the column that was playing the "wrong" animation. Unfortunately, the size differences are pretty substantial (the difference between a child and an adult, specifically), so the change in size would be unacceptable.
     
  5. mmelson

    mmelson

    Guest

    Joined:
    Sep 18, 2008
    Posts:
    3
    *bump*

    So far, we've been able to get the different models to use the same animation by removing the translation portion of the animation keys in Maya, but that breaks quite a bit (such as any sort of scripted movement).

    Has anyone else gotten this to work?
     
  6. runevision

    runevision

    Joined:
    Nov 28, 2007
    Posts:
    1,892
    It is a bit unclear what you mean. Is your model an animated column (a column model that can somehow move in certain ways), or do you mean a column of several models of humans or creatures (like, you are comparing many models at once, and have arranged the models into columns)?

    Are the models changing size? How? Any other artifacts?

    If we are talking about "normal" animation of humans or creatures, then you'd typically only have rotation keys for all the bones, except the root bone, which would have translation too.

    Prior to removing the translation portion, did you have translation on all the bones - or which ones? What happens if you have translation on the root bone only?

    Rune