Live2d Unity



Hi everyone, I'm Emp, and I've been learning how to work Live2D. I have some experience under my belt but have been asked by my client to keep things under my hat, so no newer examples (for now).

UnitySDK uses motion management Unity It is done using Mecanim which is a function. You can visually design a combination of motions in a graphical environment. NativeSDK on the side of Live2D SDK To perform motion management. It will be in the form of direct operation with OWViewer, Pause function We can operate in the form close to 2.1 etc. . Live2D를 적용한 게임들 (국내/국외). Live2D Workflow. Live2D를 Unity에서 사용하기. Live2D 장단점 5. Live2D 2D 일러스트를 있는 그대로, 입체적으로 움직일 수 있게 만드는 기술 CEDEC 2012에 Cybernoids가 발표 7.


Here is an example of one of my early experiments.
Movies Sprites for Ren'Py
Live2d unity sdkIf you're not sure how they would look, check out here. The basic premise is that I'd make you a movie of the animation plus a mask so that all you see is the moving sprite. The animation loops indefinitely, but because I am also a programmer, I can get around that somewhat by swapping to an idle animation at the proper time.
Animations for Unity
Live2D has an SDK for Unity that does a lot of the work for you, but I can walk you through the process of getting it set up if need be.
What I need from you
A PSD file for each model to be made. I've created a Checklist for what you need (sprites only, contact me to discuss what is needed for animated CGs/BGs). Each of these items needs to be on a SEPARATE layer. The optional ones you don't need, but if you can provide them they will make things easier on me and the whole process faster.
In addition to this I want a listing of what animations you want and a description of each, so that I know what to make. If I'm unsure about anything I'll be sure to ask you for clarification.
Pricing
Sprites:
Normal Model: 50 USD
Complex Model: 75+ USD depending on complexity
First Animation (usually an idle animation): Free
Additional Animation: +5 USD
CGs
Animated CG Lite (ie very few moving parts): 50 USD
Animated CG Normal (up to two people): 75-100 USD depending on complexity
Animated CG Crowd (3+ people or lots of moving parts): 100+ USD depending on complexity
Additional CG animation/variation: +5 USD
BGs
Animated BG Lite (particle motion or lighting changes): 50 USD
Animated BG Normal (moving parts): 75 USD
Animated BG Heavy (lots of moving parts): 100+ USD depending on complexity
Addition BG animation/variation: +5 USD
For BGs and CGs, a variation is something where I can use the same model to create the secondary version of the BG/CG. If I cannot use the same model to create the effect you are going for then it will count as a separate BG/CG.
Coding:
Coding sprite/bg/cg animations to transfer seamlessly: 25 USD +5 USD per 5 animations
I take payment through Paypal, and can send you an invoice if you desire. Please PM me here for commissions, and feel free to ask questions in the thread. I'm pretty active!

Thank you for your interest in Visual Novel for Dialog System for Unity.

Or you can get it from unity asset store here.
Please note that this asset requires ‘Dialog System for Unity’ to function, please get it from the asset store first.

This is a simple usage guide and tutorial.

Dialogue System for Unity is the de facto standard for creating branching dialogs in Unity, which makes it the perfect underlying asset for visual novels. But it’s a lot of work to create a professional looking visual novel using Dialog System for Unity alone. That’s where ‘Visual Novel for Dialogue System for Unity’ steps in. It will help you to create visual novels much faster using the already easy to use Dialogue System for Unity’s dialog editor with no programming skills required.

It supports Spriter and Live2D characters.

