Has anyone actually tried Live2d in Renpy?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
chesarty
Regular
Posts: 108
Joined: Sat Aug 25, 2018 3:07 am
Completed: 0
Contact:

Has anyone actually tried Live2d in Renpy?

#1 Post by chesarty » Sat Jan 16, 2021 6:28 pm

Update: i redownloaded a free version of Hiyori from Live2d's website and now the default image itself pops up, but the motions still do not work.....
hhhhh.jpg
This has to be the most frustrating thing I've ever dealt with in Renpy lolz
Last edited by chesarty on Mon Jan 18, 2021 4:07 pm, edited 1 time in total.

User avatar
Remix
Eileen-Class Veteran
Posts: 1551
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#2 Post by Remix » Sun Jan 17, 2021 8:36 am

Launcher -> Preferences -> Install libraries -> Install Live2D Cubism SDK for Native
Frameworks & Scriptlets:

User avatar
PyTom
Ren'Py Creator
Posts: 15575
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#3 Post by PyTom » Sun Jan 17, 2021 12:36 pm

Also, make sure you have 7.4.1, as it's working better there.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
chesarty
Regular
Posts: 108
Joined: Sat Aug 25, 2018 3:07 am
Completed: 0
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#4 Post by chesarty » Sun Jan 17, 2021 2:22 pm

Aaaand nothing works. Got rid of the error but it doesn't recognize any images or expression/motions.

ehe.png

User avatar
Remix
Eileen-Class Veteran
Posts: 1551
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#5 Post by Remix » Sun Jan 17, 2021 7:16 pm

You appear to have the motions in the same folder as the model3... (which is not a common way to organize the files)

Did you change the folder structure of the demo files there?

If you did, either revert back to the structure they used or edit the model3.json to accommodate your changes.

If not, check the model3.json file and make sure the motions are defined in there and the relative paths match the files you have.
Frameworks & Scriptlets:

User avatar
chesarty
Regular
Posts: 108
Joined: Sat Aug 25, 2018 3:07 am
Completed: 0
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#6 Post by chesarty » Mon Jan 18, 2021 9:07 am

Remix wrote:
Sun Jan 17, 2021 7:16 pm
You appear to have the motions in the same folder as the model3... (which is not a common way to organize the files)

Did you change the folder structure of the demo files there?

If you did, either revert back to the structure they used or edit the model3.json to accommodate your changes.

If not, check the model3.json file and make sure the motions are defined in there and the relative paths match the files you have.
I moved them back to the animations folder, but nothing changed. It still doesn't recognize motions.

User avatar
Remix
Eileen-Class Veteran
Posts: 1551
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#7 Post by Remix » Mon Jan 18, 2021 3:30 pm

Did you check/read the model3.json file?
Are they detailed in there?

You should have a section like:

Code: Select all


		"Motions": {
			"Idle": [
				{
					"File": "motion/miku_01.motion3.json"
				},
				{
					"File": "motion/miku_04.motion3.json"
				},
				{
					"File": "motion/miku_07.motion3.json"
				}
			],
			"Tap": [
				{
					"File": "motion/miku_02.motion3.json"
				},
				{
					"File": "motion/miku_03.motion3.json"
				}
			]
		}
Which details the relative path and file for each.
Ren'Py reads those to find the files (except if using a folder named exactly motions apparently - though I never tried that way myself)

Where did you get the Live2D assets?
If you link that, perhaps someone might try with the same stuff you are trying to get working...
Frameworks & Scriptlets:

User avatar
chesarty
Regular
Posts: 108
Joined: Sat Aug 25, 2018 3:07 am
Completed: 0
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#8 Post by chesarty » Mon Jan 18, 2021 4:01 pm

Remix wrote:
Mon Jan 18, 2021 3:30 pm
Did you check/read the model3.json file?
Are they detailed in there?

You should have a section like:

