Animated pre-rendered graphics in JUCE app

What’s the best way to take rendered animated graphics from my animator and displaying them in my JUCE application? Think for example of a tutorial screen that’s showing some basic animations in a loop.

I’ve seen some posts here on the forum, but nothing with a solution (or just unanswered).

My first thought is just to make them export each frame of the animation as an SVG image, and just render the frames in JUCE myself. Another idea is to use GIFs or some other format like that, but I’m unsure about how to render those in JUCE.

I’m aware of the JUCE VideoComponent to play video files, but I’m unsure if this is exactly what I want (there’s just the option of loading the video from a file).

If there’s a lightweight (properly licensed) third-party library that does the trick, I’m willing to look into that.

Check out https://youtu.be/_rU9Zn7zo4c. Great explanation how to use gifs and these repos have examples.
https://github.com/hautetechnique/Juce-AnimatedGif and https://github.com/Mrugalla/GIFLoad.

There is also rLottie https://forum.juce.com/t/rlottie-wrapper/35652

1 Like

Thanks! I stumbled upon that YouTube video yesterday and was able to get his code running in my app.

However, I opted to use gif_load instead (at least to get ourselves off the ground). I cooked up my own simple version of an animated gif JUCE component.

I might check out the Lottie wrapper for future development, that looks super interesting!

1 Like