57
$\begingroup$

I need to save an animation as an animated GIF.

Can this be done from Blender? cheers.

$\endgroup$
7
  • 1
    $\begingroup$ If you want to use Photoshop: 1. Export from Blender to image sequence (JPG, PNG) at desired image size. 2. Import image sequence into Photoshop (Choose Open image, check the Image Sequence checkbox) 3. Keep colour mode in RGB (ie. don't switch to Indexed Colour, you'll lose the animation frames) 4. Choose Save To Web, choose GIF as file export option. It should indicate number of frames in the bottom of the screen. You can also choose Looping options here. 5. Save file. $\endgroup$ Commented Jul 22, 2013 at 14:57
  • 1
    $\begingroup$ Use AnimateGif(Freeware) AnimateGif is a small utility that will quickly create animated GIFs. It has a really simple interface that anyone can use. You may set loop, frame delay and quality options. What's more, it's lightweight, portable and fast! xylemstudios.com/products/animategif.php $\endgroup$
    – Sky Raker
    Commented Jul 23, 2013 at 8:47
  • 2
    $\begingroup$ @Lindsey, this question was edited to stay within the scope of Blender.Stackexchange, It's a good question (as the vote count suggests) but invites answers that involve software that isn't Blender -- this is partially the fault of my original edit to your question. Hopefully how it exists now makes more sense. $\endgroup$
    – zeffii
    Commented Jul 24, 2013 at 9:33
  • 1
    $\begingroup$ @zeffi thank you for the edit sometimes it is hard to know how to define the question so thank you for the help $\endgroup$
    – Lindsey
    Commented Jul 26, 2013 at 9:22
  • $\begingroup$ I think, it might indirectly be done using the Frame Serving feature. $\endgroup$
    – Samoth
    Commented Apr 5, 2016 at 16:57

6 Answers 6

44
$\begingroup$

No, GIF isn't supported. While the encoding library (FFmpeg) used by Blender supports GIF encoding, it's unlikely support for this format will ever be added.

Your best option is to render an image sequence and assemble them in another external application. This is really trivial to do however and you can find some good programs or methods around the internet by doing a simple search.

$\endgroup$
10
  • 18
    $\begingroup$ Why is it “unlikely support for this format will ever be added”? $\endgroup$
    – Kissaki
    Commented Sep 21, 2014 at 22:24
  • 1
    $\begingroup$ The Gimp can't handle 1000 layers :-) :-) $\endgroup$
    – juFo
    Commented Oct 1, 2014 at 16:02
  • 8
    $\begingroup$ @juFo If you are making a multi-thousand frame gif, You almost certainly using gif wrong. :\ If you try to distribute that over internet you'll need basically a video-streaming capable server and connection at which point, why aren't you using a standard video format. #twocents $\endgroup$ Commented Feb 9, 2015 at 20:08
  • $\begingroup$ Just download the ffmpeg encoding library directly and access that via a command prompt. It'll become mandatory sooner or later when using blender. You'll eventually want access to h.265, gif, better containers, and many other libraries and formats that blender hasn't implemented from ffmpeg. $\endgroup$
    – kite
    Commented Mar 25, 2019 at 7:59
  • $\begingroup$ Gifs have always been a great way to help starving freelancers who have to deal with bad connections. Playblasts don't need mp4s.You can share animated work with a client to give them the millionth look at progress. It's seriously asked of on the spot so much sometimes. People want control. A leighweight video with no sound, Good. You can REALLY use gif. Export is one of many, many things that would result in more people using Blender, like which has already happened. Also, It's good to be optimistic about the possibilities of the software we all use and want to see thrive with support. $\endgroup$
    – Simon
    Commented Jul 11, 2019 at 14:32
41
$\begingroup$

I created an addon that allows you to render or import animated GIFs with Blender. The addon is called Bligify.

Render GIFs

enter image description here

Import GIFs

enter image description here

$\endgroup$
7
  • $\begingroup$ Can't get the addon to render GIF (only frame sequence) on Mac is that expected? I've left a message on the youtube tutorial. Not sure where to leave a bug report ;-) $\endgroup$
    – 3pointedit
    Commented May 21, 2017 at 11:05
  • $\begingroup$ Sorry about that. I don't have access to a Mac, so coding for it is impossible for me right now. The addon requries Gifsicle and ImageMagick to work. I just packaged the executables into the addon for Windows users, but it's not so easy on a Mac. If you'd like to edit the code somehow to make it work for Mac users, I'd appreciate it. Else, I probably won't get around to it for a while. $\endgroup$
    – doakey3
    Commented May 21, 2017 at 14:14
  • $\begingroup$ Big Thanks! This seems to be right the life-saver tool I was needing (superimposing an animated GIF onto a mostly static clip - say, like an "animated decal")!! $\endgroup$ Commented May 30, 2018 at 11:15
  • $\begingroup$ FANTASTIC! More info though...first render the animation as images, then import images to the movie timeline, then use Bligify. Also, if you are trying to render a watermark over theanimation - which you should ;p - then you must select the watermark image layer and the Bligify layer then apply the alpha over effect. If you select the watermark layer and the animated images sequence layer then only the first frame of the animation will be shown in Blender and the result gif $\endgroup$ Commented Jul 10, 2018 at 14:18
  • $\begingroup$ imagemagick's command line syntax can vary between Win/Mac/Unix. I don't know the details, but that might be part of the problem if it's not working on Mac. $\endgroup$
    – Mentalist
    Commented Aug 9, 2018 at 10:14
