Will Welker Posted September 27, 2017 Share Posted September 27, 2017 What is the proper method for displaying images as textures without regard for lighting? I am using a picture as the texture for a mesh and I want it to display at its full brightness. I have seen the Playground examples for setting skybox cube textures to have this effect but that seems overly complex if all I want to do is disable lighting/shadow effects. I am using the glTF exporter from Blender and importing the glTF into my Babylon scene so some data is encoded into the glTF file already (it is basically a JSON file). It would be nice to be able to set the parameter in the glTF file. Or if it would make more sense to switch over to the Babylon exporter, I could do that. I am just trying to learn glTF. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 27, 2017 Share Posted September 27, 2017 Hello and welcome! you can take advantage of the disableLighting property (while making sure to use emissive channel): https://www.babylonjs-playground.com/#G1G44A Quote Link to comment Share on other sites More sharing options...
Will Welker Posted September 27, 2017 Author Share Posted September 27, 2017 Thanks Deltakosh, that is definitely the effect I am looking for. It looks like my final answer lies in the Kronos documentation for their Blender glTF exporter. There appears to be a way to use Cycles nodes that will transfer into the glTF file. I will post my results when get it working. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Will Welker Posted September 28, 2017 Author Share Posted September 28, 2017 So after reading the instructions (who knew right?) I was able to get an emissive texture working. Basically, when you download the glTF exporter for Blender, it comes with some .blend files. You can link (or append) some of the node groups in these files. The glTF Metalic Roughness node in the attached image is one of these groups. I used this for an environmental texture mapped to a sphere. The viewport render in Blender was very accurate for what I ended up with in the browser. A number of options appear in the side bar after you have selected File > Export > glTF 2.0. One of these options is to embed images. This embeds your image texture into the glTF file. I thought that was interesting (not necessary though). There are some restrictions for what you can do with these Cycles nodes but there are many options to work with. A few other notes in case somebody finds it helpful: I had to run this from a local development server. The HTML file would not load assets otherwise. I set the normals to face inward inside Blender (Edit Mode, Normals). In the pictured node group, I set the Emission Factor all the way up (from black to white). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 28, 2017 Share Posted September 28, 2017 Thanks for getting back to us! 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.