olexale / arkit_flutter_plugin

ARKit Flutter Plugin
MIT License
798 stars 228 forks source link

compression compatibility on .glb .gltf #219

Open mate-panyeczky opened 10 months ago

mate-panyeczky commented 10 months ago

Hi, thanks for create a method for loading glb and gltf models. One thing that I've came across is that I can't use my compressed .glb files anymore.

I'm using this package in order to show 3D models on screen: https://pub.dev/packages/model_viewer_plus This package is able to open and load any .glb file which was compressed by Blender, which leads us to an approximately 75% reduce in the file size.

Please note: The package works but I believe it would be a great patch to let these files to be loaded as well, or at least notify the developers that compressed models are not loadable.

Description of the bug: Based on the sample gltf loading class, you should be able to recreate this bug, since I'm using exactly the same methods. Just give a compressed model's path to the loader. (Compressing is an option in Blender: Export > .glb > Data > Compression -> turn on) What you should see, is that even though the model was downloaded and the node was added, the object will never appear on the AR screen.