KhronosGroup / KhronosGroup/UnityGLTF

Performance and Textures

Open
#347 15 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
2.2k
Forks
536
PR merge metrics
No merged PRs in 30d

Description

I noticed the following while dynamically loading some GLTF models:
* Models loaded: 14
* Total primitives in the Scene: 78. Each consists of simple shapes, in some cases an assortment of flat planes, in other cases various boxes. Each Primitive (in the Unity scene sense) uses a single 2-4MB texture
* Memory profiler:
* Meshes: 151 / 27.6MB
* Textures: 573 / 1.30 GB

This seems horrifically wrong to me, and it indeed appears to be borne out by tragic performance and high loading times even for these very simple models. In particular, note that there are somehow 573 textures for 78 different Primitives (each of which uses a single texture) Is this an issue with UnityGLTF itself, or is there some flag I can provide or something in my models that is causing that? Is there any other information I can provide to help debug this?

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file, test, or entry point is named. Start by reproducing the reported loading case with 14 GLTF models, 78 primitives, and the profiler counts from the issue; determine whether UnityGLTF or the model assets account for the excess textures, then document the cause and any required model or loader settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
game-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.