Today, I’d like to introduce you to the Texture Inspector.
I’m an intern on the Babylon.js team and I’ve been building this tool for the past 10 weeks. It’s been live in Babylon for over a month now, and it’s reaching a stage where we (the Babylon team) would love to hear the community’s thoughts.
The Texture Inspector is designed to enable you to debug your textures inside of Babylon. Users often load in textures and find that they do not appear as expected. Unexpected results can be related to transparency, UVs, or unique texture types such as cubemaps. The Texture Inspector allows you to investigate all those issues and even fix some of them in-engine. You can access it by opening the inspector and selecting a texture:
The properties bar on the top gives you control over the size of the texture, and allows you to peek at pixels to see their RGBA values. It also allows you to step through mipmap levels, and upload or download the texture.
The toolbar on the left unlocks the ability to edit your texture. You can paint directly on to it, you can flood fill regions, and you can adjust the contrast/exposure of your texture. You can control the color and alpha you’re painting with there as well.
The channels list on the right allows you to manipulate RGBA channels. You can click on the eye icon to hide a channel if you don’t care about the information contained there. You can also click on the channel icon itself to “lock” it, meaning edits will not affect that channel.
There are also several keyboard and mouse controls available:
- Mousewheel or +/- allow you to zoom in or out
- The middle mouse button allows you to pan across the texture
- Control+A selects the entire texture
- Escape deselects everything
- Control+S saves the texture to your local machine
- Control+R resets the texture to it’s original state
Let me know your thoughts! Both bug reports and feature requests are welcome. If you have a usecase for this tool, post it here