Search the Community
Showing results for tags 'substance painter'.
-
Hello. I exported a Kayak model from Substance Painter 2 as a glTF with the Metallic Roughness configuration. The Kayak has a red/yellow gradient png texture on it. Exporting from Substance Painter 2 gave me Kayak_baseColor.png, Kayak,_normal.png, and Kayak_occlusionRoughnessMetallic.png textures. In my Babylon JS scene, I import the model (Kayak.gltf)and am trying to switch the Kayak_baseColor.png to Lime_baseColor.png on load. The Kayak loads into the scene with it's red/yellow gradient png texture on it, but doens't switch to the lime texture on load.. Am I missing PBR properties? Or are my properties wrong? Thanks. var myKayak2; BABYLON.SceneLoader.ImportMesh("", "models/", "Kayak.gltf", scene, function (newMeshes) { myKayak2 = newMeshes[0]; var LimeTexture = new BABYLON.PBRMetallicRoughnessMaterial("Lime", scene); LimeTexture.albedoTexture = new BABYLON.Texture("models/Lime_b aseColor.png", scene); LimeTexture.metallic = 0; LimeTexture.roughness = 1.0; myKayak2.material = LimeTexture; }); I tried changing the PBR material definition to this but still no luck: var myKayak2; BABYLON.SceneLoader.ImportMesh("", "models/", "Kayak.gltf", scene, function (newMeshes) { myKayak2 = newMeshes[0]; var LimeTexture = new BABYLON.PBRMaterial("Lime", scene); LimeTexture.albedoTexture = new BABYLON.Texture("models/Lime_baseColor.png", scene); LimeTexture.metallic = 0; LimeTexture.roughness = 1.0; myKayak2.material = LimeTexture; });