{"id":91,"date":"2024-09-27T12:00:00","date_gmt":"2024-09-27T12:00:00","guid":{"rendered":"https:\/\/unity3dperformance.com\/?p=91"},"modified":"2024-09-29T18:33:05","modified_gmt":"2024-09-29T18:33:05","slug":"vertex-animation-optimization-unity3d","status":"publish","type":"post","link":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/","title":{"rendered":"How to Optimize Animations in Unity3D \u2013 Using Vertex Animation for Better Performance"},"content":{"rendered":"\n<p class=\"has-medium-font-size wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Introduction<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Game performance<\/strong> in Unity3D greatly depends on how efficiently we manage resources and animations. Vertex Animation is a technique that allows offloading the animation processing to the graphics card (GPU), which reduces CPU usage. This technique is especially useful when dealing with a large number of animated characters on the screen, such as crowds. By utilizing Vertex Animation, CPU usage decreases, and the overall game performance improves significantly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is Vertex Animation?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Vertex Animation<\/strong> is a technique where character movements are stored as changes in vertex positions (vertices) directly on the GPU. Unlike traditional skeletal animations, which are processed on the CPU, Vertex Animation allows the GPU to handle the animation processing. This method provides smoother game performance, particularly in scenes with many animated characters. It\u2019s an efficient way to reduce CPU usage, making it a great option for optimizing animations in Unity3D.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why is Vertex Animation Important?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In large-scale Unity3D projects with many characters animated in real-time, traditional animation techniques can overload the CPU, leading to performance drops. Vertex Animation shifts this load to the GPU, significantly improving game performance, especially when animating hundreds or even thousands of characters simultaneously. Reducing CPU usage results in higher frame rates (FPS) and a better overall gaming experience.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Challenges with Traditional Animations in Large Scenes<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Standard animation for Humanoid characters in Unity3D can be demanding on the CPU, especially when animating large numbers of characters. Each frame of animation requires the CPU to calculate the skeletal positions of each character, which can consume a lot of processing power. In scenes with 1000 animated characters, this issue becomes even more apparent, causing noticeable performance degradation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How to Optimize Animations Using Vertex Animation<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To optimize character animations in Unity3D, we can use the <strong>AnimMap Baker For Animated Characters<\/strong> tool, which generates animation texture maps (animation maps) and transfers the entire animation process to the GPU. This tool is available for free on <a href=\"https:\/\/github.com\/chenjd\/Render-Crowd-Of-Animated-Characters\">GitHub<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Steps to Optimize Animations:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Download the Tool<\/strong><br>Download <strong>AnimMap Baker For Animated Characters<\/strong> from GitHub, where you\u2019ll find the necessary files and documentation.<\/li>\n\n\n\n<li><strong>Convert Animations to Vertex Animation<\/strong><br>After installing the tool, use it to generate animation texture maps for Humanoid characters. The tool will automatically create animation textures that are processed on the GPU, relieving the CPU of the animation workload.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Scene Before Optimization: Traditional Animation<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this scene, 1000 Humanoid characters are animated using the standard skeletal animation technique. All animations are processed by the CPU, which results in high processor usage and lower frame rates. Below is a screenshot showing the scene with 1000 animated characters, illustrating the performance challenges associated with traditional animation methods.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Screenshot_19700107-135414-1024x576.jpg\" alt=\"\"\/><figcaption class=\"wp-element-caption\">A visual representation of 1000 animated characters in the scene before optimization<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Below is the profiler data showing CPU usage and frame rates before optimization<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Humanoid-1024x536.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Profiler screenshot illustrating CPU usage and performance metrics before implementing Vertex Animation.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Scene After Optimization: Vertex Animation<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After applying Vertex Animation, the animations of 1000 characters are processed on the GPU. CPU load is significantly reduced, and the frame rate increases, resulting in smoother gameplay.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Below is the profiler data showing CPU usage and frame rates after optimization:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/VTS-1024x536.png\" alt=\"\"\/><figcaption class=\"wp-element-caption\">Profiler screenshot illustrating CPU usage and performance metrics after implementing Vertex Animation.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Using Vertex Animation in Unity3D is an effective way to optimize the animation of large numbers of characters. By offloading animation processing to the GPU, CPU load is greatly reduced, leading to better game performance. The <strong>AnimMap Baker For Animated Characters<\/strong> tool simplifies the process, allowing developers to efficiently optimize even the most complex scenes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Game performance in Unity3D greatly depends on how efficiently we manage resources and animations. Vertex Animation is a technique that allows offloading the animation processing to the graphics card (GPU), which reduces CPU usage. This technique is especially useful when dealing with a large number of animated characters on the screen, such as crowds. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[20,12,14,18,16,21],"class_list":["post-91","post","type-post","status-publish","format-standard","hentry","category-unity-optimization","tag-animation-optimization","tag-gpuperformance","tag-renderingperformance","tag-unity-optimization","tag-unity-rendering-tips","tag-vertex-animation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Optimize Animations in Unity3D \u2013 Using Vertex Animation for Better Performance - Unity3D Performance Blog<\/title>\n<meta name=\"description\" content=\"Discover how to optimize animations in Unity3D using Vertex Animation. Learn techniques to reduce CPU load and improve game performance, especially when dealing with large numbers of animated characters.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Optimize Animations in Unity3D \u2013 Using Vertex Animation for Better Performance - Unity3D Performance Blog\" \/>\n<meta property=\"og:description\" content=\"Discover how to optimize animations in Unity3D using Vertex Animation. Learn techniques to reduce CPU load and improve game performance, especially when dealing with large numbers of animated characters.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/\" \/>\n<meta property=\"og:site_name\" content=\"Unity3D Performance Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-27T12:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-29T18:33:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Screenshot_19700107-135414-1024x576.jpg\" \/>\n<meta name=\"author\" content=\"Rufi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rufi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/\",\"url\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/\",\"name\":\"How to Optimize Animations in Unity3D \u2013 Using Vertex Animation for Better Performance - Unity3D Performance Blog\",\"isPartOf\":{\"@id\":\"https:\/\/unity3dperformance.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Screenshot_19700107-135414-1024x576.jpg\",\"datePublished\":\"2024-09-27T12:00:00+00:00\",\"dateModified\":\"2024-09-29T18:33:05+00:00\",\"author\":{\"@id\":\"https:\/\/unity3dperformance.com\/#\/schema\/person\/1296fd7575f681c85a3afc18bf973b0c\"},\"description\":\"Discover how to optimize animations in Unity3D using Vertex Animation. Learn techniques to reduce CPU load and improve game performance, especially when dealing with large numbers of animated characters.\",\"breadcrumb\":{\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#primaryimage\",\"url\":\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Screenshot_19700107-135414-1024x576.jpg\",\"contentUrl\":\"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Screenshot_19700107-135414-1024x576.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/unity3dperformance.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Optimize Animations in Unity3D with Vertex Animation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unity3dperformance.com\/#website\",\"url\":\"https:\/\/unity3dperformance.com\/\",\"name\":\"Unity3D Performance Blog\",\"description\":\"Discover tips and techniques to optimize your Unity3D projects for better performance and efficiency.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unity3dperformance.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/unity3dperformance.com\/#\/schema\/person\/1296fd7575f681c85a3afc18bf973b0c\",\"name\":\"Rufi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/unity3dperformance.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3f1f6db23df2ef8fe5ff6875fbab10a67f1fcfef48afa45d5c00ed04d0ccf792?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3f1f6db23df2ef8fe5ff6875fbab10a67f1fcfef48afa45d5c00ed04d0ccf792?s=96&d=mm&r=g\",\"caption\":\"Rufi\"},\"sameAs\":[\"http:\/\/unity3dperformance.com\"],\"url\":\"https:\/\/unity3dperformance.com\/index.php\/author\/admin2826\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Optimize Animations in Unity3D \u2013 Using Vertex Animation for Better Performance - Unity3D Performance Blog","description":"Discover how to optimize animations in Unity3D using Vertex Animation. Learn techniques to reduce CPU load and improve game performance, especially when dealing with large numbers of animated characters.","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:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/","og_locale":"en_US","og_type":"article","og_title":"How to Optimize Animations in Unity3D \u2013 Using Vertex Animation for Better Performance - Unity3D Performance Blog","og_description":"Discover how to optimize animations in Unity3D using Vertex Animation. Learn techniques to reduce CPU load and improve game performance, especially when dealing with large numbers of animated characters.","og_url":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/","og_site_name":"Unity3D Performance Blog","article_published_time":"2024-09-27T12:00:00+00:00","article_modified_time":"2024-09-29T18:33:05+00:00","og_image":[{"url":"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Screenshot_19700107-135414-1024x576.jpg"}],"author":"Rufi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rufi","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/","url":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/","name":"How to Optimize Animations in Unity3D \u2013 Using Vertex Animation for Better Performance - Unity3D Performance Blog","isPartOf":{"@id":"https:\/\/unity3dperformance.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#primaryimage"},"image":{"@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#primaryimage"},"thumbnailUrl":"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Screenshot_19700107-135414-1024x576.jpg","datePublished":"2024-09-27T12:00:00+00:00","dateModified":"2024-09-29T18:33:05+00:00","author":{"@id":"https:\/\/unity3dperformance.com\/#\/schema\/person\/1296fd7575f681c85a3afc18bf973b0c"},"description":"Discover how to optimize animations in Unity3D using Vertex Animation. Learn techniques to reduce CPU load and improve game performance, especially when dealing with large numbers of animated characters.","breadcrumb":{"@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#primaryimage","url":"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Screenshot_19700107-135414-1024x576.jpg","contentUrl":"https:\/\/unity3dperformance.com\/wp-content\/uploads\/2024\/09\/Screenshot_19700107-135414-1024x576.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/unity3dperformance.com\/index.php\/2024\/09\/27\/vertex-animation-optimization-unity3d\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/unity3dperformance.com\/"},{"@type":"ListItem","position":2,"name":"Optimize Animations in Unity3D with Vertex Animation"}]},{"@type":"WebSite","@id":"https:\/\/unity3dperformance.com\/#website","url":"https:\/\/unity3dperformance.com\/","name":"Unity3D Performance Blog","description":"Discover tips and techniques to optimize your Unity3D projects for better performance and efficiency.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unity3dperformance.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/unity3dperformance.com\/#\/schema\/person\/1296fd7575f681c85a3afc18bf973b0c","name":"Rufi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/unity3dperformance.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3f1f6db23df2ef8fe5ff6875fbab10a67f1fcfef48afa45d5c00ed04d0ccf792?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f1f6db23df2ef8fe5ff6875fbab10a67f1fcfef48afa45d5c00ed04d0ccf792?s=96&d=mm&r=g","caption":"Rufi"},"sameAs":["http:\/\/unity3dperformance.com"],"url":"https:\/\/unity3dperformance.com\/index.php\/author\/admin2826\/"}]}},"_links":{"self":[{"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/posts\/91","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":17,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"predecessor-version":[{"id":206,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/posts\/91\/revisions\/206"}],"wp:attachment":[{"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unity3dperformance.com\/index.php\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}