neoRiley Posted January 28, 2014 Share Posted January 28, 2014 We have a scene that we've baked shadows / lighting into the textures, how do we create a "Self Illuminated" texture so that the babylon lights don't affect these textures? I've created a StandardMaterial, set ambient and diffuse colors to white and that didn't create the effect I'm after:var mat = new BABYLON.StandardMaterial(meshes[i].name, this.scene);mat.diffuseTexture = new BABYLON.Texture("meshes/demoRoom/textures/Room_COLOR.png", this.scene);mat.specularColor = new BABYLON.Color3(0, 0, 0);mat.ambientColor = new BABYLON.Color3(1, 1, 1);mat.diffuseColor = new BABYLON.Color3(1, 1, 1);I added a hemisphere light with all there colors set to white and that worked to illuminate the room textures, but of course, that's not what we want for other elements in the scene. I guess I could create a completely different scene for elements that are lit with real lights and another for elements that have baked materials, but it would be much more efficient if there were a material type for "self illuminated". Thoughts? Thanks guys Quote Link to comment Share on other sites More sharing options...
Nico Posted January 28, 2014 Share Posted January 28, 2014 I'm not sure that will work, but have you tried to set an emissiveColor ? Edit: I've just found that StandardMaterial has a property called emissiveTexture, you could try it Quote Link to comment Share on other sites More sharing options...
neoRiley Posted January 28, 2014 Author Share Posted January 28, 2014 Setting emissiveColor worked just fine I was thinking diffuseColor and ambient would have taken care of it, but this works Thanks very much, Johnmat.emissiveColor = new BABYLON.Color3(1,1,1); Quote Link to comment Share on other sites More sharing options...
duchman Posted January 11, 2018 Share Posted January 11, 2018 Is there a way to control the strength or power of emissiveTexture/Color? In Blender you can set value on texture Influence - Emit.. Quote Link to comment Share on other sites More sharing options...
babbleon Posted January 11, 2018 Share Posted January 11, 2018 not that I know of, but: mat.emissiveColor = new BABYLON.Color3(0.5,0.5,0.5); ...would reduce the strength. However, PBRMaterial has emissiveIntensity. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 11, 2018 Share Posted January 11, 2018 Live example: https://www.babylonjs-playground.com/#WBS1ZP Quote Link to comment Share on other sites More sharing options...
duchman Posted January 12, 2018 Share Posted January 12, 2018 Yes, with Color3 was pretty intuitive, I was looking for same thing with texture on StandardMaterial, but I guess for some good reasons it doesnt hold emissiveIntensity, I'll go with PBR then, thnx ppl! GameMonetize 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.