cancel
Showing results for 
Search instead for 
Did you mean: 

Optimizing avatar instantiation. High cost of creating & uploading textures to GPU.

hugoexe
Honored Guest

Hello,

I am trying to optimize instantiating avatars at runtime using Unity 2021.3.5f1. I am using the GPU Skinning for improved runtime performance.

When I create a new avatar currently, there is a few frames where the frame time spikes while textures are created. There are 3 textures created over 3 frames. The three functions that run are:

  • OvrAvatarGpuSkinnedPrimitive.CreateMorphTargetSourceTex
  • OvrAvatarGpuSkinnedPrimitive.CreateJointsTex
  • OvrAvatarGpuSkinnedPrimitive.CreateNeutralPoseTex

I have tried reducing the texture precision to reduce memory created but this has little affect. I also looked into pooling the textures but their dimensions are based entirely on the specific avatar being loaded so this was not possible since I do not know the avatars ahead of time.

Does anyone have any insights or tips on how I can reduce or mitigate this cost?

Thank you

0 REPLIES 0