13
$\begingroup$

You can convert a .png sequence to gif with ImageMagick.

Assuming you've already rendered your animation as a .png sequence, install ImageMagick and open up a terminal, go to your output directory, and execute:

convert -delay 1x30 *.png video.gif

This will convert all .png files in that directory to one .gif file.

The delay parameter defines how many ticks each image should be visible. 30 fps (1/30 sec) is used in the example above.

$\endgroup$
1
  • $\begingroup$ Thanks for this! It's way faster than doing it in Photoshop. Ps gives finer control, like holding each frame for a certain amount of time (to reduce file size), but often I just want to get the GIF made quickly, and this is the best way. $\endgroup$
    – Mentalist
    Commented Aug 9, 2018 at 10:48
7
$\begingroup$

You specified you wanted an in-house solution. As it was stated that's not possible outside of addons that introduce outside elements. You can go the other route though and download the ffmpeg library that is already within blender, allowing you to access it directly through a command prompt or powershell. Google ffmpeg, download the latest stable release, extract, drag the ffmpeg.exe into the folder (or setups paths) of the things u want to turn into gif. Then you can open a command console there and use the generic:

ffmpeg -i input.mkv output.gif

In many situations it may be preferable to make the dimensions and any effects desired in blender vse, with a gui, and export just the desired segment as a .jpg or png strip. If you are committed to high quality gif images you can expand on what your command uses a bit, search google. But in general some things u might want to pair with it:

ffmpeg -i input.mkv -vf scale=500:-1,unsharp=lx=13:ly=13:la=1.0 output.gif

or use
-vf scale=1920x1080:flags=lanczos
if you want to specify the scaling operation as lanczos or something else, its bicubic by default. But you only scale if you need to change the scale of the input, otherwise it translates over to the output automatically as is.

for jpeg/png the operation is just
-i %d.png
-i %d.jpg

You probably want to set the fps and start number tho so it would be like: For an image strip sequence named 800.png....onwards:

ffmpeg -framerate 24 -start_number 800 -i %d.png -vf scale=500:-1,unsharp=lx=13:ly=13:la=1.0 output.gif

For jpeg the scaling operation uses -2 instead of -1 for the automatic proportional scaling feature. I don't know if crf values work for gif or not but you'd just toss a -crf 18 before the output perhaps.

my pictures8002...my pictures8899
would be -start_number 8002 -i "my pictures"%d.png
i think it was -vframes 8012 if you wanted to only make the gif just from images 8002 to 8012; just toss it after the input in that situation. should work for video format outputs, never tried for gif.

$\endgroup$
1
  • 2
    $\begingroup$ Also can be scripted in Blender, using the external ffmpeg binary. An example is here. $\endgroup$
    – Hitokage
    Commented Apr 11, 2022 at 16:59
1
$\begingroup$

So, I had just run into this dilemma and couldn't get the above answers to work (or were too complicated). I ended up learning how to do it in Krita. In case anyone stumbles here in the future, here's a step-by-step process I came up with. Obviously, you'll need Krita. Once you've installed and linked FFMpeg, you don't have to do so each time and the process becomes quicker. BTW, I'm on Windows 10 64bit.

  1. Install Krita, if you haven't already. It's free.

  2. Download ffmpeg according to your system setup and extract to a safe place, or wherever. Mine is just on the C drive.

  3. Open Krita and create new document according to your image sequence size.

  4. File> Import animation frames...

  5. Now, click Add images and select all your frames, then select OK to import.

  6. Make sure the Timeline and Animation dockers are open: Settings> Dockers> Timeline; Animation.

  7. If there is a jitter at the end of your sequence that wasn't there in Blender, you may need to readjust your start and end frame values. This can be done in the Animation docker.

  8. Once it's all ready for export, simple go to File > Render animation. Here, be sure Video is selected and the first and last frames match what you set in the Animation docker, as well as the other values like dimensions and FPS.

  9. In the FFMpeg, link to where the ffmpeg.exe file is located. Example: C:\Ffmpeg\bin\ffmpeg.exe (where mine is).

  10. Be sure Render as: GIF image is selected and select your output location.

Badda-bing, badda-boom.

$\endgroup$
0
$\begingroup$

Try FIJI (ImageJ) Import > Image Sequence then Save As > Gif

\ plays the imported sequence and Alt + \ adjusts playback options.

$\endgroup$

You must log in to answer this question.

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