Compressed glb file is not loading in the editor

Hi,

i compressed some of my glb files with (meshoptimizer / gltfpack) and i just noticed that i can display them fine in the gltf viewer but the editor does not load them correctly into my assets.

is this intended behavior?

BR

What differences are you getting and how are loading them in the Editor?

okay i just noticed that happens with every glb. i can display them in the viewer but not drag and drop in the editor, but if i use an fbx and the editor converts it to an glb, i am able to drag and drop that.

Ah yes, the editor doesn’t handle importing GLBs directly yet.

Current workaround is the following https://developer.playcanvas.com/en/tutorials/loading-gltf-glbs/

We are currently looking to support import of GLBs and the next step is to release importing o FBX hierarchies as templates which is in very early beta.

Once that is done, then importing GLBs will come after.

2 Likes

Alright, thank you for the information :slight_smile:

We’re not looking at adding the glb import into the Editor anytime soon though. But we’re keen to import fbx files as currently, convert them to glb as currently, but additionally have the glb use draco / meshoptimizer compression. But again, it will likely be months before this is ready.

2 Likes

It should also be noted if you use Draco or Meshopt, in addition to loading the models into the scene with scripts, you also need to add the WASM scripts / any changes to model loading yourself.

Example from @yaustar loading a GLB with Draco: https://playcanvas.com/project/730372/overview/loading-draco-compressed-glbs

MeshOpt support is a bit more experimental, if you need a place to start, I have a project showing meshopt compression: https://playcanvas.com/project/779762/overview/load-glb-model-with-meshopt

For ease of use, I’d recommend sticking with FBX since models are easy to tweak in the editor. If you’re looking for faster loading and you’re okay with messing with scripts, load GLBs with scripts. With that you can then use Draco to compress those. If your models require shape keys / morphs, then as a last resort I would go to MeshOpt.

2 Likes