Get Started Creating Your Visual Novel

  1. Tools -> Visual Novel for Dialogue System for Unity -> Create new VN
  2. Enter your VN name and copy sample data if you need to
  3. Goto Assets->Visual Novel for DS -> Your VN Folder -> Databases -> ibnDialog
  4. Open the actors tab and enter your actors (more details in the actors section below)
  5. Open the locations tab and enter your locations which will hold your background images(more details in the locations section below)
  6. Start creating your conversations and use the fields information below.
  7. You may want to Tools -> Visual Novel for Dialogue System for Unity -> Input Manager Update
  8. Tools -> Visual Novel for Dialogue System for Unity -> Create VN Conversation Scenes
  9. Tools -> Visual Novel for Dialogue System for Unity -> Activate VN
  10. Open Assets->Visual Novel for DS -> Your VN Folder -> Scenes-> Start scene
  11. Test your Visual Novel then build it.

Visual Novel Setup

You want to open ‘Assets => Visual Novel For DS => Your VN => Scenes => Designer Scene’. Then choose from scene hierarchy the ‘Menu System’ gameobject and from the inspector choose ‘Add Input Definitions’ as shown in the screenshot below. Alternatively you can choose ‘Tools => Visual Novel for Dialogue System for Unity => Input Manager Update’.

Visual Novel for Dialogue System for Unity Sample Project

When you activate your VN, the following scenes are added to ‘File => Build Settings’

  • ‘Assets => Visual Novel For DS => Your VN => Scenes => Start’
  • ‘Assets => Visual Novel For DS => Your VN => Scenes => Loading’
  • ‘Assets => Visual Novel For DS => Your VN => Scenes => Conversation Scenes => ConversationXX’

This is an explanation of the VN components

  • Start is the menu scene
  • Loading is the loading sene
  • ConversationXX are the conversation scenes corresponding to the database’s conversation.
  • Conversation01 in the Example uses the GameResources approach (see below for Resources vs GameResources approach)
  • Conversation02 in the Example VN uses the Resources approach
  • DesignerScene is where you can edit your UI and other prefabs including the menu and you should apply your changes which will be reflected in your VN automatically
  • Assets => Visual Novel For DS => Your VN => Databases => ibnDialog is the VN database
  • Assets => Visual Novel For DS => Your VN => Databases => GameResources contains the resources for your VN. See below for explanation of GameResources approach folder structure
  • Assets => Visual Novel For DS => Example => Databases => GameResources => Resources contains the resources for your VN. See below for explanation of Resources approach folder structure

Preparing Our Resources

We need to organize our project in a certain way in a few steps to be able to proceed smoothly.

1. Create the following folder structure within your VN folder

+– Resources (or GameResources for advanced use)
| +– Audio
| | +– BGM
| | +– bgSFX
| | +– SFX
| | +– Voice
| +– BG
| | +– Location 1
| | | +– default
| | | +– variant
| | +– Location 2
| | | +– default
| | | +– variant
| | +– …
| +– Characters
| | +– Character 1
| | | +– default
| | | +– variant
| | +– Character 2
| | | +– default
| | | +– variant
| | +– …

Resoures is the root for your game resources which are categorized into 4 categories, each category has its own folder and will be explained in detail below. You can use a folder named ‘GameResoures’ only for advanced use which will be explained below in “‘GameResources’ Approach VS ‘Resources’ Approach” section.

Audio Category

Audio category has 4 sub-categories, thus 4 sub-folders. Let me explain each one in detail.

BGM

This folder holds the background music which is usually a looping track.

How to use live2d cubism

bgSFX

This folder holds background looping sound effects like wind or rain sound effects.

SFX

This folder holds sound effects that plays one time like door knock, gun shot or similar.

Voice

This folder holds the voice acting.

BG Category

The BG folder holds the images that will be placed in the background. This folder shouldn’t directly contain images. Instead a folder with the location name should be created, then inside that folder you put your image files. You can name your image files as you please, but naming it ‘default‘ means this is the default image to use with this location.

Characters Category

The characters folder holds the characters or any foreground images. This folder shouldn’t directly contain images. Instead a folder with the character name should be created, then inside that folder you put your image files. You can name your image files as you please, but naming it ‘default‘ means this is the default image to use with this character.

2. Plan your scenes

