{"id":8472,"date":"2013-05-14T10:04:00","date_gmt":"2013-05-14T09:04:00","guid":{"rendered":"http:\/\/www.keris-studio.fr\/blog\/?p=8472"},"modified":"2015-05-14T10:13:00","modified_gmt":"2015-05-14T09:13:00","slug":"unity-3d-movie-textures","status":"publish","type":"post","link":"https:\/\/www.keris-studio.fr\/blog\/?p=8472","title":{"rendered":"Unity 3D &ndash; Movie textures"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image00257.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"clip_image002\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image002_thumb54.jpg\" alt=\"clip_image002\" width=\"607\" height=\"278\" border=\"0\" \/><\/a><\/p>\n<p>Unity est capable de jouer des textures anim\u00e9es aux formats MOV, AVI, MPG4 et bien d\u2019autres. Cela permet, outre de simuler des projections, d\u2019acc\u00e9der \u00e0 des effets complexes, comme le miroitement de l\u2019eau, des arri\u00e8res plans anim\u00e9s, des nuages parcourant le ciel, etc\u2026<\/p>\n<p>Pour cela il faut :<\/p>\n<p>Importer une animation :<\/p>\n<p><a href=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image0034.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"clip_image003\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image003_thumb4.png\" alt=\"clip_image003\" width=\"94\" height=\"23\" border=\"0\" \/><\/a>. L\u2019animation s\u2019affiche dans l\u2019Inspector comme les autres textures ou objets.<\/p>\n<p>Avec une information compl\u00e9mentaire :<\/p>\n<p><a href=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image0045.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"clip_image004\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image004_thumb4.png\" alt=\"clip_image004\" width=\"374\" height=\"90\" border=\"0\" \/><\/a><\/p>\n<p>Il faudra donc \u00e9crire le script en fonction.<\/p>\n<p>Le script Java va ressembler \u00e0 cela :<\/p>\n<blockquote><p>var movieTexture : MovieTexture;<\/p>\n<p>function Start() {<\/p>\n<p>movieTexture.loop = true;<\/p>\n<p>renderer.material.mainTexture = movieTexture;<\/p>\n<p>movieTexture.Play ();<\/p>\n<p>}<\/p><\/blockquote>\n<p>Il ne reste qu\u2019\u00e0 l\u2019appliquer sur l\u2019objet comme une texture et appliquer \u00e9galement le script \u00e0 cet objet :<\/p>\n<p><a href=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image0058.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"clip_image005\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image005_thumb6.png\" alt=\"clip_image005\" width=\"368\" height=\"363\" border=\"0\" \/><\/a><\/p>\n<p>A la variable Movie Texture, faire un glisser d\u00e9poser du vid\u00e9oclip.<\/p>\n<p>C\u2019est tout.<\/p>\n<p><a href=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image00715.jpg\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-width: 0px;\" title=\"clip_image007\" src=\"https:\/\/www.keris-studio.fr\/blog\/wp-content\/clip_image007_thumb13.jpg\" alt=\"clip_image007\" width=\"630\" height=\"355\" border=\"0\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Unity est capable de jouer des textures anim\u00e9es aux formats MOV, AVI, MPG4 et bien d\u2019autres. Cela permet, outre de simuler des projections, d\u2019acc\u00e9der \u00e0 des effets complexes, comme le miroitement de l\u2019eau, des arri\u00e8res plans anim\u00e9s, des nuages parcourant le ciel, etc\u2026 Pour cela il faut : Importer une animation : . L\u2019animation &hellip; <a href=\"https:\/\/www.keris-studio.fr\/blog\/?p=8472\" class=\"more-link\">Continuer la lecture de <span class=\"screen-reader-text\">Unity 3D &ndash; Movie textures<\/span>  <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,205],"tags":[140],"class_list":["post-8472","post","type-post","status-publish","format-standard","hentry","category-3d","category-unity-2","tag-unity"],"_links":{"self":[{"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8472"}],"version-history":[{"count":2,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8472\/revisions"}],"predecessor-version":[{"id":8521,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=\/wp\/v2\/posts\/8472\/revisions\/8521"}],"wp:attachment":[{"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.keris-studio.fr\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}