Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-memory when renaming, enormous use of resources when managing .glb files #718

Open
vincenzorin opened this issue Sep 19, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@vincenzorin
Copy link

vincenzorin commented Sep 19, 2024

Describe the bug
I have a .glb file (375 MB) with 36x8K textures. Unfortunately, doing any operation with this file (importing, renaming, even selecting to view in the inspector) requires a painful amount of time, usually resulting in a crash of Unity.
The Unity crash report says that renaming, in particular, causes out-of-memory issues.
I noticed that doing any operation with this (and similar, but even smaller) file makes intensive use of the SSD (it should be a decent one, I remember I saw 2300MB reading or writing) and I have 32GB RAM with a

Files
Unfortunately, I cannot provide a file for this. The asset was validated using the glTF Validator.

Expected behavior
Not to use the SSD for 20-30 seconds at 100% when I select the file in the Project window. Not to crash when renaming a file due to out-of-memory issues.

Desktop (please complete the following information):

  • glTFast version 6.7.1
  • Unity Editor version [e.g. 2021.3.16f1]
  • Universal Render Pipeline 12.0
  • Editor

Additional info
This is one of the crash reports I was presented with. This was triggered by inspecting the file via the inspector, changing Animation to "None" and deselecting the Components: Animations, Camera, Light.
image

@vincenzorin vincenzorin added the bug Something isn't working label Sep 19, 2024
@atteneder
Copy link
Owner

@vincenzorin

Thanks for reporting.

I'd like to find out whether you're hitting some physical limit or whether glTFast is causing this with some level of wasteful memory usage.

In the error above it fails allocating 268 MB of memory for a single uncompressed texture. Considering you're loading 8k by 8k textures that sounds about right (8096^2*4 = ~262 MB uncompressed).

You have 36 of those, so that's almost 10 GB of decoded textures alone. Excessive yes, but that alone shouldn't break it.

Have you tried splitting the file up into a .gltf file with separate buffers and textures as a workaround? It must be much more efficient this way.

@atteneder
Copy link
Owner

might be related to #726

@atteneder atteneder moved this from To do to Planned in glTFast development Dec 18, 2024
@atteneder atteneder added this to the 6.x milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Planned
Development

No branches or pull requests

2 participants