Does Ren'Py support Live 2D?

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.
Message
Author
User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: Does Ren'Py support Live 2D?

#31 Post by renoa-heartilly »

hello ^^
a few months later and the Live 2d front is still progressing!
recently Live 2D team announced their support to a browser visual novel system named Tyrannoscript
http://tyrano.jp/demo/play/live2d
if you click the big red button next to the game window you will download the sample script, which shows the model was separated into folders (some for the character parts, some for ready-made animations like waiting and shock animation and blushing etc, among other folders)
i'm not a web developer and i don't know how Renpy displays things that aren't PNG files, so maybe someone who can understand both can look at this and tell us if it's possible to make renpy do the same thing?

maybe compile the texture file that makes up the character into the correct locations, and then apply the motion data to the parts with a simple statement, something like:

Code: Select all

show haru blush
h "Ohh it's a cafe!" 
h shock "w- what do you mean go in? I- It's not like i want to eat cake or anything!" 
and renpy will execute haru_shock.moc instead of haru_shock.png
can it work out at all or are the scripting languages too different?

User avatar
nash
Newbie
Posts: 20
Joined: Sat Jan 29, 2011 4:23 pm
Contact:

Re: Does Ren'Py support Live 2D?

#32 Post by nash »

I've also watching the progress of Live2D, now it really is open for Free User (with some restrictions though) I would really like to see a support for Ren'Py thus you can combine both to integrate animated sprites and figures :3
1 Litre of Tears
Image

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: Does Ren'Py support Live 2D?

#33 Post by renoa-heartilly »

nash wrote:I've also watching the progress of Live2D, now it really is open for Free User (with some restrictions though) I would really like to see a support for Ren'Py thus you can combine both to integrate animated sprites and figures :3
i'm hoping for that too! :mrgreen:



alright, so apparently in Unity you can display a Live2D paper doll using two of the file types exported by Cubism:
texture.png (the parts of the doll in an image with a transparent background, some are rotated but that's optional)
Model.moc (it is the file that tells the screen where to place each part of the paper doll)
the Unity script that actually displays a paper doll in the game window has this inside it

[see attached unity_live2d_script.txt]

Cubism Animator also exports a motion data file (or a container of several motions, like the character laughing or fidgeting or showing surprise etc)
according to unity, the contents of the motion file is this:
think of it as a grid, the first number of every PARAM_**** is the first frame, which means all the PARAM_**** play the first number all at once, that's why some are 0 where nothing is changed. second frame is the second number, all the PARAM_**** execute it together, etc
it is the text version of the keyframes at the top of this image:

Image

it will make more sense if you paste this into a text editor and disable 'text wrapping' :shock:

[see attached unity_live2d_motion.txt]

i hope this helps if someone is considering making renpy support live 2D
Attachments
unity_live2d_motion.txt
the key frames that show the different motions of the character.
(45.42 KiB) Downloaded 191 times
unity_live2d_script.txt
the script in unity that displays the paper doll.
(2.5 KiB) Downloaded 181 times

User avatar
PyTom
Ren'Py Creator
Posts: 16093
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: Does Ren'Py support Live 2D?

#34 Post by PyTom »

Interesting, although it looks like all the important code is in live2d.framework and live2d. What's the license on the SDK code? I could probably make it work somehow, but I'm not sure I could do it legally.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: Does Ren'Py support Live 2D?

#35 Post by renoa-heartilly »

PyTom wrote:Interesting, although it looks like all the important code is in live2d.framework and live2d. What's the license on the SDK code? I could probably make it work somehow, but I'm not sure I could do it legally.
oh wow! that's a relief! when i saw the reply was by pytom i thought it'll be something like 'STOP TRYING TO MAKE FETCH HAPPEN'
ahahaha h... ha..
well, i'm glad it's something that's possible at all!
the cubism website has a contact us page where you can email them and ask them about making the SDK, http://www.live2d.com/en/contact/contact_form
in their SDK download pagethey say they're open to any suggestions of other platforms, but i don't think anybody else has made an SDK before so i'm not sure if they have rules about that.
i hope they agree to consider Ren'Py even thought it's not a paid platform :cry: you can persuade them by showing them the huge number of good games made by renpy users for nanorenmo and games.renpy.org and how it will boost the usage of live 2d graphics if it got easier (which will only serve to make them more popular in commercial games) :shock:
fingers crossed that this works out!

User avatar
nash
Newbie
Posts: 20
Joined: Sat Jan 29, 2011 4:23 pm
Contact:

Re: Does Ren'Py support Live 2D?

#36 Post by nash »

renoa-heartilly wrote:
nash wrote:I've also watching the progress of Live2D, now it really is open for Free User (with some restrictions though) I would really like to see a support for Ren'Py thus you can combine both to integrate animated sprites and figures :3
i'm hoping for that too! :mrgreen:



alright, so apparently in Unity you can display a Live2D paper doll using two of the file types exported by Cubism:
texture.png (the parts of the doll in an image with a transparent background, some are rotated but that's optional)
Model.moc (it is the file that tells the screen where to place each part of the paper doll)
the Unity script that actually displays a paper doll in the game window has this inside it

[see attached unity_live2d_script.txt]

Cubism Animator also exports a motion data file (or a container of several motions, like the character laughing or fidgeting or showing surprise etc)
according to unity, the contents of the motion file is this:
think of it as a grid, the first number of every PARAM_**** is the first frame, which means all the PARAM_**** play the first number all at once, that's why some are 0 where nothing is changed. second frame is the second number, all the PARAM_**** execute it together, etc
it is the text version of the keyframes at the top of this image:

Image

it will make more sense if you paste this into a text editor and disable 'text wrapping' :shock:

[see attached unity_live2d_motion.txt]

i hope this helps if someone is considering making renpy support live 2D
+1
Wow, it really looks great, thanks bro! :3

Yeah, I looking forward to it and to a support with live2D. There a some more models samples here: http://sites.cybernoids.jp/cubism_e/samples
1 Litre of Tears
Image

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: Does Ren'Py support Live 2D?

#37 Post by renoa-heartilly »

:mrgreen: hi everyone!
i've used the past three months experimenting with the trial period of Live2D Cubism by making 1 finished project and starting several others, i've realized i'm really itching for a cross between live2D and Ren'Py!
Ren'py offers interactivity, choices, repeating the same expression with just one word, and ARABIC!
Live2D exports the sprite background as transparent by default, and it offers smoothly moving characters, less time making sprites expressive (especially if ur project has lots of characters), and the soft transition between poses with an idling pose in-between.

up until now i'm loving it, the only thing it's missing (to me) is a good environment for it to be used in!

This is the story i made for the 2015 Live2D Competition (it ended last week, the submissions are INSANE!) i wished i could make it into a visual novel, but i had very little time to learn TyranoScript (which Cubism supports with an SDK) so i made it using the accompanying Live2D CUbism Animator program:

points of interest are: you are part of the storyline, pupils dilate and contract! (so please watch on high resolution to catch that!)




Other unfinished projects:
chatting with your darling before sleep (sleepy boyfriend app anyone?)
Image

Eileen VN sprite ( availablefor download and use for free)
Image

pixelated character
Image

Garnet from Steven Universe (very rough, didn't have much time to work on it)
Image

Cat boy (instagram video, please click through to see the animation!)
Image

The live2D program (full version) can also export the characters in a smaller or bigger resolution texture file so the computer can load the scene as fast as possible, if your computer is slow or you're playing on a small-screen smartphone, it will load the smaller texture file, if you're on your hugeass 1080HD screen, it will load the biggest baddest texture file possible!

Making the sprites is super easy once you get the hang of it, fiddling with them after importing them into Live2D is the part that might take the most of your time. i actually enjoy that part because it feels like dressing up a 3D model without the hassle of actually making it, or going back and forth between two or more programs to see instant results.

i hope this inspires you guys to use it, you can export the sprite into still images and use it with renpy without animating it (like i did with the Eileen sprite) but you might want to finish ALL your sprites before you start exporting them, because you only get the full-size export option on the Pro Trial period (60 days) !

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Does Ren'Py support Live 2D?

#38 Post by trooper6 »

So you have been able to use Live2D sprites in Ren'py?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: Does Ren'Py support Live 2D?

#39 Post by renoa-heartilly »

trooper6 wrote:So you have been able to use Live2D sprites in Ren'py?
Live2D can give you a static (unmoving) sprite exported as a PNG with transparent background, so yes, of course!
here are images from the Eileen sprite thread :

Image

and
Image

this is a screenshot of an actual functioning Ren'Py game, it's really just the default new game which i manually defined images into:
Script.rpy

Code: Select all

# You can place the script of your game in this file.

# Declare images below this line, using the image statement.
# eg. image eileen happy = "eileen_happy.png"
image eileen = "images/normal.png"
image eileen bye = "images/bye.png"
# Declare characters used by this game.
define e = Character('إيلين', color="#c8ffc8", image="eileen")

# The game starts here.
label start:

    show eileen
    e "لقد بدأت حكاية رينباي جديدة."
    e bye "bye, come again." 

    return
if you want you can download the game for you to look at but it's not any different than any other Ren'Py game with manually drawn sprites. if you squint at the bottom of the sprite images you can still see the Live2D logo at the bottom but that's it.


i have not, however, been able to use the Live2D functionality in Ren'Py, which means the characters don't move.
it needs an SDK to import the Live2D aspects into Ren'Py, which isn't available yet (or ever), in my older comment at the top of the page i mention another visual novel engine that is supported by Cubism, but it can't do all the cool things Ren'py can and it doesnt support Arabic (an RTL language) :cry:

User avatar
astrokeofmadness
Regular
Posts: 160
Joined: Sun Sep 28, 2014 1:46 am
Completed: AAA:Book 1
Projects: A Stroke of Apprehension
Location: British Columbia, Canada
Contact:

Re: Does Ren'Py support Live 2D?

#40 Post by astrokeofmadness »

A Tad confused, seems a bunch of people posted here with the assumption you cant use live2d effectively atm with Renpy, which in fact you can. With the png export feature, you can create animations and then utilize them with renpys animation feature. What you need to do si create an idle animation that plays constantly, this is a very mild sway back and forth of each part. Then if you want more movements just export those movements and have those animations play when you need them. You'll have a very slight janky snap inebetween wherever the idle was and the default position used in the new animation, but it'll still look pretty solid. The only issue is filespace, which will obviously balloon quite heavily with this method, but it can be done.

I did just that for my visual Novel AAA.(See below) I didn't go as far as creating additional animations beyond the idle ones, but I will be doing so for my second VN.

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: Does Ren'Py support Live 2D?

#41 Post by renoa-heartilly »

hello astrokeofmadness ^^
With the png export feature, you can create animations and then utilize them with renpys animation feature
i tried a game that did that once, but my computer couldn't process it as fast and it made playing the story a complete nightmare! :shock:
there was just too much lag, i wished there was an option to turn the animation off!
also, even if you could somehow make the sprites small (like in phoenix wright) it will always be technically static. you cannot utilize the Live2D functionality by, say, making blinking randomized or changing the mouth as the character speaks!
i'm currently working on a vn that sometimes you get two or more characters on the screen, i think even if my computer can work with that during production, slower computers (or smartphones) will not be able to handle multiple PNG animations, although i didn't try it on one to say with 100% certainty, and i'm not sure how my own machine will handle it once the whole story is finished and all sprites are in place.

i've asked the Live2D support if they plan to make an SDK for Ren'Py, but it seems it's not a priority since they already have support for Tyrano Script which is more popular in Japan. Image

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Does Ren'Py support Live 2D?

#42 Post by trooper6 »

renoa-heartilly wrote: you cannot utilize the Live2D functionality by, say, making blinking randomized or changing the mouth as the character speaks!
No...but you can make blinking randomized or changing the mouth as the character speaks in Renpy already...without Live2D.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
astrokeofmadness
Regular
Posts: 160
Joined: Sun Sep 28, 2014 1:46 am
Completed: AAA:Book 1
Projects: A Stroke of Apprehension
Location: British Columbia, Canada
Contact:

Re: Does Ren'Py support Live 2D?

#43 Post by astrokeofmadness »

renoa-heartilly wrote:hello astrokeofmadness ^^
With the png export feature, you can create animations and then utilize them with renpys animation feature
i tried a game that did that once, but my computer couldn't process it as fast and it made playing the story a complete nightmare! :shock:
there was just too much lag, i wished there was an option to turn the animation off!
also, even if you could somehow make the sprites small (like in phoenix wright) it will always be technically static. you cannot utilize the Live2D functionality by, say, making blinking randomized or changing the mouth as the character speaks!
i'm currently working on a vn that sometimes you get two or more characters on the screen, i think even if my computer can work with that during production, slower computers (or smartphones) will not be able to handle multiple PNG animations, although i didn't try it on one to say with 100% certainty, and i'm not sure how my own machine will handle it once the whole story is finished and all sprites are in place.
Image
Tested in my game:
You CAN make an animation toggle, I just recently updated my game with one, which makes it usable on all systems. Honestly most low spec computers can handle 1 animation just fine, I ran the VN on my parents like 300$ laptop and it ran nearly fine, had issues with 3 characters on screen.(I'm using rather long animations of 20-30 frames, so if they were cut in half it might run even better) I also tried it on ios, on my iphone 5 and it can handle 2 characters fine, 3 causes a crash. So with that in mind, you can certainly craft a game to work on all systems, again the animations toggle would fix all issues of compatibility.
Considering computers will only be improving over time, you should assume most CAN run the game with 2 animations just fine, so long as you include the animation toggle for those who can't.

User avatar
renoa-heartilly
Regular
Posts: 115
Joined: Sat Jul 17, 2010 2:37 am
Completed: مقهى الضائعون, Arabic Translations for Ren'py, Pretty Please
Projects: حور, BB project, dentist drama
Organization: stanza studio (creative circle)
Contact:

Re: Does Ren'Py support Live 2D?

#44 Post by renoa-heartilly »

You CAN make an animation toggle,
that's great! is it a button in the options or a code you wrote it? if it's a code could you please post it here for future reference?
my current project isn't going to be animated only because i don't want to go through all the trouble of defining, animating and then displaying all of the expressions (there's a lot!)
for now i'm gonna work with what i have and what looks good, and in the future if it was possible to animate the characters more easily as PNG or live2d mesh, i'll either update the project or start a new one! :mrgreen:

User avatar
astrokeofmadness
Regular
Posts: 160
Joined: Sun Sep 28, 2014 1:46 am
Completed: AAA:Book 1
Projects: A Stroke of Apprehension
Location: British Columbia, Canada
Contact:

Re: Does Ren'Py support Live 2D?

#45 Post by astrokeofmadness »

I actually got the code thanks to the help of other people, info here:
http://lemmasoft.renai.us/forums/viewto ... =8&t=33553

Its basically defining a variable for animations being true, and then making a button in prefs that defines if its true or false. You set each thing that would be animated as an if statement. You can use it for basically anything technically.

Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot]