-
Notifications
You must be signed in to change notification settings - Fork 257
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
Question BIM and GLTF for mobile #175
Comments
Forgot to add, I'm developing for mobile devices (Unity: android) |
And what version of Unity would you recommend to use for maximum compatibility? |
Hi @NeluQi ,
Thanks for you interest!
Sounds like a great challenge :)
There's an extension called EXT_mesh_gpu_instancing. Support for it was implemented just this week and will be released soon.
There's been demand for providing a memory limit before. But even with that in place your use-case is challenging and this might only replace the crash with a regular out-of-memory error.
You can avoid overlapping peak memory usage by loading files sequentially instead of simultaneously (at the cost of loading speed). An improvement idea that comes to mind is it should be possible to dispose the GltFast (GltfImporter) instance (but not the instantiation) to free up some more memory. I created an issue. Thanks for the input!
Which value range are we talking about? We should find out where the required precision is lost (where is the bottleneck). It might be your glTF exporter. If it's Unity's 32-bit float scene transform system then I could ask around. I know projects that require 64-bit float positions so I might ask them how they solved this one. In generel, I think this would require some work beyond glTF(ast)
I'd recommend using Draco mesh compression and KTX/basisu format for textures. Draco reduces the transmission size and KTX textures require up to 8x less memory than Jpeg/PNG. Tools I've used and recommend:
|
Currently glTFast should be backwards compatible back to 2019.3. For sure it works on 2019.4 LTS (mainly developing on that version) and tested on 2020.3 LTS and 2021.1 as well. Regarding render pipelines: BuiltIn, URP and HDRP should all work fine. At some point URP and HDRP will get better support or more features. |
Thank you so much! You have painted everything in great detail, thank you! |
And one more thing. I am using Unity version 2020.3.8f1 (LTS). I actively use glTFast, I have not noticed any problems. This is for informational purposes only. |
Yeah, the 32bit float transforms are a Unity limitation....I'll ask around if there are ways around it, but I don't think it's as easy as flipping a switch.
|
Is there any progress? |
Regarding double precision transforms...unfortunately not. Expect an update on this later this year. If you absolutely need a solution earlier, you could create a system of your own, that converts transform per-frame to minimize (clip space) precision loss, but that's probably some work. glTFast then would have to pass on transformation data in double precision as well. I'd be willing to write this patch as soon as we know how this system will work. |
Closing in favor of #290 |
Hello everyone. Thanks for the great tool, I hope it will continue to evolve.
I use it with BIM models (Autodesk models, autocad, etc.). Models are loaded in real time. Models are prepared from ifc (ifc to gtlf). The model is split into many GLTF files (I try to make files up to 200 mb, but in some cases there may be one large gltf file> 1 gb) My models can be really large and with a lot of objects (> 6,000,000 objects). Also, objects can be located in large coordinates from zero.
Many objects can have similar mesh meshes. (Is there a way to do Geometry Instancing?)
Above I described what I use the tool for.
I would like to see the development towards optimization for large models for mobile devices (Mobile shaders/Perhaps special shaders for BIM, working with RAM, etc.) (The most important problem now is a crash due to lack of RAM)
Can you give me advice on how to use and optimize for my tasks (preferably with examples):
Thank you
The text was updated successfully, but these errors were encountered: