{"id":15087,"date":"2018-04-16T15:05:30","date_gmt":"2018-04-16T15:05:30","guid":{"rendered":"https:\/\/coherent-labs.com\/?p=15087"},"modified":"2018-05-29T13:47:48","modified_gmt":"2018-05-29T13:47:48","slug":"how-to-use-after-effects-for-game-ui","status":"publish","type":"post","link":"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/","title":{"rendered":"How to use After Effects for Game UI"},"content":{"rendered":"<h2>How to use After Effects for Game UI<\/h2>\n<p><a href=\"https:\/\/adobe.com\/AfterEffects\" target=\"_blank\" rel=\"noopener\"><strong>Adobe After Effects<\/strong><\/a> is undoubtedly the world leading solution for Motion graphics and Special FX. From movies through television to game studios it is the go-to tool for a great range of tasks &#8211; keying, composing, tracking (to name a few). Furthermore it has a huge and very active community as well as a great ecosystem of third-party plugins.<\/p>\n<p>In this tutorial, I&#8217;ll show you how you can use After Effects to recreate the special FXs in the Mission select screen of our <strong>FPS Kit<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-15099 size-full\" src=\"https:\/\/coherent-labs.com\/wp-content\/uploads\/2018\/04\/mission.png\" alt=\"FPS UI Coherent Kits\" width=\"1920\" height=\"1080\" \/><\/p>\n<p>There are 3 Major steps:<\/p>\n<p><strong> 1. FX authoring<\/strong><br \/>\n<strong> 2. Assets export<\/strong><br \/>\n<strong> 3. CSS animations<\/strong><\/p>\n<p>Please note that this tutorial assumes that you are at least intermediate user of the Adobe After Effects. If you are new to the product I recommend you check out the <a href=\"https:\/\/helpx.adobe.com\/after-effects\/tutorials.html\" target=\"_blank\" rel=\"noopener\">official getting started tutorials<\/a> before continuing.<\/p>\n<h3>1. FX authoring<\/h3>\n<p>The first step is to create the actual effect. W\u0435&#8217;ll start with a png image with a transparent background which would give us the shape for the effect. One way to get it is to use auto-trace (Layer\/Auto-trace) which automatically takes the outline of the layer and creates a mask from it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-15110 size-full\" src=\"https:\/\/coherent-labs.com\/wp-content\/uploads\/2018\/04\/getMask2.png\" alt=\"UI FX authoring\" width=\"1168\" height=\"353\" \/><\/p>\n<p>Then you need to create a new solid layer and paste the mask. To copy the mask from layer to layer simply select the mask lane and press ctrl+c. Then select the other layer and press ctrl+v. (Tip: if you want to resize the mask you can activate the free transform from Layer\/Mask and Shape path\/Free transform points.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-15108 size-full\" src=\"https:\/\/coherent-labs.com\/wp-content\/uploads\/2018\/04\/copyMask-1.png\" alt=\"After Effects UI\" width=\"824\" height=\"361\" \/><\/p>\n<p>Now that we have the shape let&#8217;s add the actual effect. This could be done with the built-in tools of After Effects but it&#8217;s far easier with an awesome free plugin called <a href=\"http:\/\/www.videocopilot.net\/blog\/2016\/03\/new-plug-in-saber-now-available-100-free\/\" target=\"_blank\" rel=\"noopener\">Saber from videocopilot<\/a> &#8211;\u00a0 After you&#8217;ve installed it just search for it in the effects panel and drag and drop it to the solid layer.<\/p>\n<p><strong>Saber settings<\/strong> A few important settings that need to be specified in the Effect controls panel:<br \/>\n<strong>customize core<\/strong> &#8211; core type &#8211; Layer masks (this makes the effect follow the shape of the mask that we previously created)<br \/>\n<strong>composite setting<\/strong> &#8211; transparent (this makes the actual transparent background)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-15161 size-full\" src=\"https:\/\/coherent-labs.com\/wp-content\/uploads\/2018\/04\/saberSettings2.png\" alt=\"After Effects UI menu settings\" width=\"750\" height=\"979\" \/><\/p>\n<p>Then we can play with the rest of the settings to get the desired end effect. In this case, we are using the &#8220;energize&#8221; preset and animation of the Start offset setting. And here&#8217;s the finished effect!<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-15163 size-full\" src=\"https:\/\/coherent-labs.com\/wp-content\/uploads\/2018\/04\/5ad47a2b2be6e198851194.gif\" alt=\"FX user interface example\" width=\"750\" height=\"422\" \/><\/strong><\/p>\n<h3>2. Assets export<\/h3>\n<p>Once we have completed the effect we need to export it from After Effects. There are two major options &#8211; spritesheet or transparent video. The video is pretty straightforward (here&#8217;s a <a href=\"https:\/\/www.youtube.com\/watch?v=R3oprxGQwPM\" target=\"_blank\" rel=\"noopener\">tutorial<\/a> just in case) so we&#8217;ll focus on the spritesheet. Basically, we would want to create a flipbook animation through the spritesheet in which each of the sprites is a frame of the effect. To get that we can either export the frames as a series of pngs and arrange them in Photoshop or used an a plugin called <a href=\"https:\/\/aescripts.com\/sheetah-spritesheet-tools\/\" target=\"_blank\" rel=\"noopener\">sheetah<\/a>.<\/p>\n<p>In both cases, the end result should be something like that &#8211; a single image with rows\/columns of individual frames.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-15091\" src=\"https:\/\/coherent-labs.com\/wp-content\/uploads\/2018\/04\/sprite.png\" alt=\"FX assets export\" width=\"1166\" height=\"437\" \/><\/p>\n<h3>3. CSS animations<\/h3>\n<p>Now we just need to make the animation happen in the actual UI of the game. This part is typically carried out by UI developers but It&#8217;s actually quite simple. We can use the background-position CSS property to navigate along x\/y axis of the spritesheet. Then we just need to add a steps animations so that the animation &#8220;snaps&#8221; from one position to another in the spritesheet. The number of steps depends on the number of frames in the columns\/rows of the actual spritesheet.<\/p>\n<p>Here&#8217;s the complete CSS (btw the spritesheet is also responsive)<\/p>\n<pre class=\"lang:default decode:true\" title=\"spritesheetAnimation\">.element {\r\nwidth: 100%;\r\nheight: 100%;\r\nbackground-image: url(\"spritesheet.png\");\r\nbackground-size: 1200% 800%;\r\nanimation: playX 0.504s steps(12) infinite, playY 4.032s steps(8) infinite;\r\n}\r\n\r\n@keyframes playX {\r\n0% { background-position-x: 0%; }\r\n100% { background-position-x: -1200%; }\r\n}\r\n\r\n@keyframes playY {\r\n0% { background-position-y: 0%; }\r\n100% { background-position-y: -800%; }\r\n}<\/pre>\n<p>I hope you enjoyed this tutorial and you&#8217;ll use it to create a bunch of awesome special FX for you games! Tag us on <a href=\"https:\/\/twitter.com\/CoherentLabs\">Twitter<\/a> so we can see your work or if y\u043eu just want to chat!<\/p>\n<p>Hristo<\/p>\n<p><iframe loading=\"lazy\" width=\"750\" height=\"480\" src=\"https:\/\/www.youtube.com\/embed\/fZBBZGhuw2g\" frameborder=\"0\" allow=\"autoplay; encrypted-media\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to use After Effects for Game UI Adobe After Effects is undoubtedly the world leading solution for Motion graphics and Special FX. From movies through television to game studios it is the go-to tool for a great range of tasks &#8211; keying, composing, tracking (to name a few). Furthermore it has a huge and [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":13651,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[406,1],"tags":[421,357,229,256],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use After Effects for game UI - Coherent Labs tutorial<\/title>\n<meta name=\"description\" content=\"Quick tutorial about enhancing your game UI with After Effects, going through FX authoring, exporting the assets and creating CSS animations.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use After Effects for game UI - Coherent Labs tutorial\" \/>\n<meta property=\"og:description\" content=\"Quick tutorial about enhancing your game UI with After Effects, going through FX authoring, exporting the assets and creating CSS animations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/\" \/>\n<meta property=\"og:site_name\" content=\"Coherent Labs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/CoherentLabs\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-04-16T15:05:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-05-29T13:47:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/coherent-labs.com\/posts\/wp-content\/uploads\/2017\/11\/tutoriarts-748-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"748\" \/>\n\t<meta property=\"og:image:height\" content=\"280\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Alexandra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CoherentLabs\" \/>\n<meta name=\"twitter:site\" content=\"@CoherentLabs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alexandra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/\",\"url\":\"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/\",\"name\":\"How to use After Effects for game UI - Coherent Labs tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/coherent-labs.com\/posts\/#website\"},\"datePublished\":\"2018-04-16T15:05:30+00:00\",\"dateModified\":\"2018-05-29T13:47:48+00:00\",\"author\":{\"@id\":\"https:\/\/coherent-labs.com\/posts\/#\/schema\/person\/b0252689790c3d1c9036209533d03791\"},\"description\":\"Quick tutorial about enhancing your game UI with After Effects, going through FX authoring, exporting the assets and creating CSS animations.\",\"breadcrumb\":{\"@id\":\"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/coherent-labs.com\/posts\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use After Effects for Game UI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/coherent-labs.com\/posts\/#website\",\"url\":\"https:\/\/coherent-labs.com\/posts\/\",\"name\":\"Coherent Labs\",\"description\":\"Cross-Platform Game UI Middleware\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/coherent-labs.com\/posts\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/coherent-labs.com\/posts\/#\/schema\/person\/b0252689790c3d1c9036209533d03791\",\"name\":\"Alexandra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/coherent-labs.com\/posts\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/687476ba742eac5c6da76b305bc4004b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/687476ba742eac5c6da76b305bc4004b?s=96&d=mm&r=g\",\"caption\":\"Alexandra\"},\"url\":\"https:\/\/coherent-labs.com\/posts\/author\/alexandra\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use After Effects for game UI - Coherent Labs tutorial","description":"Quick tutorial about enhancing your game UI with After Effects, going through FX authoring, exporting the assets and creating CSS animations.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/","og_locale":"en_US","og_type":"article","og_title":"How to use After Effects for game UI - Coherent Labs tutorial","og_description":"Quick tutorial about enhancing your game UI with After Effects, going through FX authoring, exporting the assets and creating CSS animations.","og_url":"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/","og_site_name":"Coherent Labs","article_publisher":"https:\/\/www.facebook.com\/CoherentLabs\/","article_published_time":"2018-04-16T15:05:30+00:00","article_modified_time":"2018-05-29T13:47:48+00:00","og_image":[{"width":"748","height":"280","url":"https:\/\/coherent-labs.com\/posts\/wp-content\/uploads\/2017\/11\/tutoriarts-748-1.png","type":"image\/png"}],"author":"Alexandra","twitter_card":"summary_large_image","twitter_creator":"@CoherentLabs","twitter_site":"@CoherentLabs","twitter_misc":{"Written by":"Alexandra","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/","url":"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/","name":"How to use After Effects for game UI - Coherent Labs tutorial","isPartOf":{"@id":"https:\/\/coherent-labs.com\/posts\/#website"},"datePublished":"2018-04-16T15:05:30+00:00","dateModified":"2018-05-29T13:47:48+00:00","author":{"@id":"https:\/\/coherent-labs.com\/posts\/#\/schema\/person\/b0252689790c3d1c9036209533d03791"},"description":"Quick tutorial about enhancing your game UI with After Effects, going through FX authoring, exporting the assets and creating CSS animations.","breadcrumb":{"@id":"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/coherent-labs.com\/posts\/how-to-use-after-effects-for-game-ui\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/coherent-labs.com\/posts\/"},{"@type":"ListItem","position":2,"name":"How to use After Effects for Game UI"}]},{"@type":"WebSite","@id":"https:\/\/coherent-labs.com\/posts\/#website","url":"https:\/\/coherent-labs.com\/posts\/","name":"Coherent Labs","description":"Cross-Platform Game UI Middleware","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/coherent-labs.com\/posts\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/coherent-labs.com\/posts\/#\/schema\/person\/b0252689790c3d1c9036209533d03791","name":"Alexandra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/coherent-labs.com\/posts\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/687476ba742eac5c6da76b305bc4004b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/687476ba742eac5c6da76b305bc4004b?s=96&d=mm&r=g","caption":"Alexandra"},"url":"https:\/\/coherent-labs.com\/posts\/author\/alexandra\/"}]}},"_links":{"self":[{"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/posts\/15087"}],"collection":[{"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/comments?post=15087"}],"version-history":[{"count":33,"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/posts\/15087\/revisions"}],"predecessor-version":[{"id":15445,"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/posts\/15087\/revisions\/15445"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/media\/13651"}],"wp:attachment":[{"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/media?parent=15087"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/categories?post=15087"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/coherent-labs.com\/posts\/wp-json\/wp\/v2\/tags?post=15087"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}