How to: G i f s

Gifs are a really cool thing to have in your story, but I warn you - it’s gonna be tricky! :wink: But it’s so worth it!


Step 1: Split the gif
Split your gif into single frames. Make sure it’s in png format. If you can’t do this by yourself, I recommend this page: https://ezgif.com/ - it covers many useful functions. It also lets you turn a video into a gif, if you didn’t find the right one.

The more frames, the better the outcome :slight_smile: Note that gifs are repeated animations, so you probably won’t need all frames - just the ones that create the full ‘cycle’. (Hope this makes sense.)

Note down the frame time, you’ll gonna need this later.
Frame time is the time in which a single frame is shown for. For example if a gif lasts 3 seconds and it is split into 12 frames, then the frame time would be 3/12 = 0.25s. If you use the page provided above, it tells you the frame time.

Step 2: Upload
Upload the frames as overlays - yes, every single one :slight_smile: Make sure not to change it’s default position when uploading - unless it’s a full screen image. Otherwise you’ll have some trouble placing them later.
Name the overlays properly (with numbers), so that you know in which order to code them.

Step 3: Coding
It’s not as complicated as you probably imagine :wink:

Place all overlays at the same position - either by stage view or by commands.
Stage view: INT. BACKGROUND - DAY with FRAME1 with FRAME2 with FRAME3 etc.
Command: &overlay FRAME1 create

If using stage view - set the opacity to 0 except for the first frame.
If using commands - set the first frame’s opacity to 1.
You don’t have to specify the layers, God bless.

The idea of the following code is to show each frame for its frame time, show the next, fade the previous and so on - all on loop. As you may or may not know, the looping command doesn’t allow pauses, so how are we gonna let the frame show for a specific amount of time, you ask? We’re going to trick the script into making a pause.

The first frame is already showing, so we have to make the fake pause. Then we fade the next frame in and right after that fade the previous one out, then again the pause etc.

‘Deafult’ code template:

&overlay FRAME1 opacity 1 for [frame time] THEN FRAME2 opacity 1 in 0 THEN FRAME1 opacity 0 in 0 ...

This code is for one frame, so you just copy and paste it for as many frames as you have, changing their numbers of course.
(It is gonna be a long ass command but it eez what it eez.)

Practical example: 6 frames, 0.02 frame time

&overlay FRAME1 opacity 1 for 0.02 THEN overlay FRAME2 opacity 1 in 0 THEN overlay FRAME1 opacity 0 in 0 THEN overlay FRAME2 opacity 1 for 0.02 THEN overlay FRAME3 opacity 1 in 0 THEN overlay FRAME2 opacity 0 in 0 THEN overlay FRAME3 opacity 1 for 0.02 THEN overlay FRAME4 opacity 1 in 0 THEN overlay FRAME3 opacity 0 in 0 THEN overlay FRAME4 opacity 1 for 0.02 THEN overlay FRAME5 opacity 1 in 0 THEN overlay FRAME4 opacity 0 in 0 THEN overlay FRAME5 opacity 1 for 0.02 THEN overlay FRAME6 opacity 1 in 0 THEN overlay FRAME5 opacity 0 in 0 THEN overlay FRAME6 opacity 1 for 0.02 THEN overlay FRAME1 opacity 1 in 0 THEN overlay FRAME6 opacity 0 in 0 loop INFINITE times

Note how it goes back to frame 1 at the end. :eye:


:exclamation: Disclaimer: This method may not look as smooth with transparent images.


I hope this thread helped some of you :hugs: :tulip:
Happy coding, but first happy uploading your frames :clown_face: !

17 Likes

This is way to complicated for me sorry :joy:

1 Like

this is genius!!

3 Likes

i really want to try this but my lazy ass self doesnt approve :joy: :sob:

4 Likes

I got you :shushing_face:

1 Like

there is already a tutorial on looping gifs. :wink:

I know! :slight_smile: There are always multiple tutorials and thread about how to animate/code something… :thinking: I find it good that people can see different methods or different explainings - when they don’t get one, they might understand the other :innocent:

bump

Doesn’t it exist already?


@Sydney_H?

It’s not like she exactly copied the thread

2 Likes

I saw this and was like YUP!
First time I saw one used in a story I figured this is how it was done.
It’s nice but way too much work :sweat_smile: you’d probably only use it once in an ep. Or for a cool story into. :+1:

1 Like

Duplicate closed. Please refer to HOW TO: animate GIF in INFINITE LOOP