Answered

Is it possible to apply joint corrective blendshapes automatically?

Anonymous 4 years ago updated 4 years ago 2

I.e. when elbow is rotated 0-90 degrees, a blendshape (correctivemorph_elbow) is applied 0-100 according the rotation of the elbow

In blender this is done through drivers and maya probably has something similar.

UMotion Version:
latest pro version
Unity Version:
2019.2

Answer

Answer
Answered

Hi,
thank you very much for your support request.

There is currently no way to build a custom property controller that drives multiple channels at the same time (in your case the rotation of the elbow and the blend shape weight). You could either adjust the blend shape manually according to the current rotation value or you could write your own driver script that does that for you.

For the scripting approach, add a new MonoBehaviour to one of the transforms of your GameObject that looks something like that:


public class ElbowMorphDriver : MonoBehaviour

{

   public float InputValue = 0f; // Access this property via a "Custom Property" constraint from UMotion

   [SerializeField]private Transform ElbowJoint;

   [SerializeField]private SkinnedMeshRenderer BlendShapeSmr;

 

   // This method is going to be called every time UMotion re-calculates the current pose.

   public void UMotionCallback() // Let UMotion call this method (enter callback name at Pose Editor --> Options -->

                                                   // Extending UMotion --> Callback Name; check out manual by clicking on the black info button)

   {

      // According to the InputValue, set elbow joint rotation and blend shape weight

   }

}


Please let me know in case you have any follow-up questions.

Best regards,
Peter

Answer
Answered

Hi,
thank you very much for your support request.

There is currently no way to build a custom property controller that drives multiple channels at the same time (in your case the rotation of the elbow and the blend shape weight). You could either adjust the blend shape manually according to the current rotation value or you could write your own driver script that does that for you.

For the scripting approach, add a new MonoBehaviour to one of the transforms of your GameObject that looks something like that:


public class ElbowMorphDriver : MonoBehaviour

{

   public float InputValue = 0f; // Access this property via a "Custom Property" constraint from UMotion

   [SerializeField]private Transform ElbowJoint;

   [SerializeField]private SkinnedMeshRenderer BlendShapeSmr;

 

   // This method is going to be called every time UMotion re-calculates the current pose.

   public void UMotionCallback() // Let UMotion call this method (enter callback name at Pose Editor --> Options -->

                                                   // Extending UMotion --> Callback Name; check out manual by clicking on the black info button)

   {

      // According to the InputValue, set elbow joint rotation and blend shape weight

   }

}


Please let me know in case you have any follow-up questions.

Best regards,
Peter

Thanks peter, I'll look into this