-
Notifications
You must be signed in to change notification settings - Fork 251
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
Loading large models on android #145
Comments
Hi, 3D model optimization in general is a huge topic that could span multiple books. There's even lot's of software that tackles the problem (more or less well and some quite expensive). I'll try to only give some concrete, glTF/glTFast related tips. Profile FirstSeriously, open the Unity Profiler and make a deep memory snapshot to see what exactly within your glTF files is taking up the most space and if that is justified. TextureIf your textures use up a lot of RAM:
Geometry
An open source tool that worked wonders on glTFs for me in the past is meshoptimizer/gltfpack. It can reduce the mesh and encode textures to KTX. Make sure you don't use its mesh compression as it is not supported in glTFast yet. hth |
What is the reason for the large GC? Android apps just crash when RAM is full, is there a way to fix this? What is more optimal to create a new GLTFast.GLTFast and call the load, or use the same GLTFast.GLTFast? `*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** backtrace: managed backtrace: stack: |
I presume you profiled the Editor in Playmode. It's recommended to always profile (debug) builds, since the editor runtime distorts the profiling data. Take a look at the Profiler docs to learn more. The heavy stuff in
What Android device do your run this on? How much memory does it have? |
Thanks for helping me. When the RAM is full, the application crashes, is there any way to handle this exception? (try cath - doesn't work). I would like to stop loading when the RAM threshold is reached I will attach screenshots of profiling on the device. I work with BIM models. They can be huge. Consist of one large file or be split into 2-5k small files. Can you give me a couple of tips for dealing with these conditions? Now I do not load the entire model at once, but only the gtlf closest to the camera (When exporting to gtlf, there is metadata on the coordinates of each individual gtlf file). However, I would like to load as much as possible, ideally the entire model. |
you're welcome
I understand. Yes, the sheer mass of geometry is too much.
I don't know. Not sure about Android, but iOS informs apps when they are about to run out of memory, which is very vague and sometimes very conservative. You won't get a number of how much memory you've got left. Also not sure if glTFast can fail gracefully when memory runs out. Should be investigated.
|
Thank you very much, I will think in this direction Can you give a hint about caching? What kind of cache are you talking about? The files themselves are downloaded in advance to devices |
Yes, this is what I meant. Caching glTF files (including .bin buffers and textures) on local drives. |
I've created #147 with regards to running out of memory. |
Good day. The problem is the lack of RAM on the device when loading large models.
There are large models consisting of many gtlf files.
What is your recommendation for loading large models?
The text was updated successfully, but these errors were encountered: