Jon DevoS Posted November 26, 2018 Share Posted November 26, 2018 Hi all i have simple and maybe stupid question i create simple pg https://www.babylonjs-playground.com/#ICZEXW#85 where top cube is blinking black. How can i do the same on bottom cube but with white color? Thx Quote Link to comment Share on other sites More sharing options...
jerome Posted November 26, 2018 Share Posted November 26, 2018 actually your bottom cube is already white. You may want to make the character disapear from textute instead ? in this case, the texture needs to be dynamically updated. Probably it needs an alpha channel and then, this one be set with a time function. Not sure... maybe there's a simpler approach by changing the mix and the way it's mixed between the texture and the emissive color. I'm not expert in this domain. I think anyway the texture must be modified at a certain point. Quote Link to comment Share on other sites More sharing options...
Jon DevoS Posted November 26, 2018 Author Share Posted November 26, 2018 Quote You may want to make the character disapear from textute instead ? i want set white diffuse color and my cube will be white like top cube black Quote Link to comment Share on other sites More sharing options...
Jon DevoS Posted November 26, 2018 Author Share Posted November 26, 2018 i found this https://www.babylonjs-playground.com/#ICZEXW#86 mat1.alphaMode = BABYLON.Engine.ALPHA_DISABLE; and if using material alpha cube set to white but I don `t know how much it is right Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 26, 2018 Share Posted November 26, 2018 This works, but usually as standard materials are subject to light, in order to emit lights (white) you need to play withe the emissive color: https://www.babylonjs-playground.com/#ICZEXW#87 (just as a quick example) Easiest would be to use an unlit material so you would not see any lighting artifacts: https://www.babylonjs-playground.com/#ICZEXW#88 jerome and Jon DevoS 2 Quote Link to comment Share on other sites More sharing options...
Jon DevoS Posted November 27, 2018 Author Share Posted November 27, 2018 thx Sebavan its looks nice)) have another question https://www.babylonjs-playground.com/#ICZEXW#89 when click on cube i set mat1.emissiveColor = BABYLON.Color3.White(); can i set power/intensity for more mesh shine because if set light.intensity = 1.5; or more emissiveColor almost invisible Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 27, 2018 Share Posted November 27, 2018 In this case I would rely on the diffuseAsIllumination mode which will end up being fully additive: mat1.useEmissiveAsIllumination = true; https://www.babylonjs-playground.com/#ICZEXW#90 Jon DevoS 1 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.