efxlab Posted February 10, 2018 Share Posted February 10, 2018 Hey Guys, I tried all things with glTF model, I can't texture it in live programmatically, I don't see examples or documentation anywhere. The issue is that when I try to re-texture (for example change albedo) with new BABYLON.DynamicTexture I have black texture. When I try to recreate a PBR Material, the texture doesn't stick on the UVs model. Its crazy ! The only way I see is to change the JSON glTF and reload the whole glTF with the mesh model ! If anyone can show me the syntax to do texturing on a mesh with glTF PBR syntax, it's welcome. thanks Quote Link to comment Share on other sites More sharing options...
efxlab Posted February 10, 2018 Author Share Posted February 10, 2018 I did a test relative to this code : https://www.babylonjs-playground.com/#10D6YT%2353 from this thread : my test on this issue : Quote Link to comment Share on other sites More sharing options...
efxlab Posted February 10, 2018 Author Share Posted February 10, 2018 I found what is it, its not an UV issue, just the texture flip when I assign a new one : Investigating why this flip... Quote Link to comment Share on other sites More sharing options...
Guest Posted February 10, 2018 Share Posted February 10, 2018 Hello there is a parameter in the Texture constructor to invert texture axis on Y (invertY) This is expected ad gltf Y axis for texture is the opposite of bjs one efxlab and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
efxlab Posted February 11, 2018 Author Share Posted February 11, 2018 perfect @Deltakosh it worked here: material.albedoTexture = new BABYLON.Texture("assets/JRO_Metals_01/lambert1_baseColor.jpg", scene, true, false); thx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.