Search Issue Tracker

Active

Votes

2

Found in

2023.2.17f1

6000.0.0b14

Issue ID

UUM-69190

Regression

No

Physics.SyncTransforms has poor performance when a collider is attached to a parent or child of a Skinned Mesh Renderer

--

-

How to reproduce:
1. Open the attached “SMR_collider_issue” project
2. Open the “2.SkinnedMeshRenderScene”
3. Enter Play mode. A script will log Profiler data as the game is running
4. Wait for a few seconds. The script will exit Play mode automatically
5. Open the Profiler window (Window > Analysis > Profiler)
6. In the Profiler, press the “Load binary profiling information from a file“ button in the top-right corner (small icon next to the save icon) and open the newly created file located in “SMR_collider_issue/Benchmarks/“
7. Open the Profile Analyzer (Window > Analysis > Profile Analyzer)
8. In the Profile Analyzer, press “Pull Data”
9. In the “Name Filter” field, enter “Physics.SyncTransforms” and take note of the median (ms) value of the “Physics.SyncTransforms” marker
10. In the Hierarchy, select the “ObjectContainer” GameObject
11. In the Inspector, enable the Box collider component
12. Repeat steps 3 to 9

Expected result: Enabling the Box collider does not have a significant impact on physics performance (0ms per frame)
Actual result: Enabling the Box collider has a significant impact on physics performance (~2.2ms per frame)

Reproducible in: 2023.2.17f1, 6000.0.0b14
Could not test with: 2021.3.37f1, 2022.3.23f1 (Physics.SyncTransforms is not called in these versions)

Reproducible on: Windows 11, macOS 14.2.1 (Intel)
Not reproducible on: No other environments tested

Notes:

* Reproducible in Editor and Player
* There is another scene present in the project, “1.MeshRenderScene“, with a similar setup. It is possible to repeat steps 3 onwards to see that this issue only affects Skinned Mesh Renderers and not standard Mesh Renderers
* This issue reproduces as long as a collider exists within the same hierarchy (shared parent) as the Skinned Mesh Renderer. The collider can be attached to a parent, a child, or another GameObject separate from the Skinned Mesh Renderer as long as they share the same parent. In the “2.SkinnedMeshRenderScene“, a collider is attached to a plane under the “DemoSetup” GameObject. This collider does not trigger the issue as it does not share a parent with the Skinned Mesh Renderers
* The internal notes contain a sheet with benchmark results from versions 2023.2.17f1 and 6000.0.0b14

Add comment

Log in to post comment