Posts: 7
Threads: 2
Joined: Mar 2021
Reputation:
0
Unity version - 2019.4.14f1
Platform - Android
Backend - Burst
Blueprint - Cloth sheet(No modify)
There is only 1 cloth in the scene.
I follow the guide that disables job debugger, etc. In editor work fine.
FPS is freezing at 3 on android.
Anyone, please help. I really need to archive the project. Thank you.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(11-03-2021, 02:30 PM)Haleluya Wrote: Unity version - 2019.4.14f1
Platform - Android
Backend - Burst
Blueprint - Cloth sheet(No modify)
There is only 1 cloth in the scene.
I follow the guide that disables job debugger, etc. In editor work fine.
FPS is freezing at 3 on android.
Anyone, please help. I really need to archive the project. Thank you.
Hi there,
This is most likely due to:
- not having the Burst dependencies installed, so the engine will fallback to Oni whichnis slower on mobile. In this case a warning will appear in the solver inspector, telling you to install the dependencies.
- death spiralling, due to a large maximum timestep or a small fixed timestep.
Check that you have the Burst dependencies properly installed (no warning message in the solver). Also check how many times is FixedUpdate() called per frame, if there’s more than 1 call per frame try lowering the maximum allowed timestep in Unity’s time settings.
Posts: 7
Threads: 2
Joined: Mar 2021
Reputation:
0
11-03-2021, 02:54 PM
(This post was last modified: 11-03-2021, 03:18 PM by Haleluya.)
(11-03-2021, 02:45 PM)josemendez Wrote: Hi there,
This is most likely due to:
- not having the Burst dependencies installed, so the engine will fallback to Oni whichnis slower on mobile. In this case a warning will appear in the solver inspector, telling you to install the dependencies.
- death spiralling, due to a large maximum timestep or a small fixed timestep.
Check that you have the Burst dependencies properly installed (no warning message in the solver). Also check how many times is FixedUpdate() called per frame, if there’s more than 1 call per frame try lowering the maximum allowed timestep in Unity’s time settings.
Thank you for a fast response.
-I have installed all of them. No warning at all.
-I didn't change the timestep of the engine. It's 0.02.
There is only 1 cloth in the scene. It should be that low FPS. Any more suggestion?
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(11-03-2021, 02:54 PM)Haleluya Wrote: Thank you for a fast response.
-I have installed all of them. No warning at all.
-I didn't change the timestep of the engine. It's 0.02.
There is only 1 cloth in the scene. It should be that low FPS. Any more suggestion?
I’m not getting these results, a single cloth sheet (the included sample one) using Burst runs in Android (Xiaomi A2 lite) at 60 fps for me.
Make sure your build does not have support for deep profiling enabled. Other than that, there should be no reason for such bad performance.
Posts: 7
Threads: 2
Joined: Mar 2021
Reputation:
0
11-03-2021, 03:41 PM
(This post was last modified: 11-03-2021, 03:45 PM by Haleluya.)
(11-03-2021, 03:33 PM)josemendez Wrote: I’m not getting these results, a single cloth sheet (the included sample one) using Burst runs in Android (Xiaomi A2 lite) at 60 fps for me.
Make sure your build does not have support for deep profiling enabled. Other than that, there should be no reason for such bad performance.
Could you please export me a scene or unity project zip file that has 60 fps on that device?
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
(11-03-2021, 03:41 PM)Haleluya Wrote: Could you please export me a scene that has 60 fps on that device?
Here is a pic of mine.
Empty scene, default solver, default cloth settings, default everything. Will post a video here with the build process + results.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
11-03-2021, 05:30 PM
(This post was last modified: 11-03-2021, 05:33 PM by josemendez.)
Here's the video. As you can see I don't do anything out of the ordinary, empty Unity 2019.4.1f1 project with only Obi installed. Build the scene from scratch: default solver, default cloth settings, use the sample cloth sheet blueprint, attach it by the corners and add a dragger component just so that I can interact with the cloth.
Then I build for Android, and deploy to the device. Maybe you can spot any differences with the steps you're following?
In the last part of the video you can see it running in the A2 lite (which isn't particularly powerful btw) at > 60 fps, it runs really smooth.
Posts: 7
Threads: 2
Joined: Mar 2021
Reputation:
0
(11-03-2021, 05:30 PM)josemendez Wrote: Here's the video. As you can see I don't do anything out of the ordinary, empty Unity 2019.4.1f1 project with only Obi installed. Build the scene from scratch: default solver, default cloth settings, use the sample cloth sheet blueprint, attach it by the corners and add a dragger component just so that I can interact with the cloth.
Then I build for Android, and deploy to the device. Maybe you can spot any differences with the steps you're following?
In the last part of the video you can see it running in the A2 lite (which isn't particularly powerful btw) at > 60 fps, it runs really smooth.
I really appreciate your support. I follow your video and also got 60 fps with my low spec Xiaomi.
So I'm investigating what cost the performance. I found one thing, I add "TestEnvironment" to the scene, and fps drop around 20. I'm thinking about what I could optimize with that thing. Thank you so much.
Posts: 7
Threads: 2
Joined: Mar 2021
Reputation:
0
11-03-2021, 08:16 PM
(This post was last modified: 11-03-2021, 08:17 PM by Haleluya.)
(11-03-2021, 06:56 PM)Haleluya Wrote: I really appreciate your support. I follow your video and also got 60 fps with my low spec Xiaomi.
So I'm investigating what cost the performance. I found one thing, I add "TestEnvironment" to the scene, and fps drop around 20. I'm thinking about what I could optimize with that thing. Thank you so much.
Found out 2 more things, at the beginning I put the cloth on top of a table which is mesh convex. So it collide since start the scene and that made hugh fps drop. Then I changed it to a box.
Another thing is I copy an Obisolver from some scene and its constraints are high value in the iteration. So I create a new one. That all fixed the issue.
Now I'm so happy with 50 fps. Thank you.
Posts: 6,322
Threads: 24
Joined: Jun 2017
Reputation:
400
Obi Owner:
12-03-2021, 10:44 AM
(This post was last modified: 12-03-2021, 10:46 AM by josemendez.)
Quote:Found out 2 more things, at the beginning I put the cloth on top of a table which is mesh convex. So it collide since start the scene and that made hugh fps drop. Then I changed it to a box.
Another thing is I copy an Obisolver from some scene and its constraints are high value in the iteration. So I create a new one. That all fixed the issue.
MeshColliders are very expensive in general, but more so when using cloth as each individual cloth particle has to be tested for collisions against it. From Unity's manual ( https://docs.unity3d.com/Manual/class-MeshCollider.html):
Quote:[..] they have higher processing overhead than collisions involving primitive colliders (such as Sphere, Box, and Capsule), so it is best to use Mesh Colliders sparingly.
Use MeshColliders only when absolutely necessary, and make them as simple as possible. Most of the time it's best to use Obi's distance fields: http://obi.virtualmethodstudio.com/tutor...ields.html. They're much cheaper and considerably more robust.
|