emilianavt / VSeeFaceSDK

The VSeeFace SDK for Unity is used to export models in the VSFAvatar format.
158 stars 11 forks source link

Animator on model #38

Closed MooshPaw closed 1 year ago

MooshPaw commented 1 year ago

I was just wondering if there's any way to use the animator effectively, the only tutorial I've seen is the one where you can make the blending between a facial expressions and a blink look better, however other than that the animator feels pretty useless, masks don't work, and no animation works except when looked through the animator transitions

Is the animator for blendshapes only perhaps? Because the parameters used on the model do change and the animator does "work", however the animations that it says are playing don't actually play on the VSF model

emilianavt2 commented 1 year ago

The main animator cannot be used as it gets overridden by VSeeFace.

MooshPaw commented 1 year ago

Yeah, I was wondering about animators on things such as the armature rather than the root, which I've heard is the only way it works but doesn't feel like it does

emilianavt2 commented 1 year ago

Those should work. You can use components like the SetAnimatorFloat ones to manipulate the animators. If you create an animation that sets the value on such a component to 1.0, the animator will have access to the blendshape clip's strength.

MooshPaw commented 1 year ago

Yeah, i was wondering if this was blendshape exclusive as i couldn't get any bones to actually move despite the parameteres working and changing on the animator

emilianavt2 commented 1 year ago

They are not blendshape exclusive, no. Make sure that the bones you are trying to move are not part of the humanoid armature. Unity prevents those from being animated as transforms and requires muscle based animation instead, which has to be done from the main animator, so they would need to go through VSF_Animations.

MooshPaw commented 1 year ago

Hi, sorry that it took me a while to get some examples, here's what's going wrong with my character On VSF Animations i have what would only be parameters image As an example, this Dark T Parameter should set an int parameter to 2 image This is how the parameter looks like image And its location on the game object image

This is how the parameters look on the animator, as well as the transition to the animation image

And the animation is supposed to put the character on a very dark color scheme, changing the material image

Just in case here's the default color image

image However on the animator it's stuck like this, and also when clicking the "Texture dark" animation on VSF Animations it doesn't do anything image

Which is why i was wondering if this was blendshape exclusive due to the video, i also haven't managed to get non humanoid bones such as ears to work either

emilianavt2 commented 1 year ago

In the Dark T Parameter animation, it looks like the path is Texture/VSF_SetAnimatorInt, but from looking at the hierarchy, I believe it should be Armature/Hips/Parameters/Texture/VSF_SetAnimatorInt. Is it just how Unity displays it? If not, adjusting this with F2 might help already. Also, the shown transition only seems to depend on the Expression parameter and the BRB parameter, while the Dark T Parameter animation and Texture/VSF_SetAnimatorInt only affect the `Texture parameter? It would make sense that this transition would not be affected by it.

Which is why i was wondering if this was blendshape exclusive due to the video, i also haven't managed to get non humanoid bones such as ears to work either

It most definitely isn't.

MooshPaw commented 1 year ago

Ok, the display on unity is slight shorter than what it's supposed to be like, but it was indeed slightly wrong on the object's "address" because i was doing it from the armature animator rather than the main animator that will trigger the parameters, this said it still wouldn't work despite the parameters changing on both the component and the animator because it was on a different object, aka the Main body for Blendshapes/Textures being outside of the armature as this is usually the case

I decided to redo it and it works now, doing the parameters on a temporary animator on the root, and the texture changes on the animator in the Body with the blendshapes and materials Thanks