Sandbox Logo
12 June 2023

Videos & Animated Images

We added support for mp4, webm, gif and animated webp.
We can now play mp4 and webm videos from either disk or URL. Sound can be played from a position in the world or locally.

Because the video is just a texture, they can be used anywhere a texture can be used - such as light cookies.

We can also render videos on UI panels with video controls.
Video decoding is done in background threads so you should be able to handle as many videos as you need.
We can render the videos in Qt widgets in the editor too.

UI Images can now load and display animated gif or webp files from either disk or URL. We're using this for Steam animated avatars.
This means that existing avatar images in games will use animated ones by default. This can be turned off by specifying the size of the avatar (avatarbig, avatarsmall)
Anything that accepts an image, like background-image, border-image, etc... all just work with videos and animated images.
background-image: url( 'cool.mp4' );
background-image: url( 'monkey.gif' );