Making Animated GIF’s of ANSYS Graphics for Fun and Profit


In last weeks article I included some animations of some plots from the examples.  While doing that I remembered that we have received a couple of questions recently about how to get result animations in a PowerPoint or a Website.  In this article we will talk about the tool I use and give some tips on making the process better. And, it give me an excuse to write about some software other than ANSYS, Inc.

Animated Gif Humor (14)Animated GIFs and Why we Need Them

As you know, an animation is simply a series of still images shown one right after another.  When we create Video on a computer we generally make something with 30 still frames shown every second.  Although the various formats for video have gotten much better, that is still a lot of pixels to send around. That makes a big file that may not be best for your web page or PowerPoint.  However, with modern high-speed internet and fast computers, that is not the problem it used to be.  It is still a concern.

What we really have to deal with is making sure that whatever we are using to present our animation can play it.  Can the person’s web browser show it?  Can PowerPoint show it?  Although YouTube is a possibility more and more, you really want a portable format that you can imbed in your document or site and that everyone can see.  If you research…  the only format that fits that bill is an animated GIF.

The gif format is compact, and because the early Netscape Navigator browser supported it, it became a default format.  Even Microsoft decided to support it.  So, as in some ways, it is the least common denominator that works for everyone.  Another cool thing is that the programs treat it as an image, not as a video or animation.  You copy and paste it, insert it, place it, edit its size just like you would any JPEG, PNG, or TIFF image.

You can learn about the format on Wikipedia. But if the binary info that greats you on that page causes your eyes to glaze over, you only really need to know the following:

    1. It is a file format that supports multiple images all contained in one image file
    2. You can specify how long to play a given image (frame)
    3. It supports transparency
    4. It is a standard and all web browsers and PowerPoint will display it
    5. You can imbed it in a PowerPoint so you don’t have to worry about carrying your animation files around in a folder with your PowerPoint.
    6. It only supports 256 colors. This is the downside of GIF’s

Unfortunately non of the ANSYS products make an animated GIF file.  They generally make an AVI, which is the most common video file, but something that most people can’t display on their website or put in a PowerPoint.  So we need to convert the AVI to a GIF, or create a GIF from a series of images.

There is one option we should mention, and that is creating an Adobe Flash file. This is a more modern and capable format but it has problems.  First and foremost, iPhones and iPads don’t display flash.  Second, to show a flash animation in PowerPoint you have to make sure a special flash player is installed.  So again, lowly GIF wins out.

GIF Movie Gear

I use a program called GIF Movie Gear. If you Google “AVI to GIF” you will find other tools. I picked this one because it had the features I wanted, it was cheap, and it works so far just fine. Over time, I have found it to be very robust as well.  It is from a company called Gamani, and you can download a trial version or purchase it for $29.95.  They have a nice website that lists all the features and offers some tutorials at:

Once you have it installed check it out. If you have not tried similar tools in the past, go through the tutorial. It is worth the time.

For the ANSYS user, here are the important features:

    1. It will import an AVI and break it into individual images (frames)
    2. You can crop and resize
    3. You can set the speed of the animation
    4. It is easy to use (important, since if you are like me you only need it once in a while)
    5. You can easily make a ping-pong animation (copy frames then reverse them)
    6. You can make an animation by reading in a series of images (important for MAPDL users that want to make a high quality animation)

There are a ton more features, but these are the ones that matter to us ANSYS types.

Building Animations from Images

If you are using Mechanical APDL (MAPDL) you can use the ANIM command to build an animation of your model as an AVI. The problem with this is that the AVI file format that ANSYS uses compresses the images to save space, and to do so it really reduces the quality of the image.  So instead, you can write your own animation macro and save a PNG file for each frame, then use GIF Movie Gear to make an animation.

To learn about how to make the images for your own animation, check out an old Focus article in Issue 49 from 2006, on page 6.  It talks about the program we used to use to make an AVI instead of a GIF, but it works the same.  You basically make a plot and save it as a PNG then modify your image and make the next one.  We use that macro in the examples below and put it here for you to use.  Take a good long look at it

You probably also want to reread (because I know you read it when we put it out) the more recent article on making pretty images from March of this year.

A Simple Example

To get the gist of how this all works, let’s build a simple tower model, put a pressure on the side, then animate it’s displacement.  Download this macro and run it in MAPDL.  If you look at the macro the last thing it does is make a contour plot of the total deflection (PLNSOL, U, SUM).  This is what we want to animate.

So we simply type: “agif_anm1,10”  into the command line to run the animation macro and it will make 10 PNG file. Look in your working directory and you will see twrexmp000.png through twrexmp009.png.  These are the frames.  Now on to making our GIF.

Start GIF Movie Gear and you will get the little start wizard:


Click on Insert Frames.  This opens a file selection dialog box. Shift-select the 10 frames we just made and click open:


You will now see the upper right corner of the first frame… Don’t panic.  this is the size of your image and the window is small.  Click the little zoom in icon (magnifying glass with a minus sign) until you see a couple of frames.  If you click the play icon, you will see your animation play very fast.  Not what we want.

