Apply material to an imported glft in babylon js

Hi Babylon community!
I’m in trouble, i want to apply a material to a Mixamo character directly in bjs. If just export my glft everything work fine, but my purpose is to export the mesh without the material and then apply the material( so if an user want a different skin i can just use the same mesh and apply different skin with a variable). But the uv mapping don’t work i trie with the nme but i’cant found a solution can you suggest me where i can check…here a basic playground

Hello and welcome to the Babylon community! What it looks like is the UVs aren’t being exported. Can you double check they are there, maybe opening on Blender and looking at them?

1 Like

Hi carolhmj,
Thank for the advice i thing in fact there is no uv map in my shader editor in blender😅 i will fix that and try again and share

In fact uv are exported well but when i’m applyng material the issue is always there :cold_sweat:

if i upload my model in babylon sandbox and the i apply the texture it work (here there is a different model but the process is the same) i think my problem is how i apply the texture in babylon

OK i finally find the solution! I will resume what i do in case someone will have the same problem!

export the glft from blender with no material and export the texture

import the mesh in babylon and create a new texture with nominimapOrOption and invertY

let texture= new Texture(url,scene, true, false)

add the texture to the pbrmaterial

playerOne.loadedMeshes[1].material.albedoTexture = texture