Forum rules - please read before posting.

Use negative intensity for Shapeable blendshape

Hi all,
first post so be kind :smiley:
I've been following the 3D primer on Youtube and am using a Ready Player Me character. My focus currently is on character expressions, and have been trying to create a "sad" expression by frowning the mouth. I don't have any 3D modeling experience (nor I care about having one, in all honesty) so I am not able to modify the pre-existing blendshapes from "Ready Player Me", which do not contain a "mouthFrown" slider. Instead, I have to set "moutSmile" to -1 in order for the mouth to frown! This works great, but the "Relative intensity" parameter of the blendshape only accepts positives (from 0 to 100).
I fixed this by modifying AC.ShapeableEditor.cs, line 100, to have the slider go from -100 to +100:

blendshape.relativeIntensity = CustomGUILayout.Slider (" Relative intensity:", blendshape.relativeIntensity, -100f, 100f, "", "The relative intensity (from -100 -> 100) of the Blendshape when the Key is fully active");

Now the question: is this the correct approach, or is there a better (more AC) way to do this? How to retain this change when a new version is created?

Thanks!

Comments

  • Welcome to the community, @darkgod90.

    What is your Unity version? It was my understanding that Unity only supported positive Blendshape values.

    If that's changed recently, and negative values are now supported, then I can certainly incorporate the above as an official change. Thanks for the report!

  • Hi @ChrisIceBox, thanks for reaching out! Your software is really good and as a fellow C# DevOp I gotta say I'm impressed :smile:

    I'm using Unity 6 (6000.0.31f1.7976.6018, to be exact).

    Let me know if you need any more info!

  • On this topic, I also found a minor bug. The blendshape.relativeIntensity slider is actually setting the absolute intensity of the blendshape.

    To replicate, create your blendshape as usuale and set the slider to 100.
    When the blendshape is activated, you'll see that the facial movements are way over exaggerated.

    Haven't had the time to debug this one yet!

  • Thanks for the report, but I'm not sure I'm seeing that.

    The effects of relativeIntensity are only seen in the ShapeKeyBlendshape class's Update function, which applies this as a value multiplier:

    float finalIntensity = value * relativeIntensity / 100f;
    

    I'm also not seeing the effects of negative values - Unity 6 still doesn't seem to support negative blendshapes. Am I missing a step?

  • Would it help if I upload / DM you the entire project, so you can replicate and see both the absolute and negative blendshapes in action?

  • edited February 8

    Sure thing.

  • DM'd you. Let me know if that's enough (just sent you the prefab that has negative blendshapes, since the whole project is ~8 Gb).

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.