How do I use dragon bones to make animated sprites?

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
choco_cherry
Newbie
Posts: 6
Joined: Fri Dec 13, 2019 12:41 pm
itch: jess-andz
Contact:

How do I use dragon bones to make animated sprites?

#1 Post by choco_cherry »

I'm making a visual novel with my friend and we wanted to make animated sprites. We begun looking for options and we particulary liked the idea of making fluid animations with bones and deformation masks. We started peeking into After Effects but recently we found out about Dragon Bones. I tried to look for tutorials as to how to use both together and there's nothing, with AE we achieved to put in the game an animated sprite but we had problems with the transparency... is it possible to use this kind of programs with renpy? :(

image eileen movie = Movie(play="Prueba_animacion.3gp", mask="Alfa.mov") <-- the code.
show eileen movie:
ypos 204 xpos 55

User avatar
pistach
Newbie
Posts: 22
Joined: Tue Mar 05, 2019 9:25 am
Contact:

Re: How do I use dragon bones to make animated sprites?

#2 Post by pistach »

I used this tutorial to learn it:
https://www.udemy.com/course/free-2d-ga ... ls&src=sac
(I'm not associated with the teacher)

About implementing it in your renpy game, why not just export your animations as png sequences and then use renpy to animate them?
That's what I'm doing anyways.

I've never tried using the the "movie" tag and cannot help you with that.

User avatar
choco_cherry
Newbie
Posts: 6
Joined: Fri Dec 13, 2019 12:41 pm
itch: jess-andz
Contact:

Re: How do I use dragon bones to make animated sprites?

#3 Post by choco_cherry »

pistach wrote: Fri Dec 13, 2019 3:52 pm I used this tutorial to learn it:
https://www.udemy.com/course/free-2d-ga ... ls&src=sac
(I'm not associated with the teacher)

About implementing it in your renpy game, why not just export your animations as png sequences and then use renpy to animate them?
That's what I'm doing anyways.

I've never tried using the the "movie" tag and cannot help you with that.
Thank you for the info! Still, wouldn't it be a little too much frames in a animation like this for example? --> https://www.youtube.com/watch?v=3mC9suxK6zM

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3808
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How do I use dragon bones to make animated sprites?

#4 Post by Imperf3kt »

choco_cherry wrote: Fri Dec 13, 2019 8:48 pm Thank you for the info! Still, wouldn't it be a little too much frames in a animation like this for example? --> https://www.youtube.com/watch?v=3mC9suxK6zM
The duration of that animation is 2.54 seconds. At 30 frames per second thats 76.2 frames, which is a lot, but nothing Ren'Py cannot handle, unless you're adding several sprites like this. You'd have to test to see where performance starts to take a hit and remember that the people playing your game may not have as powerful a computer as you, or may have an even more powerful computer (part of the reason I do all my work on a crappy laptop)

You could cut back on the frames if you were concerned, but the animation wouldn't be as fluid or you could use movie sprites instead, but those come with the drawback that they can't be used on mobile devices.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
choco_cherry
Newbie
Posts: 6
Joined: Fri Dec 13, 2019 12:41 pm
itch: jess-andz
Contact:

Re: How do I use dragon bones to make animated sprites?

#5 Post by choco_cherry »

Imperf3kt wrote: Sat Dec 14, 2019 3:39 am
choco_cherry wrote: Fri Dec 13, 2019 8:48 pm Thank you for the info! Still, wouldn't it be a little too much frames in a animation like this for example? --> https://www.youtube.com/watch?v=3mC9suxK6zM
The duration of that animation is 2.54 seconds. At 30 frames per second thats 76.2 frames, which is a lot, but nothing Ren'Py cannot handle, unless you're adding several sprites like this. You'd have to test to see where performance starts to take a hit and remember that the people playing your game may not have as powerful a computer as you, or may have an even more powerful computer (part of the reason I do all my work on a crappy laptop)

You could cut back on the frames if you were concerned, but the animation wouldn't be as fluid or you could use movie sprites instead, but those come with the drawback that they can't be used on mobile devices.
Ok!! in the case that I want to use the movie sprites, how do I make them transparent? We had problems with the alpha mask since we don't really know how it works in this cases.
Thanks for the info :)

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3808
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How do I use dragon bones to make animated sprites?

#6 Post by Imperf3kt »

I'm afraid I don't know anything about movie sprites.
Best I can offer is the documentation
https://www.renpy.org/doc/html/movie.ht ... ie-sprites
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
choco_cherry
Newbie
Posts: 6
Joined: Fri Dec 13, 2019 12:41 pm
itch: jess-andz
Contact:

Re: How do I use dragon bones to make animated sprites?

#7 Post by choco_cherry »

Imperf3kt wrote: Sun Dec 15, 2019 7:05 am I'm afraid I don't know anything about movie sprites.
Best I can offer is the documentation
https://www.renpy.org/doc/html/movie.ht ... ie-sprites
Thanks anyway :)
Already read the documentation, might read it again, maybe I skiped some detail...

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3808
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: How do I use dragon bones to make animated sprites?

#8 Post by Imperf3kt »

As best I understand it, you need two video files.
One with your movie sprite, one in black and white to be used as the mask. Make sure the contrast is as high as possible, you only want black/white, no grey or in between.

The black areas will be "masked" in your movie sprite and become transparent.
I think.

The actual process involved is called alpha compositing.
https://en.m.wikipedia.org/wiki/Alpha_compositing

Or more specifically, alpha mapping
https://en.m.wikipedia.org/wiki/Alpha_mapping
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot]