Zimbofly Posted January 11, 2015 Share Posted January 11, 2015 Hi all, hope you had a great start to the new year! I'm trying to place a logo (with transparent background) onto my glass window as a kind of watermark. BUT - the transparent background is turning black!!!! any idea what I'm doing wrong? //logo glass watermarks var water = new BABYLON.Mesh.CreatePlane("water", 0.1, scene); water.material = new BABYLON.StandardMaterial("", scene); water.material.diffuseTexture = new BABYLON.Texture("./GalleryAssets/Artwork/PerformLogo1.png", scene); water.material.backFaceCulling = true; //water.material.emissiveColor = new BABYLON.Color3(0.7, 0.7, 0.7); water.position = new BABYLON.Vector3(-6.9, 6.8, 4.3); water.scaling = new BABYLON.Vector3(2.7, 1, 0.05); water.rotation.y = Math.PI * 3 / 2; ta for any input! Quote Link to comment Share on other sites More sharing options...
jahow Posted January 11, 2015 Share Posted January 11, 2015 https://github.com/BabylonJS/Babylon.js/wiki/04-Materials Adding water.material.diffuseTexture.hasAlpha = true;should do the trick Quote Link to comment Share on other sites More sharing options...
Zimbofly Posted January 11, 2015 Author Share Posted January 11, 2015 hehe - jahow, you rock!!!thank you. I didn't realize I had to enable transparency - even if the image had transparency already! works great! Cheers.... 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.