49
$\begingroup$

We now have over 1600 posts with gifs in them, gifs are very popular and useful; however it seems that they can be hard to create.
I have read placing .gifs in text and How to post gifs on this site?, yet I still have not found a complete write up for how to create and add gifs.

$\endgroup$
6
  • 2
    $\begingroup$ Yet another idea. This ScreenToGif tool is now here. $\endgroup$
    – Jake Dube
    Commented Apr 24, 2017 at 14:48
  • $\begingroup$ I would recommend ShareX. It can take screenshots and capture gifs, but it also immediately uploads them to imgur.com and provides you a link. With this, you don't have to worry about the SE upload limit because you can just point to the imgur link directly instead of going through the upload dialog. $\endgroup$ Commented Sep 26, 2017 at 16:48
  • $\begingroup$ @JoshSilveous while that is super convenient. I would urge you to not simply use imgur. All images need to be hosted on SE. Now if you can not make the gif under 2mb, that is a different issue, but then and only then should an external host be used. $\endgroup$
    – David Mod
    Commented Sep 27, 2017 at 11:31
  • $\begingroup$ @David But StackExchange's host is just a subdomain of imgur (stack.imgur.com). Unless StackExchange gets some kind of priority on imgur, why does it matter? The host is the same, the only difference is that it doesn't use "stack" in the domain. $\endgroup$ Commented Sep 27, 2017 at 11:41
  • 1
    $\begingroup$ @JoshSilveous Yes, SE uses imgur, but it is very different. Imgur guarantees that images hosted on i.stack.imgur will never be deleted. I do not trust them on their regular site. $\endgroup$
    – David Mod
    Commented Sep 27, 2017 at 11:51
  • $\begingroup$ We now have 17,000 posts with GIFs in them! $\endgroup$
    – Harry McKenzie Mod
    Commented Sep 2 at 1:01

6 Answers 6

59
$\begingroup$

The recording software

The top two are by far the most used (on this site):

  • LICEcap Windows and OSX installer

  • GifCam Windows only, but no install (yay)

  • ScreenToGif Newer app, looks very good, Windows only, no install (yay)

  • peek Linux only

Do note that these all can be run on linux using Wine.

There are many other ways, such as recording your screen, and then later converting to .gif (and in some cases that is better) but 98% of the time it is way easier to just use one of the options above.

Making the gif

This is the easiest and the hardest part, I'll explain.

All you have to do is hit "Record"
animated gif of making an animated gif

  1. But then you messed up one of the steps in blender you were trying to show off. (start again)
  2. You forgot to turn on Screencast Keys, or KeyCastOW (both how I display the key presses). (start again)
  3. You realize half way through that you are only recording half of the 3D view. (start again)
  4. You took way too long, and now have a 20mb gif. :( (start again)
  5. Blender crashes. (start again)
  6. Things that never go wrong (when you JUST made that exact same thing) go wrong now that you are recording a gif. (start again)

So it is easy to record a gif, it is hard to get it right.

You will quickly gain a new appreciation for all those that make hour long tutorials. I digress, back to the gifs.

Reducing the Size

You want to aim for the smallest file size possible. The three parts of that are how big you make the gif, how long, and what FPS.

I (almost) always use 15 fps.
I (almost) always make my gifs 650px by 400px.
As short as I can make the gif without making it unclear what is happening.

This is NOT how you want blender to look when you are making a gif.
gif recording
It is very hard to keep all actions in the gif capture window.

Instead change blender to look something like this:
blender set up for gif recording

Now everything you do in the 3D view will be recorded.

Publish on BSE

The biggest reason to aim for a small file size (under 2mb) is so you can use stack exchange's built in image upload and hosting.

If you do have a gif under 2mb then you can add it to your question or answer like any other image. By using the add image button, or simply pressing CtrlG.
add image button

However if it is over 2mb, then you will have to change the gif to get it under the 2mb limit. Crop it, if there is extra space in the gif that really does not need to be there - crop it out. Try different compression settings (I've found screenToGif has pretty good compression) that is the next easiest. If the gif looks too poor at the lower quality, then change the number of colors and re-record. If you reduce the variety of colors, the file will get smaller.

Please do not use an external image host. Even if you answer looks a tad better now with the uncompressed gif, eventually your answer will be broken. And dead links are worse than deleted default cubes.

$\endgroup$
6
  • 3
    $\begingroup$ Great post. I mention in Solution 2 here that both licecap and gifcam can run under wine on linux. $\endgroup$
    – iKlsR Mod
    Commented Nov 28, 2015 at 8:04
  • $\begingroup$ Also, you want to make sure that you enable capture cursor if you want to make your mouse show in the gif (as in here) i.sstatic.net/9LUMe.gif $\endgroup$ Commented Nov 28, 2015 at 22:09
  • 1
    $\begingroup$ Note that both Gifcam and LICEcap will work on linux via wine. Some of Gifcam's options will not be available, but basic operation will be fine. $\endgroup$
    – user1853
    Commented Nov 29, 2015 at 1:39
  • $\begingroup$ +1 for the "making the GIF" process! I just spent 5 hours failing at making a simple screen recording to send to a friend and I think every one of those happened! I'm also interested to see those other recorder options too as LICEcap doesn't work properly on my tablet. $\endgroup$
    – PGmath
    Commented Nov 29, 2015 at 15:51
  • 1
    $\begingroup$ So I've tried all three, LiceCAP works fine on my workstation but not on my Surface tablet, GifCam and ScreenToGif both work fine. ScreenToGif has a lot more features (including saving to a video file), but makes the computer lag a little while recording (doesn't affect the recording though). $\endgroup$
    – PGmath
    Commented Nov 30, 2015 at 18:04
  • $\begingroup$ My favorite GIF capture application is Gyazo. You can do screenshots and GIF capture, and it instantly uploads it to the web when you take it. Then just copy/paste the URL into SE. $\endgroup$ Commented Jan 16, 2017 at 14:22
11
$\begingroup$

You can make gif's using blender and GIMP.

Three ways you can get original frames from blender -

  1. Render an animation. Depending on what you want to show you can setup an animation in blender and render the animation to images. You can also use the viewports opengl render option.
  2. Accumulate a series of screenshots. Blender can take a screenshot of it's window. Take a screenshot at each stage that you want to display in the gif.
  3. Make a screencast. Blender can also automatically take a series of screenshots as you perform your task. There are settings in preferences under system to adjust the framerate of a screencast. The screenshots will be saved based on your render settings for location and filetype.

window menu

Making the gif -

Once you have a series of frames to use for your gif, you can open them in gimp. By using File->Open As Layers... you can select multiple images and have each one added as a new layer. Note that this will add the selected images to the current image so you may want to close all open images before doing this.

gimp - open as layers

Select and crop the image to the area you want in the gif. To reduce the filesize of the gif use Filter->Animation->Optimise (for GIF). This removes duplicated areas from each layer, leaving them mostly transparent and the result is opened in a new image.

optimise menu

Then export the image and give it a .gif suffix and you will get the options dialog for saving the gif, be sure to enable "as animation".

gif options

The gif's you save can then be added to your answer the same as any other image.

$\endgroup$
3
  • $\begingroup$ Could you show how you can change the delay between frames by editing the layer name. I always optimise (difference) must do a test one day. $\endgroup$
    – batFINGER
    Commented Mar 19, 2016 at 14:16
  • $\begingroup$ You can rename the layer to customise the delay of each frame - it will have (100ms) in the name. If you want the same delay for each frame you can change the export settings for delay and tick Use delay entered above for all frames which will override the delay in the layer names. $\endgroup$
    – sambler
    Commented Mar 20, 2016 at 4:00
  • $\begingroup$ According to the gimp docs optimize (gif) also reduces the size of the layer. $\endgroup$
    – sambler
    Commented Mar 20, 2016 at 4:18
9
$\begingroup$

There's definitely not a single best process. I hope this thread fills up with people weighing in on their method.

Linux here.. (Ubuntu) -- not crossplatform

My solution involves a few prerequisits

  • (optional) Kazam, you could use Blender's Screencast to create *.png
  • Blender's VSE, (hah! you totally have this already!)
  • FFmpeg's for the convert command,
  • gifsicle "command line automated gifs",
  • A Blender add-on called BCPrompt (disclaimer I wrote this add-on).

The instructions don't quite capture how simple this is to do :)

  • use Kazam (screencapture software with UI) to record a selected screen area to a .mp4. (hit start, do your thing, hit stop, save to .mp4)
    • When you make mistakes you can undo, or restart the demoing without restarting the kazam recording.
  • Import the .mp4 to Blender's VSE, and edit it till it shows only the most essential frames.
  • Now I'm ready to render the clip as a set of .pngs, but first I need to set the correct render dimensions and the start and end frame. With the strip/meta strip active I got to console and execute a few commands included with the BCPrompt add-on.

    >>> dandc     (ctrl+Enter is mapped to execute a command from console)
    

    the dandc commands does these two things for you:

    1. sets render-output's width and height from active strip's dimensions.
    2. sets start and end-frame from active strip's extents.
  • Render the VSE to *.png to some /Path/to/folder/ either via UI or

    >>> anim /Path/to/folder/
    
  • Once the render is complete I execute

    >>> ogif /Path/to/folder/ 256 24
    

    this outputs two animated gifs of the *.png in that folder

    • 1 non optimized called animated.gif
    • 1 optimized to 256 colors and 24 fps called opt_256_animated_24fps.gif
  • To get the generated gif into the browser I can execute system commands from the python console using an exclamation to prefix the line. (this turns the pyconsole into a lightweight terminal)

    >>> !nautilus /Path/to/folder/  
    

    will open nautilus at the given folder and I can drag the optimized.gif to the BlenderStackExchange window.

$\endgroup$
3
2
$\begingroup$

I use regular screen capture tools (anything to make a video), then upload the video to ezgif.com.

I currently switch between Quicktime and Monosnap (but I'm on a Mac). They both work well, but for different situations. Then I upload the result to ezgif for editing and "gif-making." This site lets me optimize with compression, cutting, frame rate, etc., and does it all rather quickly.

Let me know if you want more details, or a gif of the process :-)

$\endgroup$
1
$\begingroup$

Still working in 2.92:

To convert an existing image-sequence or movie-file, the Bligify add-on wraps ImageMagick and Gifsicle, and can be called from inside the VSE. You must give it the paths to those executables in its set-up panel.

At least, on Ubuntu, the .blend, with the paths set, must be saved as a startup for the paths to persist between sessions, unless you want to go in and tweak the script.

$\endgroup$
0
$\begingroup$

I use byzanz which is in the ubuntu repos, along with byzanz-record-window

A quick search also yields this, which I haven't tried.

If you prefer a graphic method there's also silentcast but I find its UI a bit confusing.

Another solution is using the internal blender screencast command, saving the output to ogv and using the script in this answer to convert to gif

Or render to png's and use

convert -delay 10 -loop 0 *.png -layers OptimizeFrame animation.gif

to convert to gif, and

gifsicle -O3 animation.gif --colors 256 -o out.gif

will optimize a bit further

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .