Search Unity

Bug GPU Skinning spikes

Discussion in 'Editor & General Support' started by sewy, Aug 19, 2022.

  1. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    150
    Is this behavior normal? Can anyone confirm?
    Running:
    Unity 2021.3.8f1
    Default pipeline, Forward

    Scenario:
    * Empty scene with ground and 121 armors (multiple parts - SkinnedMeshRenderers per armor) - NO animation.
    0.PNG

    *GPU skinning enabled, but the FPS every X seconds drops from 100 to less than 30. In the profiler I can see weird performance decreasing over time caused by GPU skinning. If disabled, it runs smooth without those ramps.

    1.PNG 2.PNG
     
    Last edited: Aug 19, 2022
  2. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    150
    Another weird thing is, GPUSkinning performance on CPUs RenderThread is realy bad. Comparing to 2019, some weird logic is happening here.
    2021.PNG
    2019.PNG

    Also in 2019, rendering was happening right before the end of the frame, in 2021 it doesnt even care.
     
  3. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    150
  4. Alterego-Games

    Alterego-Games

    Joined:
    Jul 13, 2015
    Posts:
    354
    Unity apparently didn't think it was a bug, but a feature. OP did you find a fix? We see our GPU Skinning performance decreasing over time, just as you have in the profiler.

    Did you find a fix, apart from disabling GPU skinning?
     
  5. sewy

    sewy

    Joined:
    Oct 11, 2015
    Posts:
    150
    For my case, I've solved it by combining multiple armor parts into single Mesh and SkinnedMeshRenderer (SMR) (with multiple material IDs)
    => previously I had aprox 10 SMRs per armor, so with every new instance, the bottleneck problem was raised significantly, but now I have 1 SMR per armor, so the problem is kept at low. It was enough perf gain for me till Unity deploys their "work in the pipeline that should bring significant performance improvements to this".