Search Unity

  1. Curious about what's going to be in 2020.1? Have a look at the 2020.1 beta blog post.
    Dismiss Notice

Removing Clamping of Blendshapes to the Range 0-100

Discussion in 'Editor Workflows' started by davehunt_unity, Nov 17, 2017.

  1. davehunt_unity

    davehunt_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    21
    Hi Everyone,

    We have an update in the works to remove the clamping of blendshape weights to the current range of 0-100. This change will allow you to animate beyond that range so that blendshapes continue to deform at negative values and at values greater than 100, allowing you to get more motion with fewer blendshape targets.

    This change is being made in response to user feedback and suggestions such as this one:
    https://feedback.unity3d.com/sugges...orph-disable-0-100-limitation?page=1#comments

    While this change will be great for new content, it may have a visible (and potentially undesirable) impact on existing content. There will be adverse effects if keyframes or curve interpolations inadvertently go outside the 0-100 range. Likewise, if code increments blendshape weight values outside that range, it may now need to clamp weight values manually to achieve the same effect as before.

    This change could result in some broken looking facial animation if your content was made to depend on the old clamping behavior. Because our own testing has revealed these side-effects in a few randomly sampled Asset Store packages, we want to be careful about how to release this update in order to minimize regressions in existing Unity projects.

    There are a couple of things we can do to help users updating existing projects. We would like to ask for your feedback on what would be most useful:


    Mitigation #1:
    Provide an Editor script to modify animation curves to fit within the 0-100 range.

    Users could execute this script on-demand to repair desired animation clips with animated blendshape weight values. It would set new keyframes and modify tangents to ensure that animation curves always stay within the previous 0-100 range. We wouldn’t want to run this automatically in case the out-of-range animation was intentional.


    Mitigation #2:
    Add an import setting for 3d models to clamp blend shape curves within the 0-100 range.

    This option could be added as a supplement to the Editor script above, easing the transition for users whose projects contain animations obtained from the Asset Store. With this option, you could upgrade animation clips that would otherwise be read-only, even if you do not have software that can modify the source file from which the animation clip came. In this case, upgraded content would have the option enabled, while new content would allow blendshape weight animation curves to be in any range.


    Mitigation #3:
    Provide a setting to switch back to the old code-path with blendshape clamping on.

    In some cases it may make sense to keep the clamping how it currently works to preserve functionality of existing projects. This could either be a project-wide setting or an option on each individual SkinnedMeshRenderer. New content would have this option off by default, while content created in older versions of Unity would have it turned on when upgrading in order to keep it working the same. However, this approach can complicate the interface, so we want to see if it would be useful before we explore it further.


    Thanks, and we look forward to hearing your feedback!
     
    daisySa and laurentlavigne like this.
  2. eric720

    eric720

    Joined:
    Nov 19, 2017
    Posts:
    1
    Mitigation #2 makes most sense to me. Is there any time frame on the actual implementation? We are hit by this issue in our project. What is the current workaround?
     
  3. davehunt_unity

    davehunt_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    21
    Hi eric720, thanks for your reply. The release we are working toward is 2018.1 or 2018.2.

    I am sorry to hear you are hit by this issue on your project. For the time being, the workaround is to create additional blendshapes in order to get the poses you would otherwise get by animating beyond the default range. We understand this is not ideal and we are doing everything we can to fix it as soon as possible.
     
  4. Taphos

    Taphos

    Joined:
    Dec 5, 2012
    Posts:
    11
    Vote for #2
     
  5. SquadraCorse

    SquadraCorse

    Joined:
    May 28, 2014
    Posts:
    12
    Thanks for addressing this.
    FWIW, I vote for #2.
     
  6. cgarossi

    cgarossi

    Joined:
    Jun 23, 2013
    Posts:
    70
    Any ETA on this change? Right now I have blendshapes that go from -100 to 100 that affect eye animation. The blendshapes affect the up and down motion of the eye and also include the shaping of the surrounding eye lids and eye brows. Because of this issue, I can only make my character look up, since the look down values are in the negative range.

    It would be a major problem to create a new blendshapes since the code base works on the basis of a -1 to +1 * 100 calculation.

    If this change is a long way off then I guess we'll have to make new blendshapes but if it's quite close we'll hold off.
     
    daisySa likes this.
  7. TrickyHandz

    TrickyHandz

    Joined:
    Jul 23, 2010
    Posts:
    194
    I'm not sure if feedback is still being taken on this change. Just in case it is, I would like to echo the previous posters in favor of Mitigation #2. Having the ability to toggle the clamped range on a model on import would be very helpful. Adding that as an addition to the Editor Script mentioned in Mitigation 1, really makes for a good solution. I have a code base in place at the moment that does assume clamping of the blendshape range when creating animation clips in Unity, being able to either toggle clamping on a model or use the repair script to ensure intended behavior would be the best solution in my case.

    I really don't care for the idea of complicating the interface on the Skinned Mesh Renderer component in any way. Also, given that this could lead to per-instance settings differences, it would add another level of complexity to the tracking down animation issues in some projects.
     
  8. Piahouka

    Piahouka

    Joined:
    Sep 1, 2015
    Posts:
    39
    Vote for #2
     
  9. Ozz14

    Ozz14

    Joined:
    Aug 24, 2017
    Posts:
    1
    Hi, has there been any progress on this? I just want to echo the sentiments here- I think this is an important improvement to make because as a lot of animators such as myself are turning to Unity for its updated and streamlined cinematic capabilities, having clamping on blendshapes only makes our work more hard.
     
  10. Unity-Nikos

    Unity-Nikos

    Unity Technologies

    Joined:
    Sep 30, 2015
    Posts:
    39
    Hi, this will be available in 2018.3.
     
  11. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,393
    @Unity-Nikos Okay i know i shouldn't do this but since you guys are working on blendshapes. Any news about additives blendshape mode? would be great to use it for corrective shapes? Just asking.
     
  12. Rodolphito

    Rodolphito

    Joined:
    Jan 31, 2014
    Posts:
    17
    I tested Unity 2018.3.0b1 and b2, this change is not present in either. I tried to overshoot and it didn't work. Is it present, or am I missing something?
     
  13. Rodolphito

    Rodolphito

    Joined:
    Jan 31, 2014
    Posts:
    17
    My bad, I was in fact missing something. There is a setting in the Player tab, all the way at the bottom. Looks like they went with migration option #3, a project wide setting that is set to enable clamping by default on old projects. I disabled it and everything works! Thanks unity!
     
    wetcircuit and Unity-Nikos like this.
  14. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    810
    Are there any other changes to blendshapes? Morph3D-morphs don't work anymore (they seem to be multiplied, the mesh disappears if you move a blendshape slider above 0.15, with and without legacy clamping enabled.
     
  15. Carpe-Denius

    Carpe-Denius

    Joined:
    May 17, 2013
    Posts:
    810
    Seems to be fixed in b11.
     
  16. Icezman

    Icezman

    Joined:
    Mar 31, 2017
    Posts:
    7
    Where is this setting? could you provide a screenshot? I can't seem to find it?
     
  17. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    194
    Has there been any update to solve this issue? I also need my bloendshapes to go in a negative direction -100. Please let us know. Thanks
     
    LaurieAnnis likes this.
  18. LaurieAnnis

    LaurieAnnis

    Joined:
    Jan 24, 2010
    Posts:
    22
    This is not a technical answer, but I found that if you manually type in negative values into the box, you can animate in the negative direction. The only thing you can't do is drag the slider into the negative range.
     
unityunity