Differences in Motion Creation by Workflow
[Last updated : 09/03/2019]
Features related to motion of each SDK
|Workflow for Unity||Original Workflow(Native, Web, Unity)|
|Actuator||Mecanim||CubismMotionManager (Native, Web),
|Behavior of unspecified elements after motion ends||Reset to initial value||Value at end of motion|
|Part-to-part integrity protection||None||Yes|
|Motion Switching||Switching by linear interpolation
Motion units as specified in Mecanim
|Parameters are easing interpolation
Part opacity is linearly interpolated
Fade values can be registered in 3 ward frames
Unity and Mecanim Features
Motion control in Workflow for Unity is done with Mecanim, a built-in feature of Unity.
The component used is Animator, which creates motion controls in the form of state transitions in a graphical environment.
State transitions are controlled by parameters that can be set in the Animator.
This parameter can be controlled by scripts or AnimationClip with Animator control curves.
BrendTree allows blending between motions, which is not available in OWSDK.
This feature is powerful when used to blend facial expressions.
For more information on Mecanim, see Animation in the Official Unity Manual.
Notes on creating motion with UnitySDK
The most important thing to keep in mind is the consistency of the switching parts.
In Unity, the pose function automatically maintains consistency with the Original Workflow method, but
Workflow for Unity requires attention from motion to state transitions on Animator in order to maintain part consistency.
• Enter consistent values for all switching parts.
Unspecified parameter or part values may cause unexpected behavior because they will return to their default values if Write Defaults is set.
Also, when using the layer function, other layers may be affected.
• Do not include motion with switching in the BlendTree.
The value of the part may affect the midpoint of the display.
Linear interpolation during motion switching
The interpolation method used when switching between motions is EaseInOutSine interpolation for NativeSDK, whereas
the interpolation method provided by Mecanim in Unity is linear interpolation.
This interpolation method is comfortable for transparency, etc., but looks mechanical for linear interpolation such as rotational deformers.
Original Workflow Features
In Original Workflow, motion is controlled by registration in .model3.json using Cubism Viewer (for OW) and by code calls.
Instead of a graphical environment, the pose function maintains the integrity of the switched parts automatically and in real time.
Because of the property of remaining values after the end of a motion, the final motion can also be used as a state transition.
Facial expression motions are also available, where the compositing method can be individually specified.
All the items listed as features of Original Workflow are characteristics when using the Framework and samples included in the SDK as they are.
If you use the Framework as-is or create a program based on the sample, it will inherit the characteristics listed above.
However, since all programs other than Core are publicly available in the Cubism SDK, it is possible to modify the SDK implementation to suit the application specifications.
Follow the specifications of the program that will ultimately use the Live2D model.
To make the Pose function work correctly
The Pose function monitors the designations from motion to the corresponding part and recognizes the first non-zero operation it finds as the displayed part.
It is necessary to hit values for all switching parts as when operating in Workflow for Unity.
It is also important to ensure that the value is set to 0 for hide, as it will react if even a small value is left behind.
No part opacity manipulation in motion except by the Pose function
Due to the opacity of the part being manipulated via the Pose function,
if a part is not specified for part manipulation, even if it is specified in the motion, the manipulation will not be reflected.
When manipulating the visibility of a single part, it is necessary to provide a pair of empty parts.
Motion call characteristics
When using CubismMotionManager to play back motion, there is an item to set the priority of playback.
You can also reserve priority for future playback.
During playback, playback can be sorted by comparing the priority of the motion's playback request with the priority of the reservation.
csmBool CubismMotionManager::ReserveMotion(csmInt32 priority)
if ((priority <= _reservePriority) || (priority <= _currentPriority))
_reservePriority = priority;
Priority Order of Fade Designation
The Original Workflow method allows the fade time specification to be registered in three separate frames.
|Designation||Parameter unit||Registering motion to the model||Motion Standard||Unspecified standard value (1 sec)|
|Setup Method||“Set the fade value”||“Motion settings”||“Set the fade value”|
Currently, Cubism Animator does not allow loop settings, so the loop setting when importing Motion files is basically fixed at False.
CubismMotion* CubismMotion::Create(const csmByte* buffer, csmSizeInt size)
CubismMotion* ret = CSM_NEW CubismMotion();
ret->_sourceFrameRate = ret->_motionData->Fps;
ret->_loopDurationSeconds = ret->_motionData->Duration;
// NOTE: Exporting motion with loops is not supported in the Editor
// ret->_loop = (ret->_motionData->Loop > 0);
To load the settings from the motion file, change the commented out part above to the following to restore the settings.
ret->_isLoop = (ret->_motionData->Loop > 0);
[Note] ret->_loop is not a correct variable name, so uncomment it and change the description to ret->_isLoop.
Also, since editor settings are not currently available, you must process the .motion3.json file directly in a text editor to change the motion file settings.
In addition, specifying false for the fade-in setting during looping will result in editor-like behavior.
To change the fade-in setting for looping, add the following to the loop setting specified earlier.
Note that there is currently no setting in the motion file for fade-in during looping.
The Loop setting is useful when you want to use a fade for switching but do not want the fade to work during idle.
The idle motion for samples that do not use the Loop setting is designed to begin playing idle motion only when there is no motion that is running.
For this reason, when creating a program that derives directly from the sample,
idling motion switching should be considered inconspicuous.