Hi there
I have a glb file who exist in this location https://test-avatar-unzip.s3.us-east-2.amazonaws.com/model.glb
and this glb file contain a texture who have its skin and face style on this https://test-avatar-unzip.s3.us-east-2.amazonaws.com/model.jpg location
how I can pass this image to glb with Babylon
I try a lot but every time I have this problem
Uncaught (in promise) Error: /textures/0: Error while trying to load image: 60,33,68,79,67,84,89,80,69,32,10… - Fallback texture was used
this is my code for this part
var raw_content = Tools.DecodeBase64(`${image}`);
console.log('raw_content',raw_content);
var blob = new Blob([raw_content]);
var url = URL.createObjectURL(blob);
var grass2 = new StandardMaterial("grass2", scene);
grass2.ambientTexture = new Texture(url, scene);
var cloth_on_the_model = SceneLoader.ImportMesh('',"","url of model.glb" ,
scene,
undefined,
".glb",
function(newMeshes2){
console.log(newMeshes2)
var object = newMeshes2['meshes'][0];
object.texture = grass2
shadowGenerator.addShadowCaster(object, true);
})
cloth_on_the_model.material =grass2;
I set URLs of this two file for if you want to test it you have resource of this problem
and thanks for your attention