Search Unity

Renamed Blendshapes

Discussion in 'Timeline' started by dukerustfield, Sep 11, 2020.

  1. dukerustfield

    dukerustfield

    Joined:
    Dec 5, 2019
    Posts:
    33
    Problem: A model has incorrect blendshape names. Let's say, "shmouth" instead of "mouth." I want to use native Unity solutions to fix this.

    Info: I'm using Timeline to animate models. I don't want to duplicate animation for incorrect blends. I know I can simply take all the curves and make them shmouths. But then that has to be done forever for everything and other people have to know that model (or others) have a shmouth. I want to stay inside Unity and not use any 3rd party apps. C# coding is fine. It's my understanding that I can't put anything on the model, codewise, to intercept the animation curves and remap because they won't ever play because the Timeline recognizes they aren't on the model.

    I'm aware it can be fixed outside Unity. I'm aware there are 3rd party products that can smush and rename/reorder skinned mesh renderers. I want to be able to put some code somewhere, anywhere, so the same animations can be used and everyone down the line doesn't have to be aware of 3rd party apps, or models that are different, or animations that are different, or I have to go back out and remodel.

    Is there a solution inside Unity?

    Sorry for the emphasis, but I think I can save people wasting their time typing solutions I don't want to use or I know of but are last resorts.

    Thanks.
     
  2. dukerustfield

    dukerustfield

    Joined:
    Dec 5, 2019
    Posts:
    33
    Since no one chimed in, what I've done as a kind of crummy solution is just add in all the fake names to animation. Since the Timeline won't play a blendshape that doesn't exist, I can take advantage of that.

    So if I have 3 models with: Mouth, Shmouth, and wrongpath.Mouth
    blendshapes, I can take the curves and simply copy them, changing the property and/or path. So I can have those 3 models on the timeline using the same animation. But the animation has 2 unnecessary curves that it never uses, depending on which model it is assigned to. This is pretty easy to do programmatically. It's not elegant and I have to change any animation I use forever more. But it's a hack to be able to have the same "Yell Like Crazy" animation and it work with every model without making a "Yell Like Crazy Even If You Have A Shmouth" animation.
     
  3. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    I don't know of way to do this ....I would suggest cross-posting on the animation forums for more visibility. Timeline is simply the vehicle used to playback animation clips using the animation system, and this seems like a problem that could occur with any animation clip playback, so you may have better luck there.