Page 1 of 1

Has anyone actually tried Live2d in Renpy?

Posted: Sat Jan 16, 2021 6:28 pm
by chesarty
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

Re: Has anyone actually tried Live2d in Renpy?

Posted: Sun Jan 17, 2021 8:36 am
by Remix
Launcher -> Preferences -> Install libraries -> Install Live2D Cubism SDK for Native

Re: Has anyone actually tried Live2d in Renpy?

Posted: Sun Jan 17, 2021 12:36 pm
by PyTom
Also, make sure you have 7.4.1, as it's working better there.

Re: Has anyone actually tried Live2d in Renpy?

Posted: Sun Jan 17, 2021 2:22 pm
by chesarty
Aaaand nothing works. Got rid of the error but it doesn't recognize any images or expression/motions.

ehe.png

Re: Has anyone actually tried Live2d in Renpy?

Posted: Sun Jan 17, 2021 7:16 pm
by Remix
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.

Re: Has anyone actually tried Live2d in Renpy?

Posted: Mon Jan 18, 2021 9:07 am
by chesarty
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.

Re: Has anyone actually tried Live2d in Renpy?

Posted: Mon Jan 18, 2021 3:30 pm
by Remix
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...

Re: Has anyone actually tried Live2d in Renpy?

Posted: Mon Jan 18, 2021 4:01 pm
by chesarty
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.

Re: Has anyone actually tried Live2d in Renpy?

Posted: Mon Jan 18, 2021 6:26 pm
by Remix
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.

Re: Has anyone actually tried Live2d in Renpy?

Posted: Tue Jan 19, 2021 1:27 pm
by chesarty
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. :(

Re: Has anyone actually tried Live2d in Renpy?

Posted: Tue Jan 19, 2021 6:54 pm
by Remix
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?)

Re: Has anyone actually tried Live2d in Renpy?

Posted: Wed Jan 20, 2021 10:03 am
by chesarty
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 ;_;