#03 Creating an Original Live Wallpaper

    Export the Model Data

To build the wallpaper into the app, we need the .moc file. 
Export the moc file from Cubism Modeler.


    Adding to the project

Copy the necessary data files to the Live2DWallpaper/asset folder.
The needed files include the .moc file and the 1024 (size) texture material file(s).
Do not worry about the file name and the path, these can be specified later. Simply put them into the folder for now.

You may drag and drop the files into Eclipse. The File Operation would appear.
Please check the box for Copy files and click OK.



    Change the Render File

Open the Live2DRenderer.java from the project folder, it is located at Live2DWallpaper / src / jp / live2d / sample


As shown above, you have the following codes at line 40.
  1. final String MODEL_PATH = "epsilon/Epsilon.moc" ;
  2. final String TEXTURE_PATHS[] =
  3.     {
  4.         "epsilon/Epsilon.1024/texture_00.png" ,
  5.         "epsilon/Epsilon.1024/texture_01.png" ,
  6.         "epsilon/Epsilon.1024/texture_02.png"
  7.     } ;

This is where the codes specify the model file to be read. 
These paths are referencing to the asset folder. 
For example, "epsilon/Epsilon.moc" reads the file from "Live2DWallpaper / assets / epsilon / Epsilon.moc".

Simply replace the files' names to the ones you copied to the folder earlier, and you will see your original model.
Hit the Play button to run it again, your specified wallpaper will be all setup!


    Summary

Live2D SDK is available for free for indie usage.
Developers are free to modify the SDK codes for any Live2D related application developments. 

Please feel free to distribute your own live wallpaper of your original model, such as on the app store!

For further details about Cubism SDK application development, please see the menu on the left. 

Any question, request, or work to share, welcome to post it on our Live2D community forum:

Thanks for reading!