So the first thing we will do is change the animation speed by changing the duration of each frame. It is 0 by default.  Go to Animation->Timing and it will show your hyper animation again. At the bottom, change the 0 to a 20 and hit return:


That calmed things down a bit. Close that window.

At this point you can simply save your animation and be done: File->Save and give it a name.  And this is what you get:


The Blogging software resizes it. Click on the image to get the full size version.

Changing the Size

That may not be the shape, size, or content you want.  To resize the image, use Animation->Resize:


Make sure that “Maintain aspect ratio” is checked.  If you don’t, your image can get distorted.  Then set the width or height to what you want.   I’ll use a width of 400.  Make sure the Bicubic is picked for your resizing.  The other method is slower to run but makes bad images unless you have only a few colors.  If you save this image you get the following:


Now, we may want to crop. We do that the same way: Animation->Crop. Now this is the only feature I don’t like. It shows the image in a small window.


So click on the Zoom In icon till you can see your image and drag to where you want it and click OK. Save that and you get:



One of the coolest things about GIF files is that you can tell the display program to not show a certain color, to make your image transparent.  This is great for PowerPoints.  To do this you need to mark one of the colors in your animation as “transparent.”

Go to Animation->Properties then click on the Global Frame tab:


Click on Transparent and it will bring up your color Pallet.  Click on the black background or the black color in the table and that will be the transparent color.  Now you need to set the bottom menu to “Restore to Background before drawing next frame”.  If you don’t do this you will see ghosting.

Click OK. Save that and you get:


Not too exciting on this blog because the background is white.  But imagine we had some fancy background.  Copy and paste this into your corporate PowerPoint template and you will see:


Converting for AVI’s

What, you are not a gray-haired throwback to a past time.  You use CDF Post or ANSYS Mechanical?  You can skip a lot of the first steps and just go straight from an AVI to an Animated GIF.

Regardless of which tool you are using, you simply need to save an AVI to get started.  For ANSYS Mechanical you do that by using the animation viewer to get the animation you want then click on the “Export Video File” Icon.  Remember to make sure you have turned off the fancy Aero window stuff.

To make a CFD animation read Clinton’s Article

Now that you have the AVI file you can make a GIF. Start GIF Movie Gear and click on Open File this time.  Choose the AVI and you will see all the frames in the AVI (zoom out if you need to).  If you like what you see, just do a File->Save As and save as a GIF.


Just like the animations made from images, you can adjust the size of the image, crop, and set animations.

One thing you may notice is the banding on the background. This is in the AVI due to compression in the AVI.  So if you are making animation we recommend you create a solid background (set in the project schematic->Tools->Options->Appearance) :


And once you have done that, you can use transparency:


Other Things You Should Know

When setting transparencies above we talk about making sure it says: “Restore to Background before drawing next frame” If you don’t, this is what your animation will look like:


For debugging it is kind of a pain to place in PowerPoint then view as slide show.  A faster way to view an animated GIF is to RMB on it in the explorer and say Open With… and choose Internet Explorer.  You can also drag it into your browser.  Much faster.

The program has an Undo.  Use it.  Try stuff, save the file, look at it, then undo if you need to.

Another thing to be aware of is Ping-Pong.  If you remember our first animation of the deflected tower, it only goes to the max deflection then snaps back to the beginning. It would be much nicer if it went back.   You can do that by going to Animation->Rearrange Frames –>Ping-Pong Animation.


Now save and you have an “up and back” animation.  The original is on the left, the ping-pong is on the right.


This tool is also a great way to grab a single frame from an animation.  Say you have an animation and you need a picture, and you don’t want to go back into the program to make it.  Simply read the AVI into this program, find the frame you want, then do a File->Save As. Pick your format and set “Save as Style” to Individual Image(s).  Then select the “Only selected frames(s)”


That is about it.  I hope this will help you make better presentations and cool websites.

Do you have seizures yet?








Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Technical Expertise to Enable your Addictive Manufacturing Success.

PADT Pulse Newsletter Screen Grab from March 2023

PADT’s Pulse Newsletter

Keep up to date on what is going on at PADT by subscribing to our newsletter.

By submitting this form, you are consenting to receive marketing emails from: . You can revoke your consent to receive emails at any time by using the SafeUnsubscribe® link, found at the bottom of every email. Emails are serviced by Constant Contact

Share this post:

Upcoming Events


Driving Automotive Innovation with Additive - Webinar


Hill Air Force Base Tech Expo


Structural Updates in Ansys 2023 R1 (3) – Structural Optimization & Ex


CROSSTALK 2023: Emerging Opportunities for Advanced Manufacturing Smal


Signal & Power Integrity Updates in Ansys 2023 R1 - Webinar


Additive Manufacturing Updates in Ansys 2023 R1 - Webinar


38th Space Symposium Arizona Space Industry

More Info


38th Space Symposium
Arizona Space Industry


Additive Aids for Manufacturing - Webinar


38th Space Symposium
Arizona Space Industry


38th Space Symposium


Venture Madness 2023


Fluid Meshing & GPU-Solver Updates in Ansys 2023 R1 - Webinar


8th Thermal and Fluids Engineering Conference


Structural Updates in Ansys 2023 R1 - Composites, Fracture & MAPDL


8th Thermal and Fluids Engineering Conference


8th Thermal and Fluids Engineering Conference


8TH Thermal and Fluids Engineering Conference


Arizona BioPreneur Conference | Spring 2023


2023 Arizona MedTech Conference


Optimize Jigs & Fixtures with Additive - Webinar


3D Design Updates in Ansys 2023 R1 - Webinar


Competitive Advantages of 1D/3D Coupled Simulation - Webinar


High Frequency Updates in Ansys 2023 R1 - Webinar


Additive Advantages in Aerospace - Webinar


Structural Updates in Ansys 2023 R1 (1) - Webinar


IME 2023: MD&M | WestPack | ATX | D&M | Plastek


IME 2023 MD&M | WestPack | ATX | D&M | Plastek


IME 2023 MD&M | WestPack | ATX | D&M | Plastek


Arizona Photonics Days, 2023


Arizona Photonics Days, 2023


TIPE 3D Printing | 2023


Venture Cafe Phoenix Talent Night - Job Fari


VFS 2023 Autonomous/Electric VTOL Symposium


Arizona Photonics Days, 2023


Building A.M.- Utah: Kickoff!


TIPE 3D Printing | 2023


VFS 2023 Autonomous/Electric VTOL Symposium


VFS 2023 Autonomous/Electric VTOL Symposium


TIPE 3D Printing | 2023


2023 AZ Tech Council Golf Tournament


Simulation Best Practices for 5G Technology - Webinar


Digital Twins Updates in Ansys 2022 R2 - Webinar


Tech the Halls - AZ Tech Council Holiday Mixer


Electric Vehicle and Other Infrastructure Update Panel


SPEOS Updates in Ansys 2022 R2 - Webinar


Simulation Best Practices for Electronics Reliability - Webinar


Discovery Updates in Ansys 2022 R2


VentureCafe Phoenix Panel: Venture Capital in AZ




VentureCafe Phoenix Panel: Angel Investment in AZ


High & Low Frequency Electromagnetics Updates in Ansys 2022 R2


Simulation Best Practices For Chip-Package-System Design & Development


Nerdtoberfest 2022


2022 Southern Arizona Tech + Business Expo


LS-DYNA Updates in Ansys 2022 R2 - Webinar


Experience Stratasys Truck Tour - Clearfield Utah


ASU School of Manufacturing Systems and Networks - Formal Opening Cele


Experience Stratasys Truck Tour - Midvale Utah


Experience Stratasys Truck Tour - Littleton Colorado


Fluids Updates in Ansys 2022 R2 - Webinar


Experience Stratasys Truck Tour - Colorado Springs


White Hat Life Science Investor Conference - 2022


2022 AZBio Awards


Simulation Best Practices for Rotating Machinery Design & Development


ExperienceIT NM 2022


Additive Updates in Ansys 2022 R2 - Webinar


Rocky Mountain Life Sciences Investor & Partnering Conference


Ansys Optics Simulation User Group Meeting - Virtual


Ansys Optics Simulation User Group Meeting


SI & PI Updates in Ansys 2022 R2 - Webinar


Simulation Best Practices for Developing Medical Devices - Webinar


Mechanical Updates in Ansys 2022 R2 - Webinar


Tucson after5 Tech Mixer: Ruda-Cardinal


Flagstaff Tech Tour, 2022


2022 CEO Leadership Retreat


2022 CEO Leadership Retreat


Thermal Integrity Updates in Ansys 2022 R1 - Webinar


Simulation Best Practices for the Pharmaceutical Industry - Webinar


NCMS Technology Showcase: Corpus Christi Army Depot


NCMS Technology Showcase: Corpus Christi Army Depot


Additive & Structural Optimization Updates in Ansys 2022 R1 - Webinar


Arizona AADM Conference, 2022


LS-DYNA Updates & Advancements in Ansys 2022 R1 - Webinar


Simulation Best Practices for Wind Turbine Design - Webinar


MAPDL Updates & Advancements in Ansys 2022 R1 - Webinar


Mechanical Updates in Ansys 2022 R1 - pt. 2 Webinar


Modelling liquid cryogenic rocket engines in Flownex - Webinar


SMR & Advanced Reactor 2022



SMR & Advanced Reactor 2022


RAPID + tct 2022


Venture Cafe Roundtable: AI & Healthcare


Tucson after5 Tech Mixer: World View


RAPID + tct 2022

More Info


Signal & Power Integrity Updates in Ansys 2022 R1 - Webinar


Simulation World 2022


RAPID + tct 2022


Experience Stratasys Manufacturing Virtual Event

Search in PADT site

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: