Ariel Yust Posted September 28, 2014 Share Posted September 28, 2014 Before version 1.09 this lined worked...var m = new BABYLON.StandardMaterial(Image.src,Scene);...m.OpacityTexture = new BABYLON.Texture(opacityPath, Scene); // <----- this lineI'm using also: emissiveColor, specularColor, texture_source, ambientTexture, diffuseTexture, backFaceCulling =true;All the paths are correct, I checked in debug, suspect the problem is with the babylonjs library... I see only the diffuseTexture and the OpacityTexture doesn't do anything anymore... and yes I have checked this just in case:diffuseTexture .hasAlpha = false;I'm using 1.13 and 1.14 now, same effect...1.08 works great, Any Help will be appreciated ! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 28, 2014 Share Posted September 28, 2014 Since 1.10 we change the way opacitytexture are workingI assume you have RGB in your opacityTexture and not pure alpha. In this case you have to set this property to true: m.opacityTexture.getAlphaFromRGB = true Quote Link to comment Share on other sites More sharing options...
Ariel Yust Posted September 29, 2014 Author Share Posted September 29, 2014 Thanks Delta, it solved the OpacityTexture problem BUT it created a new problem, it seams thatm.SpecularColor = new BABYLON.Color3(0.2,0.2,0.2);Effects the invisible parts of texture also, I see the white specular color on the whole plane... while my opacityTexture should be a circle shaped... so the edges around (invisible parts) are reflecting white light...other then this problem, the OpacityTexture works now thanks to that code you wrote me =] Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 29, 2014 Share Posted September 29, 2014 Yes this is something I added recently to make it more realistic (Even a fully transparent glass reflect specular) Quote Link to comment Share on other sites More sharing options...
Ariel Yust Posted October 1, 2014 Author Share Posted October 1, 2014 Great, how do I fix that ? I want to have the specular effect but only on the parts that should be visable ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 1, 2014 Share Posted October 1, 2014 Do not get use to that but I'e just added a new porperty for you : stdMaterial.useSpecularOverAlpha (true by default) Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Ariel Yust Posted October 28, 2014 Author Share Posted October 28, 2014 Epic it works perfect - thank you! =] 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.