Code: Select all


		"Motions": {
			"Idle": [
				{
					"File": "motion/miku_01.motion3.json"
				},
				{
					"File": "motion/miku_04.motion3.json"
				},
				{
					"File": "motion/miku_07.motion3.json"
				}
			],
			"Tap": [
				{
					"File": "motion/miku_02.motion3.json"
				},
				{
					"File": "motion/miku_03.motion3.json"
				}
			]
		}
Which details the relative path and file for each.
Ren'Py reads those to find the files (except if using a folder named exactly motions apparently - though I never tried that way myself)

Where did you get the Live2D assets?
If you link that, perhaps someone might try with the same stuff you are trying to get working...
Just to make sure, I re-pasted the original files in without changing anything. It doesn't seem like the model3.json file ever had a section for motions, even though there are ten animations that come with the model...
I'm using the Hiyori model from VTube Studio's assets as my test files. Everything I got was copied straight from the app's package contents.
I'm gonna try it with another model from Live2d's own assets.

User avatar
Remix
Eileen-Class Veteran
Posts: 1551
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#9 Post by Remix » Mon Jan 18, 2021 6:26 pm

If the model3.json does not have a section for "Motions" you will have to use a specific folder hierarchy to automate it::

Code: Select all

    whatever_base_folder/
        the_model.model3.json
        # this folder must be named exactly "motions"
        motions/ 
            somemotion.motion3.json
            # etc

image model = Live2D("whatever_base_folder/the_model.model3.json") # note using full filename with path

Should allow

show model somemotion
... or add in the "Motions" section manually to the .json file

Sub-note: I had quite easy success with the Miku demo files (from the Live2D site) myself.
Frameworks & Scriptlets:

User avatar
chesarty
Regular
Posts: 108
Joined: Sat Aug 25, 2018 3:07 am
Completed: 0
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#10 Post by chesarty » Tue Jan 19, 2021 1:27 pm

Remix wrote:
Mon Jan 18, 2021 6:26 pm
If the model3.json does not have a section for "Motions" you will have to use a specific folder hierarchy to automate it::

Code: Select all

    whatever_base_folder/
        the_model.model3.json
        # this folder must be named exactly "motions"
        motions/ 
            somemotion.motion3.json
            # etc

image model = Live2D("whatever_base_folder/the_model.model3.json") # note using full filename with path

Should allow

show model somemotion
... or add in the "Motions" section manually to the .json file

Sub-note: I had quite easy success with the Miku demo files (from the Live2D site) myself.
I decided to switch to the Miku model to test it out, and while her json file has the motions specified, using them in Ren'Py still doesn't work. It doesn't recognize "show miku m02" for example, while "show miku" comes up with her default model. :(

User avatar
Remix
Eileen-Class Veteran
Posts: 1551
Joined: Tue May 30, 2017 6:10 am
Completed: None... yet (as I'm still looking for an artist)
Projects: An un-named anime based trainer game
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#11 Post by Remix » Tue Jan 19, 2021 6:54 pm

Did you try other variations?

show miku miku_01

What file structure do you have? Where did you decide to try "m02"? (was it from the documentation detailing motions in the very very specific format that Ren'Py can automate (which Miku is not using) or have you renamed things or used aliases?)
Frameworks & Scriptlets:

User avatar
chesarty
Regular
Posts: 108
Joined: Sat Aug 25, 2018 3:07 am
Completed: 0
Contact:

Re: Has anyone actually tried Live2d in Renpy?

#12 Post by chesarty » Wed Jan 20, 2021 10:03 am

Remix wrote:
Tue Jan 19, 2021 6:54 pm
Did you try other variations?

show miku miku_01

What file structure do you have? Where did you decide to try "m02"? (was it from the documentation detailing motions in the very very specific format that Ren'Py can automate (which Miku is not using) or have you renamed things or used aliases?)
The miku_02 structure worked!! thank you so much ;_;
Attachments
Illustration.png

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], whitewolf0000