# Cloth sim and solver taking 80ms EACH; moving causes drop to 15fps. (urgent, will pay for a solution by zelle/paypal)

**URL:** <https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282>\
**Category:** Programming & Scripting\
**Tags:** profiling, Cloth, GPU-Profiling, clothing, unreal-engine, Performance, question\
**Created:** [September 22, 2023, 8:16pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282 "2023-09-22T20:16:59Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [September 22, 2023, 8:16pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/1 "2023-09-22T20:16:59Z")

</div>

I’m only using cloth on one character: the player character.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/c/1/dc17e3e98abad1134455171085f5d6e3a3d7e037.jpeg)

Suspending or resuming cloth sim has no impact. ~81ms is what it’s taking for the solver and cloth EACH. That’s 160ms; or 1/6th of a second.

What can I do to improve this?

---

<div class="post-metadata">

**Author:** ![KiiroiSenko](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kiiroisenko/32/754874_2.png) [@KiiroiSenko](https://forums.unrealengine.com/u/KiiroiSenko)\
**Post date:** [September 22, 2023, 8:19pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/2 "2023-09-22T20:19:02Z")

</div>

How many iterations / substeps are you using for cloth simulation?

---

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [September 22, 2023, 8:42pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/3 "2023-09-22T20:42:23Z")

</div>

One of my team members did all the cloth sim stuff, not really my department; but he isn’t with us anymore so i’m trying to figure out why we went from 90fps to 30fps and down to 15fps when moving.

Where do I find the setting for substeps?

---

<div class="post-metadata">

**Author:** ![KiiroiSenko](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kiiroisenko/32/754874_2.png) [@KiiroiSenko](https://forums.unrealengine.com/u/KiiroiSenko)\
**Post date:** [September 22, 2023, 8:59pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/4 "2023-09-22T20:59:13Z")

</div>

Open your skeletal mesh asset, Inside the asset details panel:  
clothing → mesh clothing assets → select the clothing asset → clothing properties → config → cloth config → ChaosClothSharedSimConfig  
Here you will see Iteration count, Max iteration count and subdivision(substep) count

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/a/9caeb31d8963803276e6ebc09e263e28e98fa2e3.png)

---

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [September 22, 2023, 9:04pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/5 "2023-09-22T21:04:00Z")

</div>

I don’t have Chaos Cloth Config at all 😕 This is ue4.27, should have prefaced that. It all is enabled, but I don’t see any options anywhere like yours.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/9/819744abba43711341ffcb0822ccb9c0d6d4d8a0.jpeg)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/7/9/6799add85f8dbddc5abdb900a4df06baafed2a66.jpeg)

I do have these global options though:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/9/e7953707b15a0e8296e1b866907c022583a70068.png)

Turning iterations down to 8 still results in ~15fps when moving. ~45 when standing still.

In either case, stat physics shows the same numbers:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/5/3/553a6251cdededb0f6c595a8c2520c8f3c7865c0.jpeg)

---

<div class="post-metadata">

**Author:** ![KiiroiSenko](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kiiroisenko/32/754874_2.png) [@KiiroiSenko](https://forums.unrealengine.com/u/KiiroiSenko)\
**Post date:** [September 22, 2023, 9:34pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/6 "2023-09-22T21:34:51Z")

</div>

Ummm, kind of unsure about this, but have you always had 110k vertices for clothing?  
It takes about 0.5 ms for just 350 vertices on my system using 4 iterations and 1 substep (i7 13700k).  
I’m not sure if the relation is linear or if this is the actual reason for the performance hit but might be worth looking into

---

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [September 22, 2023, 9:36pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/7 "2023-09-22T21:36:59Z")

</div>

Always.

How complex is your model?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/f/9/2f9373daecfe9181d736af659b1146a25a7a9898.jpeg)

---

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [September 22, 2023, 9:51pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/8 "2023-09-22T21:51:42Z")

</div>

Okay, to make matters more or less complicated (haven’t decided which yet).

Removing my player character while the game is running reduces the call count to 12.

Time drops by ~10ms.

Looking at my character in editor with the game NOT running, my time is ~14ms to render cloth for my character.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/8/3/3832df1fa17d6e3095c0538fc725f80c87ec3a2c.jpeg)

So, now there are 12 objects calling ‘cloth’ and ‘internal solver’… but… where??? how do I see what those objects may be?

If I delete every NPC from the game and vehicle, that call count doesn’t drop.

---

<div class="post-metadata">

**Author:** ![KiiroiSenko](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kiiroisenko/32/754874_2.png) [@KiiroiSenko](https://forums.unrealengine.com/u/KiiroiSenko)\
**Post date:** [September 22, 2023, 9:57pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/9 "2023-09-22T21:57:33Z")

</div>

I’m just using the Sparrow model from paragon (Epic’s free asset). It has a total of 55k vertices and as I said I’m only using about 350 for cloth simulation(her cape).  
Also as you can see inside the the mesh editor ( and probably already found out), your character is taking about 5 ms cpu time for clothing, probably up to double of that when moving. I think 118 k vertices are the total for your character and not the ones you are simulating. So you are using cloth simulation somewhere else.

---

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [September 22, 2023, 10:03pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/10 "2023-09-22T22:03:49Z")

</div>

Yeah I see that, I just can’t find _where_.

---

<div class="post-metadata">

**Author:** ![KiiroiSenko](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kiiroisenko/32/754874_2.png) [@KiiroiSenko](https://forums.unrealengine.com/u/KiiroiSenko)\
**Post date:** [September 22, 2023, 10:09pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/11 "2023-09-22T22:09:46Z")

</div>

You can try deleting pawns from the outliner one by one to see which one was taking the cpu time. Take a backup before doing this though. If you are using git you can just do a hard reset and it will revert all of that.

---

<div class="post-metadata">

**Author:** ![rent\_treznor](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rent\_treznor](https://forums.unrealengine.com/u/rent_treznor)\
**Post date:** [September 22, 2023, 11:00pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/12 "2023-09-22T23:00:46Z")

</div>

You can delete anything you want while the game is running, it’s all temporary.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/b/b7bf0f690c399e75ef78aa13a9433da4f95548f8.jpeg)

I solved it. Looks like I had my character mesh as a reference mesh hidden in some blueprints. What a nightmare.

FPS are randomly still low as hell though, so, onto the next problem ☹

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [October 22, 2023, 11:01pm UTC](https://forums.unrealengine.com/t/cloth-sim-and-solver-taking-80ms-each-moving-causes-drop-to-15fps-urgent-will-pay-for-a-solution-by-zelle-paypal/1308282/13 "2023-10-22T23:01:35Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
