{"id":1543,"date":"2026-05-04T17:32:09","date_gmt":"2026-05-04T17:32:09","guid":{"rendered":"https:\/\/sites.wsagames.com\/yy8y24\/?p=1543"},"modified":"2026-05-14T00:13:34","modified_gmt":"2026-05-14T00:13:34","slug":"npc-animation","status":"publish","type":"post","link":"https:\/\/sites.wsagames.com\/yy8y24\/2026\/05\/04\/npc-animation\/","title":{"rendered":"NPC Animation"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>The video shows NPC animation:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-video alignwide\"><video height=\"1440\" style=\"aspect-ratio: 2416 \/ 1440;\" width=\"2416\" controls src=\"https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/Scopophobia-\u9884\u89c8-NetMode_-Standalone-0-\uff0864-bit_PC-D3D-SM6\uff09-2026-04-25-19-03-09.mp4\"><\/video><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>NPC Animation:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-gallery alignwide has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"612\" data-id=\"1537\" src=\"https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190225-1024x612.png\" alt=\"\" class=\"wp-image-1537\" srcset=\"https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190225-1024x612.png 1024w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190225-300x179.png 300w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190225-768x459.png 768w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190225-1536x918.png 1536w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190225-2048x1224.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"561\" data-id=\"1539\" src=\"https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190248-1024x561.png\" alt=\"\" class=\"wp-image-1539\" srcset=\"https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190248-1024x561.png 1024w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190248-300x164.png 300w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190248-768x420.png 768w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190248-1536x841.png 1536w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190248-2048x1121.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I obtained all the individual frames required for the NPC animations from Lee, ensuring that each frame had a transparent background. Lee created a total of five frames for each NPC, and I imported all five images into a folder named \u2018animation\u2019 within UE5.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, select five images and choose \u2018Create Sprite\u2019; the five images will then be converted from assets into sprites. Select the five sprites again and choose \u2018Create Flipbook\u2019; the images will automatically become an animation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The default frame rate for the animation is 15 frames, with each image representing one frame. As this default setting caused the NPC\u2019s walking animation to be too fast, I adjusted it to 14 frames, with each image representing two frames.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Blueprint of NPC animation:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"614\" src=\"https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190202-1-1024x614.png\" alt=\"\" class=\"wp-image-1552\" srcset=\"https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190202-1-1024x614.png 1024w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190202-1-300x180.png 300w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190202-1-768x460.png 768w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190202-1-1536x921.png 1536w, https:\/\/sites.wsagames.com\/yy8y24\/wp-content\/uploads\/sites\/65\/2026\/05\/\u5c4f\u5e55\u622a\u56fe-2026-04-25-190202-1-2048x1227.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Since all NPCs in the game share the same blueprint, if I were to set the NPC\u2019s appearance directly, all NPCs in the scene would have the same appearance. That is why I used a constructor script. My approach to the blueprint is as follows: first, I add a variable named \u2018Character Flip Book\u2019 with the variable type set to \u2018Flipbook\u2019. I then add a PaperFlipbook component. Next, within the constructor script, I set the FlipBook, retrieve the PaperFlipBook component and set it as the target. Finally, I retrieve the newly added variable and set it as the new FlipBook.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After applying this blueprint, I can click on an NPC in the scene to change its appearance directly in the Details panel, and the same blueprint can use different appearances.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Problems and Solutions\uff1a<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">NPC animations and the NPC tracking and patrol system are interconnected. When creating the NPC tracking and patrol system, I used the default character rig in UE5. Consequently, once the NPC animations were complete, I encountered an issue where the 2D animations did not align correctly with the 3D rig.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As the static mesh component cannot be deleted, I unchecked the \u2018Visible\u2019 option for the static mesh to hide it. Although the 2D animation and 3D model still exist simultaneously, the player can only see the 2D character.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The video shows NPC animation: NPC Animation: I obtained all the individual frames required for the NPC animations from Lee, ensuring that each frame had a transparent background. Lee created a total of five frames for each NPC, and I imported all five images into a folder named \u2018animation\u2019 within UE5. Next, select five images [&hellip;]<\/p>\n","protected":false},"author":56,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75,1],"tags":[],"class_list":["post-1543","post","type-post","status-publish","format-standard","hentry","category-development","category-year2"],"_links":{"self":[{"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/posts\/1543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/users\/56"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/comments?post=1543"}],"version-history":[{"count":10,"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/posts\/1543\/revisions"}],"predecessor-version":[{"id":1821,"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/posts\/1543\/revisions\/1821"}],"wp:attachment":[{"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/media?parent=1543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/categories?post=1543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sites.wsagames.com\/yy8y24\/wp-json\/wp\/v2\/tags?post=1543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}