{"id":1130,"date":"2023-08-13T16:58:30","date_gmt":"2023-08-13T07:58:30","guid":{"rendered":"https:\/\/heyyocg.link\/?p=1130"},"modified":"2023-08-13T18:00:48","modified_gmt":"2023-08-13T09:00:48","slug":"niagara-easy-soft-body-simulation-skeletalmesh","status":"publish","type":"post","link":"https:\/\/heyyocg.link\/en\/niagara-easy-soft-body-simulation-skeletalmesh\/","title":{"rendered":"Easy(Fake) Soft Body Simulation on Animated Skeletal Mesh"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>The following article, previously explained, deformed Static Mesh.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-wp-embed is-provider-heyyo-cg wp-block-embed-heyyo-cg\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"aKqmpJ5YYS\"><a href=\"https:\/\/heyyocg.link\/en\/niagara-easy-soft-body-simulation\/\">Easy(Fake) Soft Body Simulation with Niagara<\/a><\/blockquote><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Easy(Fake) Soft Body Simulation with Niagara&#8221; &#8212; HeyYo CG\" src=\"https:\/\/heyyocg.link\/en\/niagara-easy-soft-body-simulation\/embed\/#?secret=DeoNsd5ooV#?secret=aKqmpJ5YYS\" data-secret=\"aKqmpJ5YYS\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>In this article, I will explain how to run a fake soft body simulation on a Skeletal Mesh that is being animated. But the mechanism itself is the same as with Static Mesh, so I will focus on the additional implementation for Skeletal Mesh.<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">Now, Fake Soft Body Simulation can be used on Animated Skeletal Mesh \ud83d\ude42<br>Tutorial and Sample data will come soon! <a href=\"https:\/\/t.co\/mbCorEVKZG\">pic.twitter.com\/mbCorEVKZG<\/a><\/p>&mdash; HeyYo (@yo_hanashima) <a href=\"https:\/\/twitter.com\/yo_hanashima\/status\/1690369804765675520?ref_src=twsrc%5Etfw\">August 12, 2023<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n\n\n\n<p>Also, sample data implementing what is explained here is provided below, so if you want actual working data right away, please check it out.<\/p>\n\n\n\n<p><a href=\"https:\/\/heyyohanashima.gumroad.com\/l\/gmgmhl\">https:\/\/heyyohanashima.gumroad.com\/l\/gmgmhl<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Version<\/h2>\n\n\n\n<p>Unreal Engine 5.2.0<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-tumblr wp-block-embed-tumblr\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"tumblr-post\" data-href=\"https:\/\/embed.tumblr.com\/embed\/post\/t:Wt2f57sbKSpD4ugagx9j8g\/725417787287273472\/v2\" data-did=\"5157e9faea4d60f6c9af4176ad1a882240331d8b\"  ><a href=\"https:\/\/www.tumblr.com\/yooo19\/725417787287273472\/fake-softbody-simulation-with-skeletal-mesh\">https:\/\/www.tumblr.com\/yooo19\/725417787287273472\/fake-softbody-simulation-with-skeletal-mesh<\/a><\/div><script async src=\"https:\/\/assets.tumblr.com\/post.js?_v=38df9a6ca7436e6ca1b851b0543b9f51\"><\/script>\n<\/div><\/figure>\n\n\n\n<p>This article will explain the implementation of fake soft body simulation on an animated skeletal mesh like the deforming running Greyman as shown in the video above.<\/p>\n\n\n\n<p>The only major difference from Static Mesh implementation is that the vertices of the Skeletal Mesh need to be sampled every frame, and then the settings can be adjusted accordingly.<\/p>\n\n\n\n<p>Also, the red circle in the second half of the video is the pivot point (starting point of the constraint) when calculating the Fake Soft Body Simulation. <\/p>\n\n\n\n<p>You can see that as the pivot point changes, the deformation changes as well. I will explain this too in this article (by the way, the pivot point can be freely adjusted even in Static Mesh).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Preparation<\/h2>\n\n\n\n<p>The first important thing to do is to make sure that the UVs do not overlap.<\/p>\n\n\n\n<p>Greyman&#8217;s default UVs do overlap as follows.<\/p>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img fetchpriority=\"high\" decoding=\"async\" width=\"298\" height=\"300\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqqwdqwdqfqw-298x300.jpg\" alt=\"\" class=\"wp-image-1099\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqqwdqwdqfqw-298x300.jpg 298w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqqwdqwdqfqw-150x150.jpg 150w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqqwdqwdqfqw.jpg 673w\" sizes=\"(max-width: 298px) 100vw, 298px\" \/><\/figure>\n\n\n\n<p>In that case, you can reapply the UVs in any DCC tool (you could also put them in other uv channel like UV1), or you can try using UE&#8217;s UV Editor for ease.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"759\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/gdgdgrew-1-1024x759.jpg\" alt=\"\" class=\"wp-image-1101\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/gdgdgrew-1-1024x759.jpg 1024w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/gdgdgrew-1-300x222.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/gdgdgrew-1-768x569.jpg 768w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/gdgdgrew-1.jpg 1113w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">There are several functions that automatically adjust the UVs, and in this case, the Layout function was used to avoid overlap.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Sampling the Skeletal Mesh vertices in every frame<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"253\" height=\"709\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wdqqfqqqq-2.jpg\" alt=\"\" class=\"wp-image-1105\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wdqqfqqqq-2.jpg 253w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wdqqfqqqq-2-107x300.jpg 107w\" sizes=\"(max-width: 253px) 100vw, 253px\" \/><\/figure>\n\n\n\n<p>First, to sample the vertices of the Skeletal Mesh, use the Skeletal Mesh Location module.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-105320-1.jpg\" alt=\"\" class=\"wp-image-1106\" style=\"width:600px;height:524px\" width=\"600\" height=\"524\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-105320-1.jpg 801w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-105320-1-300x262.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-105320-1-768x670.jpg 768w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>Put any skeletal mesh in the Preview Mesh and set the items under Sampling as shown in the image above.<\/p>\n\n\n\n<p>(If you wish to use a UV other than UV0 for subsequent writing to the Render Texture, set the Sampled UV Index to the corresponding number of your UV index)<\/p>\n\n\n\n<p>Here, the Index parameter set for Vertex ID is a parameter that I created myself to store the Execution Index.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"379\" height=\"26\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wef.jpg\" alt=\"\" class=\"wp-image-1107\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wef.jpg 379w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wef-300x21.jpg 300w\" sizes=\"(max-width: 379px) 100vw, 379px\" \/><\/figure>\n\n\n\n<p>The reason why this parameter is created is that when Return Exec Index is used in Particle Update, the Index value is not consistent and different values are returned for the same Particle in each frame.<\/p>\n\n\n\n<p>Therefore, the Execution Index can be stored as a parameter in the Particle Spawn, and when sampling vertices using Skeletal Mesh Location in Particle Spawn and Particle Update, the Vertex ID can be specified in that parameter. This allows the same Particle to sample the same vertex every frame.<\/p>\n\n\n\n<p>Finally, in Skeletal Mesh Location within Particle Update, change Position Sampling to Output. If this is set to Apply (Rigid) which is by Default, the Particle will be stuck to the Mesh surface at this time and deformation will not work correctly. The position of the Skeletal Mesh vertices should only be used for calculations and should not override the actual Particle&#8217;s position.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"627\" height=\"218\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqdw.jpg\" alt=\"\" class=\"wp-image-1108\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqdw.jpg 627w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqdw-300x104.jpg 300w\" sizes=\"(max-width: 627px) 100vw, 627px\" \/><\/figure>\n\n\n\n<p>The position of each vertex sampled by this is stored in SampledPositionWithoutOffset. This is used for Constraint and Diff calculations like below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"466\" height=\"287\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115706.jpg\" alt=\"\" class=\"wp-image-1120\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115706.jpg 466w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115706-300x185.jpg 300w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"205\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115950.jpg\" alt=\"\" class=\"wp-image-1121\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115950.jpg 976w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115950-300x63.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115950-768x161.jpg 768w\" sizes=\"(max-width: 976px) 100vw, 976px\" \/><figcaption class=\"wp-element-caption\">For Pivot parameter, see below.<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"989\" height=\"129\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120007.jpg\" alt=\"\" class=\"wp-image-1122\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120007.jpg 989w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120007-300x39.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120007-768x100.jpg 768w\" sizes=\"(max-width: 989px) 100vw, 989px\" \/><figcaption class=\"wp-element-caption\">Calculation of the Diff value to be written to the Render Target. Subtracting the corresponding vertex position of the Skeletal Mesh for that frame from the Particle position calculated in Pendulum module.<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Setting the pivot point<\/h2>\n\n\n\n<p>As briefly explained in the article on Static Mesh, the Fake Soft Body Simulation described here works with a simple PBD that uses a Constraint as a vector from an arbitrary point to each Particle.<\/p>\n\n\n\n<p>This arbitrary point was set to the origin of the Niagara System in the previous article, but this can be set anywhere you like.<\/p>\n\n\n\n<p>So this time, I implemented that it can be set at any bone position in the Skeletal Mesh.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-112732.jpg\" alt=\"\" class=\"wp-image-1109\" style=\"width:600px\" width=\"600\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-112732.jpg 571w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-112732-239x300.jpg 239w\" sizes=\"(max-width: 571px) 100vw, 571px\" \/><\/figure>\n\n\n\n<p>This is the process.<\/p>\n\n\n\n<ol>\n<li>Place one Particle at any bone position in the Skeletal Mesh (Pivot Emitter)<\/li>\n\n\n\n<li>Read the particle placed in step 1 by Particle Attribute Reader and use its position as the starting point of Constraint.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Place a particle at any bone position in the Skeletal Mesh.<\/h3>\n\n\n\n<p>The Skeletal Mesh Location module allows sampling of bones as well as vertices.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"401\" height=\"116\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/fewfwf.jpg\" alt=\"\" class=\"wp-image-1111\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/fewfwf.jpg 401w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/fewfwf-300x87.jpg 300w\" sizes=\"(max-width: 401px) 100vw, 401px\" \/><\/figure>\n\n\n\n<p>Any bone can be sampled by specifying the Index of the Bone in Bone \/ Socket Index.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"578\" data-id=\"1112\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-113557.jpg\" alt=\"\" class=\"wp-image-1112\" style=\"object-fit:cover\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-113557.jpg 1023w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-113557-300x170.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-113557-768x434.jpg 768w\" sizes=\"(max-width: 1023px) 100vw, 1023px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1002\" height=\"553\" data-id=\"1113\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-113624.jpg\" alt=\"\" class=\"wp-image-1113\" style=\"object-fit:cover\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-113624.jpg 1002w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-113624-300x166.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-113624-768x424.jpg 768w\" sizes=\"(max-width: 1002px) 100vw, 1002px\" \/><\/figure>\n<\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Read by Particle Attribute Reader and use its position as the starting point of Constraint<\/h3>\n\n\n\n<p>Particle Attribute Reader is a convenient function that allows you to read the Particle information of any Emitter. <br>At this time, Specify `Pivot` in Emitter Name.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"434\" height=\"80\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114254.jpg\" alt=\"\" class=\"wp-image-1114\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114254.jpg 434w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114254-300x55.jpg 300w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/figure>\n\n\n\n<p>Next, the Particle Attribute Reader is used to obtain the position of the Particle at the desired bone position and store it in the parameter Pivot.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"473\" height=\"58\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114608.jpg\" alt=\"\" class=\"wp-image-1115\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114608.jpg 473w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114608-300x37.jpg 300w\" sizes=\"(max-width: 473px) 100vw, 473px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"232\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114625-1024x232.jpg\" alt=\"\" class=\"wp-image-1116\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114625-1024x232.jpg 1024w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114625-300x68.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114625-768x174.jpg 768w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-114625.jpg 1101w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>I simply use the Particle Attribute Reader to read the Position.<\/p>\n\n\n\n<p>Since there is only one Particle emitted by Pivot Emitter, you can refer to that Particle by putting 0 in the Particle Index of Get Position by Index.<\/p>\n\n\n\n<p>The rest of the time, this Pivot parameter is used to calculate Constraints.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"803\" height=\"218\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/qwqdqwd.jpg\" alt=\"\" class=\"wp-image-1117\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/qwqdqwd.jpg 803w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/qwqdqwd-300x81.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/qwqdqwd-768x208.jpg 768w\" sizes=\"(max-width: 803px) 100vw, 803px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"966\" height=\"181\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115127.jpg\" alt=\"\" class=\"wp-image-1118\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115127.jpg 966w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115127-300x56.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115127-768x144.jpg 768w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><figcaption class=\"wp-element-caption\">\u203b Constraint calculations in Particle Update use the vertex positions sampled in Skeletal Mesh Location 001.<\/figcaption><\/figure>\n\n\n\n<p>Pivot parameter is also specified for Pendulum Pivot in Pendulum Setup.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"881\" height=\"296\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115109.jpg\" alt=\"\" class=\"wp-image-1119\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115109.jpg 881w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115109-300x101.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-115109-768x258.jpg 768w\" sizes=\"(max-width: 881px) 100vw, 881px\" \/><\/figure>\n\n\n\n<p>Now, place the Skeletal Mesh on a level and put this Fake Soft Body Simulation Niagara System in its child.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"601\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120648-1024x601.jpg\" alt=\"\" class=\"wp-image-1124\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120648-1024x601.jpg 1024w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120648-300x176.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120648-768x451.jpg 768w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120648.jpg 1268w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Then, set the Animation and play. You can run a fake soft body simulation on the Animated Skeletal Mesh!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img decoding=\"async\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/CheckPlace-Unreal-Editor-2023-08-12-12-31-04.gif\" alt=\"\" class=\"wp-image-1123\" style=\"width:400px\" width=\"400\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Supplement<\/h2>\n\n\n\n<p>In the default state of UE5.2.0, the display around shadows is not correct, so I will add how to fix that.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Influence of Virtual Shadow Maps<\/h3>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"251\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqfdfqqq-300x251.jpg\" alt=\"\" class=\"wp-image-1125\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqfdfqqq-300x251.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqfdfqqq-768x643.jpg 768w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/wqfdfqqq.jpg 906w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/figure>\n\n\n\n<p>When actually playing with this sample, a phenomenon occurs in which shadows appear to be left behind.<\/p>\n\n\n\n<p>This is due to the new Virtual Shadow Maps feature in UE5, which caches shadows and draws shadows from cache for areas where there is no motion.<\/p>\n\n\n\n<p>I do not know the details of how this motionless area is calculated, but it is certain that the Bounds of the mesh is involved, so by increasing the Scale of the Bounds, we can make sure that the shadow cast by the deformation is properly updated each frame.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"485\" height=\"272\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120939.jpg\" alt=\"\" class=\"wp-image-1126\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120939.jpg 485w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-120939-300x168.jpg 300w\" sizes=\"(max-width: 485px) 100vw, 485px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Anti-aliasing effects<\/h3>\n\n\n\n<figure class=\"wp-block-image size-medium\"><img loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"175\" src=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-121153-300x175.jpg\" alt=\"\" class=\"wp-image-1127\" srcset=\"https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-121153-300x175.jpg 300w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-121153-1024x597.jpg 1024w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-121153-768x448.jpg 768w, https:\/\/heyyocg.link\/wp-content\/uploads\/2023\/08\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2023-08-13-121153.jpg 1275w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/figure>\n\n\n\n<p>In UE5, TSR anti-aliasing is set by default. This can cause jaggedness in the trajectory of fast moving objects, and this has caused some strange marks in the shadow areas.<\/p>\n\n\n\n<p>I think there are some more fine-tuning of TSR settings in this area, but for a quick fix, go to Project Settings and change the Anti-Aliasing Method to TAA or FXAA.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Bonus<\/h2>\n\n\n\n<p>If you want to deform only a part of Mesh, I think the following policy is the way to do it.<\/p>\n\n\n\n<ol>\n<li>Weighting the Particle placed at each vertex in the Niagara System and adjusting the Tightness value for each Particle.<\/li>\n\n\n\n<li>Create a Mask in the Material and adjust the strength of the World Position Offset.<\/li>\n<\/ol>\n\n\n\n<p>In either method, I think the key is how to create the mask. You can create a mask with a Texture, use Vertex Color, or create a mask with a node in the Material.<\/p>\n\n\n\n<p>The sample data provided below includes a sample of creating a mask within a material to adjust the strength of the World Position Offset like the post below, so check it out if you are interested!<\/p>\n\n\n\n<p><a href=\"https:\/\/heyyohanashima.gumroad.com\/l\/gmgmhl\">https:\/\/heyyohanashima.gumroad.com\/l\/gmgmhl<\/a><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-rich is-provider-twitter wp-block-embed-twitter\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"twitter-tweet\" data-width=\"500\" data-dnt=\"true\"><p lang=\"en\" dir=\"ltr\">Since it&#39;s just World Position Offset, you can mask out where you don&#39;t want to deform in material<br>You need to make good gradient mask to get smooth deform though (could be spikey intentionally also) <a href=\"https:\/\/t.co\/7YYS2XAix9\">pic.twitter.com\/7YYS2XAix9<\/a><\/p>&mdash; HeyYo (@yo_hanashima) <a href=\"https:\/\/twitter.com\/yo_hanashima\/status\/1690583924228210688?ref_src=twsrc%5Etfw\">August 13, 2023<\/a><\/blockquote><script async src=\"https:\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Introduction The following article, previously explained, deformed Static Mesh. In this article, I will explain how to run a fake soft body simulation on a Skeletal Mesh that is being animated. But the mechanism itself is the same as with Static Mesh, so I will focus on the additional implementation for Skeletal Mesh. Also, sample [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1096,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","_mi_skip_tracking":false,"footnotes":"","_locale":"en_US","_original_post":"https:\/\/heyyocg.link\/?p=1094"},"categories":[17,31],"tags":[32,30],"modified_by":"yohanashima","_links":{"self":[{"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/posts\/1130"}],"collection":[{"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/comments?post=1130"}],"version-history":[{"count":19,"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/posts\/1130\/revisions"}],"predecessor-version":[{"id":1161,"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/posts\/1130\/revisions\/1161"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/media\/1096"}],"wp:attachment":[{"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/media?parent=1130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/categories?post=1130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heyyocg.link\/wp-json\/wp\/v2\/tags?post=1130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}