[SOLVED]Live2D character as an animated side image

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
Lehxra
Newbie
Posts: 11
Joined: Thu Feb 11, 2021 4:30 pm
Completed: Black Diary [Remake] Chapter One
Projects: Karaoke Neighbor, Welcome to the L/G
Organization: Lehxra, LLC
Tumblr: lehxra-arts
Deviantart: lehxra-art
Soundcloud: lehxra
itch: lehxra
Contact:

[SOLVED]Live2D character as an animated side image

#1 Post by Lehxra »

Initially asked on discord, but didn't get the answer I needed.
Does anyone know if there's a way to make a Live2D character an animated side image? I know that you can make it a static/unmoving one when using something like this
image side hiyori = Live2D("Resources/Hiyori", base=.6)

but I need it to be animated.
And there is also a roundabout way to make a "side image" messing around with layers/screens, but then the character stays on top of the menus, and I couldn't figure out what to do next. Overall, I don't want to use that layers method anyway, since I'm trying to replace my preexisting filmstrip side image with Live2D.

Is there something extra that goes in the side image code that can make it work properly?
Last edited by Lehxra on Mon Dec 05, 2022 10:41 pm, edited 1 time in total.

User avatar
timepatches
Regular
Posts: 91
Joined: Sun Aug 14, 2016 1:52 am
Completed: When Aster Falls; Were|House; DemiDato: Monster Dating Show; Grand-Nya
Projects: The Bat-Chelor
Organization: Sad Ghost Studios
Tumblr: sadghoststudios
itch: Sad Ghost Studios
Location: Australia
Contact:

Re: Live2D character as an animated side image

#2 Post by timepatches »

Not sure on your actual question, but if you do end up having to resort to using layers, you can set whatever layer your side sprite is on to clear when a menu is up using define config.context_clear_layers!
ImageImage Image

★☆ currently: DEMIDATO RELEASED MARCH 14 \ *°▽°* /
i appreciate honest critique!

User avatar
Kaji
Regular
Posts: 87
Joined: Thu Nov 17, 2022 10:17 pm
Github: Kaji01
Discord: Kaji#7767
Contact:

Re: Live2D character as an animated side image

#3 Post by Kaji »

The solution is to build the animation when defining the image. The following is an image I defined that created an animated ellipsis accessory to show on my characters:

Code: Select all

image npc_ellipsis:
    "images/npc/accessory_ellipsis0.png"
    pause 1.0
    "images/npc/accessory_ellipsis1.png"
    pause 1.0
    "images/npc/accessory_ellipsis2.png"
    pause 1.0
    "images/npc/accessory_ellipsis3.png"
If you want it to keep looping the animation, just put repeat as the last line of the block. While I've got it for an accessory here, there isn't any reason I can think of why you shouldn't be able to use it for a main image, background image, etc.

User avatar
Lehxra
Newbie
Posts: 11
Joined: Thu Feb 11, 2021 4:30 pm
Completed: Black Diary [Remake] Chapter One
Projects: Karaoke Neighbor, Welcome to the L/G
Organization: Lehxra, LLC
Tumblr: lehxra-arts
Deviantart: lehxra-art
Soundcloud: lehxra
itch: lehxra
Contact:

Re: Live2D character as an animated side image

#4 Post by Lehxra »

timepatches wrote: Sat Dec 03, 2022 5:19 am Not sure on your actual question, but if you do end up having to resort to using layers, you can set whatever layer your side sprite is on to clear when a menu is up using define config.context_clear_layers!
Hey, thanks so much for answering! That worked great for that option. Worst case, I'll be using that one.
I just hope someone knows the answer to the original question, 'cause it's going to be such a pain setting up if not.

Thanks again!

User avatar
Lehxra
Newbie
Posts: 11
Joined: Thu Feb 11, 2021 4:30 pm
Completed: Black Diary [Remake] Chapter One
Projects: Karaoke Neighbor, Welcome to the L/G
Organization: Lehxra, LLC
Tumblr: lehxra-arts
Deviantart: lehxra-art
Soundcloud: lehxra
itch: lehxra
Contact:

Re: Live2D character as an animated side image

#5 Post by Lehxra »

Kaji wrote: Sat Dec 03, 2022 5:48 am The solution is to build the animation when defining the image. The following is an image I defined that created an animated ellipsis accessory to show on my characters:

Code: Select all

image npc_ellipsis:
    "images/npc/accessory_ellipsis0.png"
    pause 1.0
    "images/npc/accessory_ellipsis1.png"
    pause 1.0
    "images/npc/accessory_ellipsis2.png"
    pause 1.0
    "images/npc/accessory_ellipsis3.png"
If you want it to keep looping the animation, just put repeat as the last line of the block. While I've got it for an accessory here, there isn't any reason I can think of why you shouldn't be able to use it for a main image, background image, etc.
Hi, thanks for answering. This would probably work great for normal images, but when using Live2D here, it literally only uses one .png texture file, so this couldn't be my solution.

laure44
Regular
Posts: 84
Joined: Mon Mar 08, 2021 10:55 pm
Projects: Arkan'sTower, Gemshine Lorelei!
Location: France
Contact:

Re: Live2D character as an animated side image

#6 Post by laure44 »

Not sure what's wrong here, because I tried making a Live2D side image and it did work. Or maybe I didn't understand the question right...

Code: Select all

define char = Character('Me', image="charimage")
image side charimage = Live2D("images/char/char.model3.json", loop=True)

label start:
    char motion "..."
    char eyesjoy "!"
    char -eyesjoy "..!"

User avatar
bonnie_641
Regular
Posts: 133
Joined: Sat Jan 13, 2018 10:57 pm
Projects: Código C.O.C.I.N.A.
Deviantart: rubymoonlily
Contact:

Re: Live2D character as an animated side image

#7 Post by bonnie_641 »

Another solution:

Here is a tutorial "How to make Movie Sprites with Transparency in Renpy".
https://www.youtube.com/watch?v=6tNE5fRhIzM
I speak and write in Spanish. I use an English-Spanish translator to express myself in this forum. If I make any mistakes, please forgive me.
I try my best to give an answer according to your question. :wink:

User avatar
Lehxra
Newbie
Posts: 11
Joined: Thu Feb 11, 2021 4:30 pm
Completed: Black Diary [Remake] Chapter One
Projects: Karaoke Neighbor, Welcome to the L/G
Organization: Lehxra, LLC
Tumblr: lehxra-arts
Deviantart: lehxra-art
Soundcloud: lehxra
itch: lehxra
Contact:

Re: Live2D character as an animated side image

#8 Post by Lehxra »

laure44 wrote: Mon Dec 05, 2022 7:08 pm Not sure what's wrong here, because I tried making a Live2D side image and it did work. Or maybe I didn't understand the question right...

Code: Select all

define char = Character('Me', image="charimage")
image side charimage = Live2D("images/char/char.model3.json", loop=True)

label start:
    char motion "..."
    char eyesjoy "!"
    char -eyesjoy "..!"
THIS is it. Thank you so much!
I wasn't aware I had to put the motion/expression after the name, plus my motion naming was a little off. Shouldn't have had spaces.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]