Cant Load MetallicRoughness Texture in Webstorm

Hello everyone,

I am using webstorm and I create a glass material in it. But I want to have a pattern roughness on that glass. I achieved this effect in Playground but i cant do it in webstorm

If i wrote this line in webstorm, it doesnt work but if i delete this it will work perfectly. scene without this line of code is something like this. (in picture - 01)

glass.metallicTexture = BABYLON.Texture(“textures/Dream_02.png”, scene);

In playground there is just one texture applied (same texture actually) on MetallicRoughness slot and some tweaks IOR and Roughness just it. (in picture - 02)

Thank you and have a good day.

Hello and welcome!
Could you kindly share the Playground link in order to have more clues to what is going on?

Hello Labris,

Actually I am pretty new this kind of coding stuff, but I can share link and texture. I am just plug the texture on metallicroughness slot and change metallic workflow’s roughness parameter

This is the visual studio codes with assets. I dont know how to share this setup sorry for that.

Here is the PG -
Is it what you’d like to get?
In your code -
glass.metallicTexture = BABYLON.Texture("textures/Dream_02.png", scene);
one parameter is missing (because this is the new instance of Texture object):
glass.metallicTexture = new BABYLON.Texture("textures/Dream_02.png", scene);


Hi Labris,

I knew there is a noob thing that i missing. I can’t thank you enough.

1 Like

Don’t worry, this forum always helps :slight_smile: