{"id":5768,"date":"2025-01-06T18:26:27","date_gmt":"2025-01-06T09:26:27","guid":{"rendered":"https:\/\/blog.criware.com\/?p=5768"},"modified":"2025-08-06T17:34:36","modified_gmt":"2025-08-06T08:34:36","slug":"video-playback-on-meshes-with-sofdec","status":"publish","type":"post","link":"https:\/\/blog.criware.com\/index.php\/2025\/01\/06\/video-playback-on-meshes-with-sofdec\/","title":{"rendered":"Video playback on meshes with Sofdec"},"content":{"rendered":"<p>One interesting playback option of <a href=\"https:\/\/www.criware.com\/en\/products\/sofdec2.html\">Sofdec<\/a> &#8211; that is not included in Unity&#8217;s standard features &#8211; 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!<\/p>\n<p>For this post, we created a Unity demo in which a video with transparency &#8211; learn more about alpha movies in <a href=\"https:\/\/blog.criware.com\/index.php\/2022\/11\/18\/video-with-alpha-channel-in-sofdec2\/\">this post<\/a> &#8211; 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.<\/p>\n<div style=\"max-width: 700px; margin: 0 auto;\">\n<div style=\"width: 800px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-5768-1\" width=\"800\" height=\"450\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/video-on-the-mesh.mp4?_=1\" \/><a href=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/video-on-the-mesh.mp4\">https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/video-on-the-mesh.mp4<\/a><\/video><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<h1 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">Step 1: Creating the video file<\/h1>\n<p>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.<\/p>\n<p style=\"\n    display: block;\n    max-width: 950px;\n    margin: 0 auto;\n\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5770\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/Aftereffects.png\" alt=\"\" width=\"1920\" height=\"1020\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/Aftereffects.png 1920w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/Aftereffects-300x159.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/Aftereffects-1024x544.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/Aftereffects-768x408.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/Aftereffects-1536x816.png 1536w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<h1 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">Step 2: \u00a0Creating the projection surface<\/h1>\n<p>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.<\/p>\n<p style=\"\n    display: block;\n    max-width: 950px;\n    margin: 0 auto;\n\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5772\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/blender-curve-wall.png\" alt=\"\" width=\"1575\" height=\"797\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/blender-curve-wall.png 1575w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/blender-curve-wall-300x152.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/blender-curve-wall-1024x518.png 1024w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/blender-curve-wall-768x389.png 768w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/blender-curve-wall-1536x777.png 1536w\" sizes=\"auto, (max-width: 1575px) 100vw, 1575px\" \/>\n<\/p>\n<h1 style=\"font-size: 150%; font-weight: bold; margin-top: 40px;\">Step 3:\u00a0 Playback in Unity<\/h1>\n<p>We created a Sphere object in Unity and imported the curved wall we designed in Blender, then attached a <em>CRIManaMovieController<\/em> to them. We set the Movie Path to the name of the .usm video file placed in the <em>StreamingAssets<\/em> folder. By checking the \u201cPlay On Start\u201d option, the video will be projected on both the sphere and the curved wall when the game starts!<\/p>\n<p style=\"\n    display: block;\n    max-width: 950px;\n    margin: 0 auto;\n\"><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5771\" src=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/attach-script.png\" alt=\"\" width=\"937\" height=\"351\" srcset=\"https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/attach-script.png 937w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/attach-script-300x112.png 300w, https:\/\/blog.criware.com\/wp-content\/uploads\/2025\/01\/attach-script-768x288.png 768w\" sizes=\"auto, (max-width: 937px) 100vw, 937px\" \/>\n<\/p>\n<p>&nbsp;<\/p>\n<p>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 <a href=\"https:\/\/krs.bz\/cri-mw\/m\/en_trycriware\">here<\/a>!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One interesting playback option of Sofdec &#8211; that is not included in Unity&#8217;s standard features &#8211; is the ability to<\/p>\n","protected":false},"author":2,"featured_media":5781,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[6,7,23],"tags":[],"class_list":["post-5768","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sofdec","category-tutorials","category-unity"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/5768","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/comments?post=5768"}],"version-history":[{"count":6,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/5768\/revisions"}],"predecessor-version":[{"id":5780,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/posts\/5768\/revisions\/5780"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media\/5781"}],"wp:attachment":[{"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/media?parent=5768"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/categories?post=5768"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.criware.com\/index.php\/wp-json\/wp\/v2\/tags?post=5768"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}