Flomotion Posted September 17, 2015 Share Posted September 17, 2015 I want to fade in some info panels that use a texture with alpha. But when I do the fade animation, the alpha from the texture is disabled. Only the object fades. Making it an ugly transition. http://www.babylonjs-playground.com/#WKOF5 Can objects with transparent alpha texture be faded in/out? thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 18, 2015 Share Posted September 18, 2015 Hello! unfortunately alpha cannot be used for alpha testing AND alpha blending So objects with transparent alpha used for alpha testing (like in your example) cannot have alpha blending enabled (like in your example ) BUT:) because Babylon.js is here to help, you can find a way to fix it: Instead of using alpha testing, you can just completely relying on alpha blending.To do so, just use the same texture in diffuse AND opacity: http://www.babylonjs-playground.com/#WKOF5#1 Isn't it a great framework? jhadenfeldt 1 Quote Link to comment Share on other sites More sharing options...
Flomotion Posted September 18, 2015 Author Share Posted September 18, 2015 thanks for the answer. And yes, BabylonJS is a great framework! You've solved that issue. But now I still get some dark grey in the image. I think it's the specular. But not sure yet how to get rid of that. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 18, 2015 Share Posted September 18, 2015 set specularColor to black? Quote Link to comment Share on other sites More sharing options...
Flomotion Posted September 20, 2015 Author Share Posted September 20, 2015 indeed.. as simple as that. Thanks! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 20, 2015 Share Posted September 20, 2015 My pleasure:) 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.