Jump to content

Self Illuminated Texture - how to?


neoRiley
 Share

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".
 
Thoughts?
 
Thanks guys
Link to comment
Share on other sites

  • 3 years later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...