Self Illuminated Texture - how to?

Recommended Posts

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".
Thanks guys

Share this post

Link to post
Share on other sites

I'm not sure that will work, but have you tried to set an emissiveColor ?



I've just found that StandardMaterial has a property called emissiveTexture, you could try it ;)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.