I'm looking to improve the quality of exported animations (for which I'm limited to animated gifs for compatibility reasons), and the default export looks a bit unnatural/jittery. I'm wondering if there's a way to improve this. Potential ideas:
- Simple motion blur
- Temporal antialiasing
step = 10;
genPlot[i_] :=
Graphics[{Circle[{0, 0}, 1], Rotate[Line[{{-1, 0}, {1, 0}}], i]}];
images = Table[genPlot[angle], {angle, 0, Pi - Pi/step, Pi/step}];
Export["circle.gif", images, "AnimationRepetitions" -> Infinity,
"DisplayDurations" -> 1/50]
Animation frames can be rendered at any time granularity, but gif frame delays are multiple of 10ms, so 25/50 FPS is possible, but 30/60 is not. Most displays nowadays seem to have refresh rate of 60 Hertz, so using 1/50 delay you would expect a "freeze-frame" every 5 frames. On other hand, this video claims to be 50fps and looks smooth on my 60 Hz screen, so perhaps frame rate mismatch is not a significant contributor to jitter
Edit
simple blending makes it a bit better, but the line looks gray instead of black and the sector boundary looks clearly visible. Also 50x oversampling would be pretty expensive to compute for more general animations (ie, like this one)
radius = 50;
images2 =
Table[genPlot[angle], {angle, 0, Pi - Pi/(step*radius),
Pi/(step*radius)}];
images3 = Blend /@ Partition[images2, radius];
Export["circle2.gif", images3, "AnimationRepetitions" -> Infinity,
"DisplayDurations" -> 1/50]
Blend
to give more of a trailing effect. This might help darken up the line. Gamma correction viaImageAdjust[im, {0, 0, γ}]
might help with that too. $\endgroup$