hi,
i load gltf or obj but i can’t change color of this objet or mesh
exmple i need to change color of this gltf
hi,
i load gltf or obj but i can’t change color of this objet or mesh
exmple i need to change color of this gltf
Hey!
to change the color of a mesh you need to change the diffuse color of its material:
var sphere = BABYLON.MeshBuilder.CreateSphere("sphere", {diameter: 2, segments: 32}, scene);
var mat = new BABYLON.StandardMaterial()
mat.diffuseColor = BABYLON.Color3.Red();
sphere.material = mat;
hi thanks,
but i need to import gltf and change the color
i need to change color of this gltf
No difference:
glTF Loader Demo | Babylon.js Playground (babylonjs.com)
Hello @benzerram just checking in, was your question answered?