Page 2 of 3

Re: Movie Sprites

Posted: Fri Feb 12, 2016 3:02 am
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.

Re: Movie Sprites

Posted: Sat Feb 20, 2016 9:18 pm
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).

Re: Movie Sprites

Posted: Sun Feb 21, 2016 1:55 am
by PyTom
Can you send it to me?

Re: Movie Sprites

Posted: Sat Mar 05, 2016 12:23 pm
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.

Re: Movie Sprites

Posted: Wed Mar 30, 2016 7:08 am
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.

Re: Movie Sprites

Posted: Wed Mar 30, 2016 7:48 am
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

Re: Movie Sprites

Posted: Wed Mar 30, 2016 7:50 am
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.

Re: Movie Sprites

Posted: Wed Mar 30, 2016 9:56 am
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)

Re: Movie Sprites

Posted: Wed Mar 30, 2016 11:17 am
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).

Re: Movie Sprites

Posted: Wed Mar 30, 2016 11:36 am
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).

Re: Movie Sprites

Posted: Sun Apr 03, 2016 9:50 am
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:

Re: Movie Sprites

Posted: Sun Apr 03, 2016 10:32 am
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.

Re: Movie Sprites

Posted: Sun Apr 03, 2016 8:24 pm
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?

Re: Movie Sprites

Posted: Mon Apr 04, 2016 12:12 am
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.

Re: Movie Sprites

Posted: Mon Apr 04, 2016 2:21 am
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.