Transparency at start of movie

Knyghtblade

Newbie
Nov 3, 2017
63
14
Hi all,

Something I just noticed in my playtesting. Each of my webm videos is now showing a transparent frame at the beginning of each playing. (The grey and white checkerboard.). I had never noticed it doing something like this before. Has anyone else encountered this issue? It is doing it in the development version and the build version.

Any help greatly appreciated.

Cheers!
 

AnimeKing314

Giant Perv
Game Developer
Jun 28, 2018
395
597
Most likely not the video itself, the screen is probably being cleared and then video being shown so there's a brief instance where there's nothing on the screen. Can you post the code you're using to call the video?
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
If you're doing something like scene mywebm_displayable_here, try adding a transition to it.

scene mywebm_displayable_here with dissolve

There's also an option you add to the displayable definition to show a separate image before the movie starts playing (it's rarely this... as it's literally the time it takes to decode the first frame... which more computers can do really quickly).

image mywebm_displayable_here = Movie(play="myfilename.webm", start_image="mystartimage.jpg")

The start image can be just a black image or a copy of the first frame of the movie. Whatever you think works best. But as I say, it's rarely this that causes that brief flash of transparency.

Finally, there's renpy.movie_cutscene()...

... Just play a full screen movie with $ renpy.movie_cutscene("myfilename.webm") or $ renpy.movie_cutscene("myfilename.webm", loops=-1) to loop forever. The video will play (and hide) the current scene image.
 

Knyghtblade

Newbie
Nov 3, 2017
63
14
Sure - the code is:

image final = Movie(play="e1100.webm", loop=False, image="e1100.png")

The png is the final frame of the movie to stop it from jumping back to the previous image.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
image final = Movie(play="e1100.webm", loop=False, image="e1100.png")

image= is only used if the video file itself doesn't exist.
To quote the ... "For example, this can be used to create a slimmed-down mobile version that does not use movie sprites."

You're on the right track, but probably wanted start_image= instead.
 

AnimeKing314

Giant Perv
Game Developer
Jun 28, 2018
395
597
So I guess if you're calling the image using the scene function like 79 said then that's probably the cause. His solutions are probably the most elegant and what you want to try. One alternative if those don't work is to use show just like you would a character (ie show final). It's not a very good solution but what it does is draw the movie overtop of the current scene instead of clearing the scene first.
 

Knyghtblade

Newbie
Nov 3, 2017
63
14
I tried -

image full1 = Movie(play="full1.webm", loop=False, start_image="e1100.png", image="e1100.png")

and

image full1 = Movie(play="full1.webm", loop=False, start_image="e1100.png")

neither fixed the issue.

I also tried

$ renpy.movie_cutscene("full1.webm")

but that has the issue of the scene jumps back to the previous image.
 

AnimeKing314

Giant Perv
Game Developer
Jun 28, 2018
395
597
I tried -

image full1 = Movie(play="full1.webm", loop=False, start_image="e1100.png", image="e1100.png")

and

image full1 = Movie(play="full1.webm", loop=False, start_image="e1100.png")

neither fixed the issue.

I also tried

$ renpy.movie_cutscene("full1.webm")

but that has the issue of the scene jumps back to the previous image.
Do:
Python:
$ renpy.movie_cutscene("full1.webm")
scene e1100 #can make this an image called after_cutscene or something first if desired
This should do what you want.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,581
2,219
I also tried

$ renpy.movie_cutscene("full1.webm")

but that has the issue of the scene jumps back to the previous image.

Since you already have the last frame of your video stored as a PNG, how about...

Python:
image full1 = Movie(play="full1.webm", loop=False, start_image="e1100.png")

label start:

    scene black with fade
    $ renpy.movie_cutscene("full1.webm")
    scene e1100

    "Whatever happens next..."

Video is not my strong point. It's almost as bad a my screen language.
Did you try the scene full1 with dissolve ?
That's always been my go-to-solution for that sort of problem. It maybe not be the "right" solution, but it works for me.
 

Knyghtblade

Newbie
Nov 3, 2017
63
14
I've tried every permutation of every suggestion here and it still shows the transparency. It's driving me nuts.
 
Last edited:

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,548
I've tried every permutation of every suggestion here and it still shows the transparency. It's driving me nuts.
Mine are done like this.

The movie is an image series put together in movie software, I then code the lead up to the sex scene, the last thing I do before the animation is -

scene "what_ever_the_first_image_is"
"Oh yes Mickydoo fuck me sir"
jump fuck scene

Then code the fuck scene under the label as you normal do.