Arkueid / live2d-py

Live2D for Python (C++ Wrapper): Supports model loading, lip-sync and basic face rigging.
https://arkueid.github.io/live2d-py-docs/
MIT License
44 stars 9 forks source link

AutoBreath and AutoBlink not working #7

Closed JasonCocomo closed 2 months ago

JasonCocomo commented 2 months ago

Hi, Arkueid, thanks for your great work. I am a newbie to live2d. I am stucking at AutoBreath and AutoBlink now.

I enabled AutoBreath and AutoBlink as you commented out in the main_pygame.py.

    model.SetAutoBreathEnable(True)
    model.SetAutoBlinkEnable(True)

And i debuged in the Main/live2d/LAppModel.cpp,

    if (!motionUpdated)
    {
        Info("_autoBlink: (%d), _eyeBlink != NULL: (%d)", _autoBlink, _eyeBlink != NULL);
        if (_autoBlink && _eyeBlink != NULL)
        {
            // メインモーションの更新がないとき
            _eyeBlink->UpdateParameters(_model, deltaTimeSeconds); // 目パチ
        }
    }

And the output is all True, _eyeBlink->UpdateParameters was indeed invocked. But AutoBreath and AutoBlink were still not working. I also tested expressions and motions, they were all good.

Do you have any clue for this issue?

Arkueid commented 2 months ago

I'm not sure.

Check if the pose params or eye open/close params are overridden by SetParameterValue. They can still be overridden even with AutoBlink or AutoBreath enabled.

The models within this repo seem to work fine. It could be an issue with the model itself, I guess. It's possible that the params for AutoBreath and AutoBlink are not set during their creation.

JasonCocomo commented 2 months ago

Thanks for replying. Indeed it was my script which did some overriding like you said, so that's why it was not working. When i replaced my model in main_pygame.py, it worked well. Sorry for wasting your time, my bad. I am closing this issue.