SofdecTutorials

Video playback on meshes with Sofdec

One interesting playback option of Sofdec – that is not included in Unity’s standard features – is the ability to render movies on object meshes. Indeed, with Sofdec, the movie can be drawn on a Unity object, even if it has a curved surface!

For this post, we created a Unity demo in which a video with transparency – learn more about alpha movies in this post – is projected onto a sphere and a curved wall. This feature of Sofdec makes it straightforward to implement 3D scenes that look like riveting digital installations.

 

Step 1: Creating the video file

First, we prepared an alpha movie (i.e., semi-transparent) in AfterEffects (you can of course use other video editing tools). We then imported it into the Sofdec Encoding Wizard and generated the .usm file that will be used by the Sofdec runtime.

Step 2:  Creating the projection surface

In Blender, we created a mesh with a curved surface. We made sure to UV map it based on the side we want to project the video onto.


Step 3:  Playback in Unity

We created a Sphere object in Unity and imported the curved wall we designed in Blender, then attached a CRIManaMovieController to them. We set the Movie Path to the name of the .usm video file placed in the StreamingAssets folder. By checking the “Play On Start” option, the video will be projected on both the sphere and the curved wall when the game starts!


 

By using Sofdec unique ability to play alpha movies and to render them on any curved surface, many creative usages of video in games become possible: VJ-like displays of a live performance, hologram-like effects, rendering of environmental backgrounds inside a spherical dome, and more! Get your free Sofdec trial here!