UPDATE: The issue was most likely caused by Draco compression already applied to my GLB when I exported from Blender using the compression option that was enabled, which should be done by PlayCanvas.
Hi,
I am currently trying to load a GLB file containing a skinned mesh from the cloud using both LoadFromURL and InstantiateRenderEntity and I am coming across some issues.
I followed the tutorial : PlayCanvas | HTML5 Game Engine (Draco GLB loader example).
When I am loading the file manually to my PlayCanvas project, it generates a template that actually renders the GLB correctly when added to my Scene.
I made a sample public project rendering on the left from PlayCanvas, on the right is my cloud GLB, Both GLBs are identical. I have a strong feeling that I need to add some sort of Import Hiearchy settings, because only the first render (the head) is rendered correctly.
Here is my GLB Loading code snippet (Viewer.js in the demo)
async function loadGLB(app, assetName) {
let url = '';
switch (assetName) {
case "EBU":
url = 'https://sparkcontainers.blob.core.windows.net/actors/ebu.glb';
break;
}
let asset = await this.loadFromUrl(app, url);
let renderRootEntity = asset.resource.instantiateRenderEntity();
app.root.addChild(renderRootEntity);
return renderRootEntity;
}
function loadFromUrl(app, url) {
return new Promise((resolve, reject) => {
app.assets.loadFromUrl(url, "container", function (err, asset) {
if (err)
reject(err);
else
resolve(asset);
});
});
}
I am missing something ?
Best ,
Tristan