Movie Sprites
Re: Movie Sprites
okay, something is wrong with my animation, it made the character transparent but not the bg, is it something wrong with the webm format? because when i exported it as gif it was fine, when i converted it, it switched the hole thing
- 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
Did you also export a mask movie?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
- 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
Tried my project, built with 6.99.10, on a friend's new Windows 10 laptop and the looping animation is freezing after a few seconds.
Re: Movie Sprites
Well...yeah, both are actually the same filePyTom wrote:Did you also export a mask movie?
Re: Movie Sprites
Red channel of the mask movie is used as alpha channel for the main movie. The only more or less passable scenario where you can use the same movie for both is a really "reddish" movie on a black background. Like an intense campfire in night time... it will still prolly not be "perfect" but it might be ok.
- firecat
- Miko-Class Veteran
- Posts: 540
- Joined: Sat Oct 25, 2014 6:20 pm
- Completed: The Unknowns Saga series
- Projects: The Unknown Saga series
- Tumblr: bigattck
- Deviantart: bigattck
- Skype: bigattck firecat
- Soundcloud: bigattck-firecat
- Contact:
Re: Movie Sprites
found one free and it has almost everything AE offers, the only problem is how hard it is to use.nyaatrap wrote: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)
https://www.blackmagicdesign.com/products/fusion
Re: Movie Sprites
oh yes that was the problem hehe.PyTom wrote:Did you also export a mask movie?
thanks so much, Also is there a way to make it stop looping?
- 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
There's no way to make it stop looping. Basically, if the looping stopped, the movie would no longer be playing and the sprite would go away.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Re: Movie Sprites
The movie will go away just as PyTom said but you can edit the code a little bit to specify the amount of loops you want before that happens.maricore wrote:oh yes that was the problem hehe.PyTom wrote:Did you also export a mask movie?
thanks so much, Also is there a way to make it stop looping?
Looping was unacceptable for our project because we use complex conditioned animation sequences and we had to make sure that movie stopped after x amount of loops, so I've edited the class a bit to take amount of loops you want as an argument:
Code: Select all
class MovieLooped(renpy.display.video.Movie):
"""Play Movie Sprites without loops. Until Ren'Py permits that by default, this can be used.
"""
def __init__(self, *args, **kwargs):
super(MovieLooped, self).__init__(*args, **kwargs)
self.loops = kwargs.get("loops", 1)
def play(self, old):
if old is None:
old_play = None
else:
old_play = old._play
if self._play != old_play:
if self._play:
renpy.audio.music.play([self._play]*self.loops, channel=self.channel, loop=False, synchro_start=True)
if self.mask:
renpy.audio.music.play([self.mask]*self.loops, channel=self.mask_channel, loop=False, synchro_start=True)
else:
renpy.audio.music.stop(channel=self.channel)
if self.mask:
renpy.audio.music.stop(channel=self.mask_channel)
Code: Select all
image north = MovieLooped(channel="main_gfx_attacks", loops=2, play="content/gfx/be/webm/air/north/movie.webm", mask="content/gfx/be/webm/air/north/mask.webm")
=========>>>
You can also ATL it, showing the movie, pausing for the duration*x loops and switching to Null() but that worked less reliably and it sometimes went on for a couple more frames that it was supposed to... the above hasn't crapped out once so far and we're using them quite a bit.
- The Monkey Ninja
- Regular
- Posts: 34
- Joined: Mon Jul 05, 2010 5:06 pm
- Projects: 3^07, OneTimeValentine, OtomeDesign
- Organization: MooseCake Productions
- Deviantart: the-monkey-ninja
- Location: South Africa
- Contact:
Re: Movie Sprites
I've been trying this out for the last two days so I thought I'd ask now, haha.
Does Movie Sprites only support .webm? While I can get .mpg videos to play, the mask doesn't appear to work (and it is a different file). I'm actually trying to implement it for effects like little floating embers and such playing on loop.
Has been defined in init before the start label and:
is in the script following.
I've tried it with .avi, but .avi, even though supported I think, doesn't play or show at all. Of course, if Movie sprites only work for .webm then I guess this makes sense.
I'm also curious as to if there's a way to implement playing movies without the mask -- .avi, .mpg, .mov, as well as .mp4 all have the capability to export alpha channels and when dropped into AfterEffects they work as such. Or if I can support in some way to getting that implemented (I really want animated effects, but so far they produce 375 images which will take ages to define and I imagine would drive up the RAM use quite a bit).
Does Movie Sprites only support .webm? While I can get .mpg videos to play, the mask doesn't appear to work (and it is a different file). I'm actually trying to implement it for effects like little floating embers and such playing on loop.
Code: Select all
#######ANIMATED SCENIC EFFECTS:
image movie = Movie(channel="movie", play="Embers_CO.mpg", mask="Embers_Al.mpg", size=(1920, 1080), xpos=0, ypos=0, xanchor=0, yanchor=0)
Code: Select all
show movie with dissolve
I've tried it with .avi, but .avi, even though supported I think, doesn't play or show at all. Of course, if Movie sprites only work for .webm then I guess this makes sense.
I'm also curious as to if there's a way to implement playing movies without the mask -- .avi, .mpg, .mov, as well as .mp4 all have the capability to export alpha channels and when dropped into AfterEffects they work as such. Or if I can support in some way to getting that implemented (I really want animated effects, but so far they produce 375 images which will take ages to define and I imagine would drive up the RAM use quite a bit).
--
Cloaks are wonderful things~ <3
My DA page for all my art:
http://the-monkey-ninja.deviantart.com/
Ex-Nanoreno2017 game One Time Valentine has a (very rough) demo out now!
viewtopic.php?f=43&t=43314
Cloaks are wonderful things~ <3
My DA page for all my art:
http://the-monkey-ninja.deviantart.com/
Ex-Nanoreno2017 game One Time Valentine has a (very rough) demo out now!
viewtopic.php?f=43&t=43314
-
- Newbie
- Posts: 1
- Joined: Sat Nov 24, 2018 6:43 pm
- Contact:
Re: Movie Sprites
Is there a way to ensure that the current loop of a movie sprite finishes before another movie sprite is shown?
I'm hoping to ensure continuity and prevent sudden jumps in a sequence of movie sprites.
I figure that it may be done through the play_callback function but I'm not sure where to start. (I didn't find much by Googling)
I'm hoping to ensure continuity and prevent sudden jumps in a sequence of movie sprites.
I figure that it may be done through the play_callback function but I'm not sure where to start. (I didn't find much by Googling)
- Googaboga
- Eileen-Class Veteran
- Posts: 1395
- Joined: Wed Dec 12, 2012 1:37 pm
- Completed: https://gbpatch.itch.io/
- Projects: Floret Bond, XOXO Blood Droplets, Our Life
- Organization: GB Patch Games
- Tumblr: gb-patch
- itch: gbpatch
- Contact:
Re: Movie Sprites
I've been trying to get movie sprites to work for a project of mine. I used the ffmpeg method to turn pngs into webm with a mask. It works, but for some reason occasionally the mask fails and a black box appears behind the character for a moment. I'm not sure if it's an issue with my computer or if it's because I'm using 1920x1080 instead of a smaller scale or something else. Does anyone have a suggestion on where I should start to try potentially solving this? Oh, and my renpy is up to date.
Here's how it is usually-
https://gyazo.com/c2615e056e5326e48a2690ac9758e2c2
And here's the error-
https://gyazo.com/149553945a70767cae50657bea528680
[I'm sorry for the short loop]
Here's how it is usually-
https://gyazo.com/c2615e056e5326e48a2690ac9758e2c2
And here's the error-
https://gyazo.com/149553945a70767cae50657bea528680
[I'm sorry for the short loop]
In-Progress:
Floret Bond, XOXO Blood Droplets, Our Life
Released:
A Foretold Affair, My Magical Divorce Bureau, XOXO Droplets, Lake of Voices
Floret Bond, XOXO Blood Droplets, Our Life
Released:
A Foretold Affair, My Magical Divorce Bureau, XOXO Droplets, Lake of Voices
- RVNSN
- Regular
- Posts: 36
- Joined: Mon Apr 08, 2019 3:54 pm
- Projects: Lust & Piracy
- itch: rvnsn
- Contact:
Re: Movie Sprites
Can you use this to switch between displaying a video in a box and fullscreen without interruption?
And is it possible to play a movie and music at the same time? I want to make a lounge where the player can play music tracks from the game with the option of having a looping video play on a tv set in the lounge room or fullscreen.
And is it possible to play a movie and music at the same time? I want to make a lounge where the player can play music tracks from the game with the option of having a looping video play on a tv set in the lounge room or fullscreen.
Who is online
Users browsing this forum: No registered users