Automatic eye blinking

[Last updated: 01/18/2019]

 

Identification of parameters used for blinking

The automatic blink effect feature can be used to apply a random blink behavior to the model.
The following processing is performed to apply the automatic blink effect.

• Mapping with parameters to apply the value of the automatic blink effect described in the .model3.json file

• Set the time interval for blinking and call the update process

Of these, the information that maps the parameters to the automatic blink effect described in the .model3.json file
can be obtained by using the CubismModelSettingJson class, which extends the ICubismModelSetting class.

 

Check “Eye Blinking Settings” for definitions in the .model3.json file.
After blink and lip-sync settings are made on the Editor and then output, the .model3.json file will contain the following description.

 

 

Using CubismEyeBlink

To actually make them blink, use the CubismEyeBlink class.
This class provides, via the ICubismModelSetting interface,
for the blink parameter described in the .model3.json file,
random interval blinking motion.

 

Creation of CubismEyeBlink instance

To create a CubismEyeBlink instance, use the Native (C++) CubismEyeBlink::Create function or the Web (TypeScript) CubismEyeBlink.create function.
By passing a CubismModelSettingJson instance as an argument, the settings in the .model3.json file are automatically retrieved.
If omitted, the blink ID will be unspecified.

 

 

Blink Settings

The blinking time can be specified by Native (C++) CubismEyeBlink::SetBlinkingInterval function, Web (TypeScript) CubismEyeBlink.setBlinkingInterval function,
Native (C++) CubismEyeBlink::SetBlinkingSettings function, or the Web (TypeScript) CubismEyeBlink.setBlinkingSettings function.
The time between blinks set by the SetBlinkingInterval function is random, ranging from 0 seconds to twice the set time.

 

You can also use the Native (C++) CubismEyeBlink::SetParameterIds function, the Web (TypeScript) CubismEyeBlink.setParameterIds function,
the Native (C++) CubismEyeBlink::GetParameterIds function, or the Web (TypeScript) CubismEyeBlink.getParameterIds function
to change the blink parameters later.

 

 

Application to model

To apply the blink, use the Native (C++) CubismEyeBlink::UpdateParameters function or the Web (TypeScript) CubismEyeBlink.updateParameters function.
The first argument is the target model and the second argument is the difference time since the last update.

 

 

Discard

The CubismEyeBlink instance must also be destroyed when the model is released.

© 2010 - 2022 Live2D Inc.