I want to upload a GLTF file and i want to edit its texture and mesh using image files like JPG

anyone help me how to import and load a GLTF file into BabylonJs and to edit the texture using files like jpg, etc…

and to change the mesh of the loaded file dynamically according to the user side inputs and render the model to the user

You can modify a texture like this for GLTF:

const newTexture = new BABYLON.Texture("your texture jpg", scene);
mesh.material.albedoTexture = newTexture;

GLTF meshes do not use standardMaterial, only PBR.
It therefore functions to use albedoTexture to modify a texture

3 Likes

Importing Assets | Babylon.js Documentation (babylonjs.com)

1 Like