Data for Embedded

(Updated 06/16/2022)

This section describes how to output models and motion files for games and other embedded applications.

 

Types of embedded data

The data for incorporation is output from the cmo3 and can3 files, respectively, as follows.

 

  extension Description
1  .png The image set in the texture atlas is exported.
2  .moc3 Actual data of Live2D models for use in applications.
3  .model3.json The model3.json file is in JSON format and contains information for linking moc3 files, texture files, etc. By using model3.json when specifying models in the SDK's sample1 or AfterEffects plug-ins, you do not need to specify texture files yourself.
4  .physics3.json This data contains the set values for physical operations.
5  .userdata3.json This data contains the set values of user data.
6  .cdi3.json This data contains parameter and part name information and parameter linkage information.
7  .motion3.json Motion data for each scene set in Animator is exported.

 

Exporting Files for Embedded Use

Exporting moc3 files

Before exporting, please display the parts you need and hide the parts you do not need.

When exporting a moc3 file, the first step is to edit the texture atlas.
See “How to Create a Texture Atlas” for more information.

 

 

When you have finished editing the texture atlas, with the exported model displayed, click on the
[File] menu -> [Export For Runtime] -> [Export as moc3 file]
.

 

When the [Export Settings] dialog box appears, confirm each setting and click [OK].
* For the export target, select [1/1] to export the texture in its original size.

[Export settings]
(1) Export version Select the version of the SDK you wish to export.
(2) Export hidden parts Export hidden parts.
(3) Export draft parts Draw out the draft parts.
* If the draft parts are hidden, they will not be exported.
(4) Export
Export
Export hidden ArtMesh.
(5) Export physics calculation configuration file (physics3.json) Export the physics calculation configuration file (physics3.json).
(6) Export calculated FPS to physics setup file When the physics calculation file (.physics3.json) is written out, the FPS information is also written out together.
(7) Export user data file (userdata3.json) Export a user data file (userdata3.json).
(8) Expoer supplementary view file
(cdi3.json)
Writes out parameters, part names, and parameter concatenation information (cdi3.json).
* Export is recommended when using AE plug-ins.
(9) Model center X Sets the center position of the model.
(10) Model center Y Sets the center position of the model.
(11) Set at the center Return to default position.
(12) Canvas width (per unit) Set the size to fit the unit.
(13) Canvas height (per unit) Set the size to fit the unit.
(14) pixelPerUnit It is automatically set to match the width and height of the canvas.
(15) Export Target Set the target to specify the texture size, file name, etc.
(16) Export type Select whether to export for SDK or nizima.
If nizima is selected, you can set the model name and preview size.

 

moc file export (for 2.1)

This is a feature of the Cubism 3 version only.
With the modeling view displayed, configure the settings and click [OK] to execute.

[Export settings]
(1) Export version Select the version of the SDK you wish to export.
(2) Export hidden parts Export hidden parts.
(3) Export draft parts Draw out the draft parts.
(4) Apply color-migration prevention processing to textures Automatically apply the dust removal to the texture and export it.
(5) Export model configuration file (model.json)  Export a configuration file for Live2D Viewer.
(6) Open in Live2D Viewer after exporting  After exporting, open the model in Live2D Viewer.
(7) Export Target Set the target to specify the texture size, file name, etc.

 

Export Physics settings

The physics settings file is often exported together with the moc3 file when it is exported, but it can also be exported separately.
Select [File] menu → [Export Embedded File] → [Export Physics Settings].
Write out the physics configuration file (.physics3.json) with the save location.

For FPS information:
If the FPS information is not set in the model file, the information dialog is displayed and the FPS information is not written out.

If FPS information is set in the model file, a confirmation dialog box will appear and FPS information will be written only if [Yes] is selected.

How to set FPS information:
FPS information is set by opening “Physics and Scene Blend Settings” in the model file.
Model files created with Cubism Editor 4.1.01 or earlier may not have FPS information set.

 

Export motion file

With the animation file selected, configure the settings and click [OK] to execute.
It will be written out as a .motion3.json file.

POINT
Motion cannot be exported with model data selected.
Export is performed with the animation data or animation scene selected for export.

 

[Motion Data Settings]
(1) Export scene setting *2 Select the scene to be exported using the check buttons below.
(2) Export target Use the following pull-down menus to set the elements to be exported (model, parameter, and part display switching).
(3) Model Select the model to be exported. (15)
(4) Parameter *4 Select the parameters to be exported.
(5) Parts display switching *5 Select the display toggle for the exported parameters.
(6) Opacity *6 Select the opacity you want to export.
(7) Lip-sync Select the lip-sync settings to be exported.
(8) Eye blinking Select the blink settings to be exported.
(9) Lip-sync and blink to burn into motion. Lip-sync and blink effect settings are baked into the motion keyframes.
(10) Apply frame-by-frame Export including the frame strike set in the form animation.
(11) Export events Export including events set in Animator.

 

*2 Export scene setting
(12) Output all scenes Export all scenes.
(13) Outputs the currently selected scene Export the currently selected scene.
(14) Output scene with
motion export enabled
Select and export any scene.
(15) Output work area Only the work area is exported.

 

*4 Export target (17)
A All parameters Write out all parameters.
B Parameters with change Writes out the parameters that change.
C Keyed Parameters Writes out keyed parameters.
D Parameters not shy Write out non-shy parameters.
E Parameters not frozen Export parameters that are not frozen.
F Not write out Parameters are not written out.

 

*5 Export target (18)
A All Parts Export all parts.
B Variable parts Write down the parts of the change.
C Keyed parts Write out the keyed parts.
D Parts not shy Write out the parts that are not shy.
E Not write out The part is not exported.

 

*6 Export target (19)
A Write out Writes out all opacities.
B Only if the key is present Write out opacity only if the key is present.
C Not write out Opacity is not exported.

 

*6 Export target (20)
A Write out Export all lip-sync settings.
B Only if the key is present Export lip-sync settings only if the key is present.
C Not write out Lip-sync settings are not exported.

 

*6 Export target (21)
A Write out Export all blink settings.
B Only if the key is present Writes out the blink setting only if the key is present.
C Not write out Does not export blink settings.

 

 

Motion Export Settings

Motion can be selected and exported arbitrarily from the motion export settings.
In the [Motion Export] section of the Inspector palette, with the checkbox checked,
click the “Gear” button to display the Settings window.

The [Motion Export Settings] dialog box appears.
You can freely select the motion you want to export from the checkboxes.
After making your selection, click [OK].

Output scenes with motion export enabled

Open the [Motion Data Settings] dialog box by following the steps below.
Click [File] menu -> [Export For Runtime] -> [Export motion file].

Select [Output scenes with motion export enabled] in the Export Scene Settings and click [OK].

The motion selected in the [Motion Export Settings] dialog was exported to the specified destination.

 

Loading files for embedding

Motion files exported for embedding can be imported back into Animator.

 

How to load:

  1. Select a scene
  2. Right-click on the part of the track name (1) of the model you want to load motion into.
  3. Click Motion Load (2)
  4. Select the target motion3.json file

* It may take some time when loading motion.

 

 

 

 

 

© 2010 - 2022 Live2D Inc.