CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
CriLipsShapeForAtomSource
Attention
Starting from SDK ver.3.06.00, it is recommended to not use this component (except with certain Unity versions).
Instead, please use CriLipsDeformerForAtomSource .
By using the CriLipsShapeForAtomSource component, which works in conjunction with CriAtomSource ,
you can set up ADX LipSync in the Editor, without requiring any coding.


exp4u_overview_crilips_image01.png


  1. Set the CriAtomSource and Skinned Mesh Renderer in the CriLipsShapeForAtomSource component

  2. Input the sampling rate of the audio that will be played by the selected CriAtomSource


The skinned mesh renderer's blend shape is automatically controlled using the mouth shape information coming from the analysis of the audio being the played by CriAtomSource .
To check the actual usage, refer to " \ref cri4u_samples_criatom_expansion_lipsync_scene01 " in the SDK sample.

Attention
The sampling rate of the input signal must be specified for ADX LipSync to analyze it correctly.
It is recommended to use the same sampling rate for the playback of the audio data.
To play the audio data with different sampling rates, call the CriLipsAtomAnalyzer.SetSamplingRate function.
Note:
* As shown in the figure below, it is possible to switch between the mouth shape information and the 5 Japanese vowels morph target amounts in the "BlendShapeType" tab.


exp4u_overview_crilips_image02.png


About "WidthOpen" and "WidthClose" when CriLipsShape.BlendShapeType is set to WidthHeight:

exp4u_overview_crilips_image03.png

When CriLipsShape.BlendShapeType of CriLipsShapeForAtomSource is set to WidthHeight,
WidthOpen and WidthClose are processed and morphed according to the value of CriLipsMouth.Info.lipWidth as shown below:
This is because CriLipsMouth.Info has a height of 0.0f and a width of 0.583f when it is muted.
(These values can be obtained by calling CriLipsMouth.GetInfoAtSilence.)
criLipsMouth.GetInfoAtSilence(out silenceInfo);
silenceWidthPosition = silenceInfo.lipWidth;
...
float lipWidthOpen = 0.0f;
float lipWidthClose = 0.0f;
if (info.lipWidth> silenceWidthPosition) {
lipWidthOpen = (info.lipWidth - silenceWidthPosition) / (1.0f - silenceWidthPosition);
} else {
lipWidthClose = (silenceWidthPosition - info.lipWidth) / (silenceWidthPosition);
}
...