Do you need any other settings to map the model

Applying materials to the model in the official model viewer is not a problem, but if you apply the texture yourself, it will become messy.
Set the texture in the official


Map the model yourself

The main code
BABYLON.SceneLoader.ImportMesh(“”, ‘./city/’, “city.glb”, scene,(newMeshes) => {
window.newMeshes = newMeshes;
newMeshes[0].scaling.setAll(8);
newMeshes.map(mesh => {
if(mesh.material){
const imageMaterial = new BABYLON.PBRMaterial(‘xxx’, scene);
mesh.material = imageMaterial;
mesh.material.albedoTexture = new BABYLON.Texture(“./city/bakedDay.jpg”,scene);
}
});
});

Could you explain your question a bit more?

Applying materials to the model in the official model viewer is not a problem, but if you apply the texture yourself, it will become messy.

It comes from the different mapping between right-handed and left-handed.
You can change the vScale on your texture to a -1 (minus value).

3 Likes