Movie Sprites

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Message
Author
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: Movie Sprites

#16 Post by PyTom »

That's off-topic for this thread, which is about Movie sprites. It isn't clear what your first example even means, and the second has nothing to do with a Movie sprite.
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
ketskari
Veteran
Posts: 296
Joined: Tue Dec 21, 2010 6:22 pm
Completed: Asher, Sunrise, Tell a Demon
Projects: Asher Remake, TEoA
Organization: Sun Labyrinth
Tumblr: sunlabyrinth
Deviantart: sunlabyrinth
itch: sunlabyrinth
Contact:

Re: Movie Sprites

#17 Post by ketskari »

I took an animation I'd made in Blender, then converted to webM to try it out. After a few seconds it crashed on me, but omg still really looking forward to this feature. It looks great!

(Also, in the latest nightly, defined im.composites sometimes seem to revert to the default placeholder images).

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: Movie Sprites

#18 Post by PyTom »

Can you send it to me?
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
curry nochi rice
Miko-Class Veteran
Posts: 746
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Movie Sprites

#19 Post by curry nochi rice »

PyTom wrote:
Voight-Kampff wrote:So I'm wondering if we can generate sequences that can be looped in which the sprite constantly moves just a little bit—just a little bit of sway or shifting of their weight, etc.
Yes, things will loop by default. Obviously, you'd have to loop the animation proper - Ren'Py should just seamlessly play frames.
Hi PyTom, I'm wondering how you create sequences of movie sprites in code... e.g. "[heavy_breathing, normal_breathing]". Also, how to disable the auto-loop behavior since I wouldn't want the sprite to heavy_breathing again.
Or should I just wait for the documentation to appear? Hahaha. Sorry, I'm just too excited for this.
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Movie Sprites

#20 Post by xela »

PyTom wrote:Thanks to renoa-heartily for the animated gif I converted, which can be found in this thread: http://lemmasoft.renai.us/forums/viewto ... 79#p364740
A question if I may:

How did you create the mask movie of that .gif (changed white background to black and all other colors to white)? What software was used or even how to phrase such a question properly for google would be of a great help, cause I cannot figure even that out.
Like what we're doing? Support us at:
Image

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Movie Sprites

#21 Post by nyaatrap »

Using ffmpeg, I tested this code and works

Code: Select all

ffmpeg -i image.gif -filter:v alphaextract mask.webm
To make a mask from png sequence (0000.png-) is

Code: Select all

ffmpeg -r 24 -i %4d.png -filter:v alphaextract mask.webm

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Movie Sprites

#22 Post by xela »

nyaatrap wrote:Using ffmpeg, I tested this code and works

Code: Select all

ffmpeg -i image.gif -filter:v alphaextract mask.webm
To make a mask from png sequence (0000.png-) is

Code: Select all

ffmpeg -r 24 -i %4d.png -filter:v alphaextract mask.webm
Domo arigato! :) I'll try this tonight.
Like what we're doing? Support us at:
Image

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Movie Sprites

#23 Post by nyaatrap »

I think ffmpeg should be documented somewhere. I couldn't find other free applications that can make a mask video file. (except commercial applications like Adobe AE)

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Movie Sprites

#24 Post by xela »

There are some examples on stack overflow (now I know that ffmpeg can be used for this, searching is easier). You command line works perfectly btw, many thanks (again).
Like what we're doing? Support us at:
Image

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Movie Sprites

#25 Post by nyaatrap »

Oh, I mean somewhere in ren'py official document, at least mention that ffmpeg is suited. I think It's rare who knows about videos in ren'py user. Most users have no clue where to find, then spend many time on random googling (that's what I did).

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Movie Sprites

#26 Post by curry nochi rice »

Okay, was testing with exporting L2D animation to .mov >convert to .avi > integrate to RenPy and it didn't work out as plan. It seems exporting to .gif then converting to .webm is the only viable option for now? Gonna try .mov to .webm and see what will happen (or all the damn combinations I can think of). Will update.

Basically, it's still export to .gif > convert to .webm > get alphamask from .gif

Code: Select all

#give epsilon-idle.gif, in ffmpeg that would be 
ffmpeg -i epsilon-idle.gif -c:v libvpx -crf 4 -b:v 500K epsilon-idle.gif
ffmpeg -i epsilon-idle.gif -filter:v alphaextract epsilon-idle-mask.webm
:oops:
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Movie Sprites

#27 Post by nyaatrap »

I think png is the best. Gif loses its quality many, mov also loses a bit. That's why I wrote how to make a video from png by ffmpeg.

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Movie Sprites

#28 Post by curry nochi rice »

nyaatrap wrote:I think png is the best. Gif loses its quality many, mov also loses a bit. That's why I wrote how to make a video from png by ffmpeg.
Oh, sequential order. Do I need to do that like one by one or just that one line?
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Movie Sprites

#29 Post by nyaatrap »

-r 24 -i %4d.png will read 0000.png, 0001.png, 0002.png, .... then combine into one file with 24 framerate. You have to run ffmpeg two times for one motion: from pngs to real.webm, from pngs to mask.webm.

User avatar
curry nochi rice
Miko-Class Veteran
Posts: 746
Joined: Sat Mar 27, 2010 3:12 am
Projects: Delicatessen, Whom to Notice, Start of Something, Love Sorcery
Organization: Circle Cosine
IRC Nick: Curry
Skype: after.curry.rice
itch: project-rothera
Contact:

Re: Movie Sprites

#30 Post by curry nochi rice »

nyaatrap wrote:-r 24 -i %4d.png will read 0000.png, 0001.png, 0002.png, .... then combine into one file with 24 framerate. You have to run ffmpeg two times for one motion: from pngs to real.webm, from pngs to mask.webm.
Why 24 though? :oops:

ffmpeg has a default 25 fps setting to it. Anyway, the result of this afternoon's test after Nyaatrap's reply. Please forgive the dialogue, I was pretty much raging while doing this. :lol:
Image
Edit:
I wrote a tutorial about it, check it here.
Personal (R-13) | Now at IndieDB | Circle Cosine's itch.io
I wanna be done.

Post Reply

Who is online

Users browsing this forum: No registered users