Forum Navigation
You need to log in to create posts and topics.

Gif Quality


I'm trying to make a gif out of an animation and when I do so the quality of the lighting and resolution pales in comparison to either the MP4 or making several individual high res images and using an outside software like ImageJ to stitch them together as a gif. Is this intentional or something that can possibly be improved? Attached are examples of a PNG and gif created using the Tachyon renderer as well as the PDB movies I'm using as input.

Thank you!!

Micah Welsch

University of Kansas

Uploaded files:

Hi Micah,

I agree, the animated GIFs that OVITO produces are far from optimal. Currently, GIFs are produced by the same video encoding pipeline also used for MP4, AVI, etc. videos by OVITO. It is based on the Libav/FFMPEG libraries. My understanding is that Libav uses a fixed palette of 256 discrete colors when encoding the full color-range input images it gets from OVITO  into the output GIF. This is why color gradients get completely messed up in the result.

You are right, in principle it should be possible to do better. Other tools, which are specialized in image processing, can produce much better looking GIFs from the same source image frames. I will do some research to see if we can integrate similar capabilities directly into OVITO. But that is going to take some time. For the time being, you are better off with doing the encoding externally. The built-in GIF encoder is only good for simple images containing only few colors, e.g. flat-shaded 2d particles.



I now found some time to work on the video encoding engine of OVITO. The new development build 3.0.0-dev597 should generate animated GIFs of much better quality. Please give it a try.