If your visual novel has a lot of game resources, then you might want to split your visual novel to multiple scenes to save memory. So make a list of the resources needed for the visual novel, and if the resources seem to be too much to be loaded at once, split your visual novel into parts. Each part will has its own scene and its own conversation tree in the Dailogue Database.

Creating Our First Visual Novel

1. Familiarize Yourself with Dialogue Database Conversation Entry Fields

Visual Novel for Dialogue System for Unity uses some custom Fields/Variables to make visual novel creation easy and smooth. Some of them are necessary and some of them are optional to customize your visual novel. We will cover in this section the necessary conversation entry fields to display our visual novel.

Customize ‘Dialogue Entries’ Template

This step is optional, but will save you a lot of time, so it’s highly recommended. Open your database and goto ‘Templates’ tab, then open the ‘Dialogue Entry’ expansion arrow and enter the following fields. You can always refer to the sample database or duplicate it. The sample database is located at ‘Assets/Visual Novel For DS/Example/Databases/ibnDialog’.

Visual Novel for Dialogue System for Unity Entry Template

1. Location

If the entry has a new background that should be displayed you can enter the Location name here. Leave blank to not change the background.

2. Location Image

If the entry has will display an image from the location folder other than the default, you can enter the image name here, where the image should be inside the Location’s subfolder under the ‘GameResources’ => ‘BG’ folder. You can leave it blank to use the default image inside that location subfolder.

Special Images:
You can enter ‘Black’ or ‘White’ to fadein to Black or White backgrounds regardless of location.

3. Speaker Image

If the entry has a new speaker image that should be displayed you can enter the image name here, where the image should be inside the Character’s subfolder under the ‘GameResources’ => ‘Characters’ folder. You can leave it blank to use the default image inside that character’s subfolder. This can be used if you want to change the expression of the character for example. Please refer to ‘Enter Speaker’ field below to actually display the image.

4. Conversant Image

If the entry has a new conversant image that should be displayed you can enter the image name here, where the image should be inside the Character’s subfolder under the ‘GameResources’ => ‘Characters’ folder. You can leave it blank to use the default image inside that character’s subfolder. This can be used if you want to change the expression of the character for example. Please refer to ‘Enter Conversant’ field below to actually display the image.

5. Active Fields Index

Visual Novels usually has several UIs for displaying text for different contexts. Usually there is a full screen narration and a character script.
This is the 1 based index for the UI that should be used.
This can have a value of -1 for hiding the UI all together, or 0 or blank for no change.

6. Enter Speaker

This specifies whether the specified speaker actor in the Dialogue Entry should appear on the screen.
This can have one of three values, ‘default’, ‘true’, ‘false’. Enter ‘true’ if you want the actor to enter the scene at that specific time, ‘false’ for ignoring displaying the speaker actor, or ‘default’ which will refer to ‘AutomaticEnterSpeakingCharacter’ variable value or ‘true’ if the aforementioned variable doesn’t exist.

7. Exit Speaker

This specifies whether the specified speaker actor in the Dialogue Entry should disappear from the screen.
This can have one of three values, ‘default’, ‘true’, ‘false’. Enter ‘true’ if you want the actor to exit the scene at that specific time, ‘false’ for ignoring this value, or ‘default’ which is equivalent to ‘false’.

8. Enter Conversant

To be Implemented
This specifies whether the specified conversant actor in the Dialogue Entry should appear on the screen.
This can have one of three values, ‘default’, ‘true’, ‘false’. Enter ‘true’ if you want the conversant actor to enter the scene at that specific time, ‘false’ for ignoring displaying the conversant actor, or ‘default’ which will refer to ‘AutomaticEnterConversantCharacter’ variable value or ‘false’ if the aforementioned variable doesn’t exist.

9. Exit Conversant

To be Implemented
This can have one of three values, ‘default’, ‘true’, ‘false’. Enter ‘true’ if you want the actor to exit the scene at that specific time, ‘false’ for ignoring this value, or ‘default’ which is equivalent to ‘false’.

10. Speaker Position

This specifies the position of the speaker. If the speaker enters the scene in this frame, it will enter in this position. If the speaker is already in scene, then the speaker will move to this new position.

11. Audio Files

This field is an advanced feature and if you use it, you should refer to VNResourceLoadingComponent documentation to work correctly. This should be a comma separated list of audio files that will be played in that entry’s audio playing commands that doesn’t contain a file name.
For example the following sequence contains two audio playing commands, both with filename field empty.

VNPlayBGM(, 0.1);
VNPlayBGSFX1(, 0.1, 1);

For that entry, we can have the ‘Audio Files’ field set to 01,Wind_sand2
In that case VNPlayBGM will play the file located in GameResources/Audio/BGM/01
And VNPlayBGSFX1 will play the file located in GameResources/Audio/bgSFX/Wind_sand2

12. Anim

Enter here your clip name (live2D and spriter are supported) to start animation for the speaking character, or multiple comma separated clipnames (spriter supported) to blend 2 animations.

13. Anim Transition

A bool value that specifies whether to blend into the new animation from the old animation or suddenly change to the new animation.

14. Anim Transition Time

The time of transitioning if the above filed is true.

15. Anim Factor

If you use 2 clips in Anim field, you can weight the clips, by enter a value from 0 to 1, where 0 is fully clip 1, and 1 is fully clip 2.

Customize Dialogue Database Variables

1. Alert

To be implemented.

2. ActorsAboveSubPanel

Will make the actor bottom above the UI box with the text.

3. ActorsYOffset

The offset between the actor bottom and the bottom of screen or the UI box in case of ActorsAboveSubPanel is set.

4. FixedAspect

If true, will use the FixedAspectRatio to display the visual novel, regardless of the aspect of the background and will use Letterboxing if necessary.

5. FixedAspectRatio

If FixedAspect is true will use this value to display the visual novel and will use Letterboxing if necessary.

6. AutomaticLightSpeakingCharacters

If set to true, then the speaking character will be highlighted by default except if overriden by the field in the dialogue entry.

7. AutomaticDarkenNonSpeakingCharacters

If set to true, then the non-speaking character will be darken by default except if overriden by the field in the dialogue entry.

8. AutomaticEnterSpeakingCharacter

If set to true, then the speaking character will enter the scene if it’s not already in the scene except if overridden by the field in the dialogue entry.

9. ProcessDuration

The duration for transitioning to highlighted from darkened character. For the beta, this will be used for all transitions like Movement of characters or fade in/out.

10. ActiveActorPositions

Default is “Center”. This is the a comma separated list of actor positions that can be used if no actor position is set. The position name should match the gameobject that will hold the actor position. Check ‘Actor Positions’ section below for more details.
Actor positions will be overridden if ‘Speaker Position’ field is specified.

11. BasePath

The path to the GameResources folder relative to the assets folder. Defaults to “Assets/GameResources”. This should be set if you use the GameResources approach rather than Resources approach.

Creating Actors in the Dialogue Database

For the Visual Novel for Dialogue System for Unity to work correctly, you should add all the Actors in the Actor database. This might change in future versions. You have to set ‘IsPlayer’ to true for character that will have choices and set ‘ImagePath’ in case the character has Images to display.

Actors Database

The following is description of the important fields in the Actors database

1. Name

The name of the actor.

2. IsPlayer

Whether the actor will have dialogue choices.

3. ImagePath

The sub directory to the images of the actor. For example if the images are in ‘GameResources/Characters/Hussein’ or ‘GameResources/Resources/Characters/Hussein’ path, set this field to ‘Hussein’.

Unity

Creating Locations in the Dialogue Database

For the Visual Novel for Dialogue System for Unity to work correctly, you should add all the Backgrounds in the Location database. This might change in future versions. Please set ‘ImagePath’ to the sub-directory of this location. You can have multiple images for one location.

The following is description of the important fields in the Locations database

1. ImagePath

The sub directory to the images of the location. For example if the images are in ‘GameResources/BG/Desert’ or ‘GameResources/Resources/BG/Desert’ path, set this field to ‘Desert’.

4. Editing the Dialogue Database

If you followed the section ‘Plan your scenes’ above, you should now have prepared one or more conversations to create depending on how you split your visual novel.
Create your first conversation, and first entry

5. Testing Your Visual Novel

Inside your Designer Scene which should be located under Assets => Visual Novel for DS => Your VN => Scenes => Designer Scene, there should be a gameobject with name ‘Conversation Data’.
Ensure that the ‘Reference Database’ of the ‘Conversation Trigger’ in the GameObject points to your VN’s Dialogue Database. Choose the conversation you want to play in this scene from the ‘Conversation Trigger’.

How To Use Live2d Cubism

‘GameResources’ Approach VS ‘Resources’ Approach

If you are using the ‘GameResources’ approach, the following step is necessary, but you shouldn’t take this step if you are using the ‘Resources’ approach.

In the ‘VN Resource Loading Component’ check the ‘Load Assets’ check box, which will traverse the conversation and set the required resources in the inspector, then get unchecked automatically. The purpose of this approach is to have references to the used assets in the scene so that when the scene is built, the associated visual novel resources is built with it. This is specially useful for mobile if you want to reduce the download size of your app, and use asset bundles to download necessary conversation resources only when needed.
If you mark a scene in the asset bundle, all the GameResources associated with it will be built with the bundle.
But if you use the ‘Resources’ approach, all the files in the ‘Resources’ folder will be built with the application, and it’s hard to use asset bundles to incrementally download necessary stuff if you are using basic Resources approach.

6. Creating your UI

Visual Novels usually has several UIs for displaying text for different contexts. Usually there is a full screen narration UI and a character script UI, but you can add more if you want. You can activate a certain UI for your dialogue node using the entry’s ‘Active Fields Index’ field.
Luckily there is a ready made prefab that you can use as is, or edit it. The prefab can be edited in the Designer Scene, it’s called ‘Visual Novel Unity UI Dialogue UI’

You will have ‘Visual Novel Unity UI Dialogue UI => Dialogue Panel’ which is the UI used when a character is speaking. You can activate and edit it. There is also ‘Visual Novel Unity UI Dialogue UI => Fullscreen Dialogue Panel’ which is the one used for full screen.

Visual Novel for Dialogue System for Unity Character Script UI

Visual Novel for Dialogue System for Unity Fullscreen UI

Actor Positions

Actor positions are the positions where the actors can enter the scene. You can have any number of actor positions, then you can specify the position name when an actor enters a scene, and the actor will enter to that position. If you want the positions to be decided automatically for the actors, use the ActiveActorPositions variable explained above.

Unity

Actor Positions are gameobjects with RectTransform component, and the actors will be children of the Actors gameobject with same RectTransform values as the corresponding position’s gameobject.

6. Audio

Visual Novel for Dialogue System for Unity has a builtin sound system. The sound system has 5 main categories.

  1. BGM which is the background usually looping music.
  2. BGSFX1 which is a background usually looping sound like rain or wind
  3. BGSFX2 is the same as BGSFX1, so you can have 2 background looping sounds, for example, wind and rain.
  4. SFX is a sound effect that plays one time.
  5. Voice is for voice acting.

7. Sequencer Commands

Visual Novel for Dialogue System for Unity comes with special sequencer commands.

1. VNWaitForProcessing

This sequencer command pauses the progression to the next node until processes like fading, moving, etc of the current node finish.

parameters

  1. Auto Continue:bool
    • Default:false
    • If true, once processing is complete, the dialog will progress to the next dialog entry automatically without the user having to click the continue button.

2. VNPlayAudio

Plays an audio file. If you are using the GameResources approach you should leave the audioClipName empty and use the ‘Audio Files’ field to specify the audio file. This applies to all the play audio commands below.

parameters

  1. audioClipName:string
    • The filename to play. You can always leave this field empty and specify your file name in ‘Audio Files’ field of the dialogue entry and this is required if you are using ‘GameResources’ approach.
  2. Subject:string
    • Audio type, can be BGM, BGSFX1, BGSFX2, SFX, Voice
  3. Volume Scale:float
    • Default:1
    • The volume of this clip relative to the subject. For example if the BGM volume is 0.5 and this parameter is 0.5, then this clip will play at 0.25 volume.
  4. Fade Duration:float
    • Default:depend on Subject, check corresponding command below
    • If the clip should fade in, specify here the duration of the fade in.
  5. loop:bool
    • Default:depend on Subject, check corresponding command below
    • If the clip should loop, set this to true.
  6. wait:bool
    • Default:depend on Subject, check corresponding command below
    • If true, then if the user issued a continue command, the clip will stop playing before proceeding to the next dialogue entry.

3. VNPlayBGM

parameters

  1. audioClipName:string
    • The filename to play, should be empty for ‘GameResouces’ approach and in this case, the filename should be specified in ‘Audio Files’ field.
  2. Volume Scale:float
    • Default:1
  3. Fade Duration:float
    • Default:the same as ProcessDuration variable
  4. loop:bool
    • Default:true
  5. wait:bool
    • Default:false

4. VNPlayBGSFX1

parameters

  1. audioClipName:string
    • The filename to play, should be empty for ‘GameResouces’ approach and in this case, the filename should be specified in ‘Audio Files’ field.
  2. Volume Scale:float
    • Default:1
  3. Fade Duration:float
    • Default:the same as ProcessDuration variable
  4. loop:bool
    • Default:true
  5. wait:bool
    • Default:false

5. VNPlayBGSFX2

parameters

  1. audioClipName:string
    • The filename to play, should be empty for ‘GameResouces’ approach and in this case, the filename should be specified in ‘Audio Files’ field.
  2. Volume Scale:float
    • Default:1
  3. Fade Duration:float
    • Default:the same as ProcessDuration variable
  4. loop:bool
    • Default:true
  5. wait:bool
    • Default:false

6. VNPlaySFX

parameters

  1. audioClipName:string
    • The filename to play, should be empty for ‘GameResouces’ approach and in this case, the filename should be specified in ‘Audio Files’ field.
  2. Volume Scale:float
    • Default:1
  3. Fade Duration:float
    • Default:0
  4. loop:bool
    • Default:false
  5. wait:bool
    • Default:false

7. VNPlayVoice

parameters

  1. audioClipName:string
    • The filename to play, should be empty for ‘GameResouces’ approach and in this case, the filename should be specified in ‘Audio Files’ field.
  2. Volume Scale:float
    • Default:1
  3. Fade Duration:float
    • Default:0
  4. loop:bool
    • Default:false
  5. wait:bool
    • Default:true

8. VNFadeoutBGM

Fade out then stop a BGM. Use Fade Duration of 0 to stop immediately.

parameters

  1. Fade Duration:float
    • Default:0

9. VNFadeoutBGSFX1

Fade out then stop a BGSFX1. Use Fade Duration of 0 to stop immediately.

parameters

  • Fade Duration:float
    • Default:0

Live2d Unity Motion

10. VNFadeoutBGSFX2

Fade out then stop a BGSFX2. Use Fade Duration of 0 to stop immediately.

parameters

Live2d Cubism Android Apk

  • Fade Duration:float
    • Default:0

11. VNLoadScene

Stop conversation and loads a new scene.

parameters

  • Level Name:string
    • Default:

12. VNReturnToMenu

Live2d Cubism Unity3d

Return to Main Menu.

no parameters

13. VNWaitForSeconds

Cubism Sdk

parameters

  • Time In Seconds:float
    • Default:1
  • Auto Continue:bool
    • Proceed automatically after the wait period
    • Default:true
  • Can Skip:bool
    • Allow the user to skip the wait period
    • Default:true




Comments are closed.