Light configuration

hello everyone I would like to know how to make the texture of my model look like cotton or any other textile and not like plastic lol thank you. I think it’s a light problem.

Maybe you could have a look at Sheen: Master Physically Based Rendering (PBR) - Babylon.js Documentation ?

Hello @Ilyes_ELAYEB,

It looks like your shirt model is an instance of a StandardMaterial. The var shirt you are using is actually null. There are no meshes in your scene. I think in order to use the PBR rendering stuff that @Deltakosh linked, you will need a mesh shirt model to which to apply a PBR material. This should give you the more ‘cloth’ like sheen you are looking for.

1 Like

thanks it work :smiley:

Hi @Ilyes_ELAYEB and future people,

Here is a quick example playground with a model i grabbed from this site. I used the PBR demo code that @Deltakosh linked to give the shirt model a “less plasticky” appearance. Hope you find it helpful!

thanx belfortk ,
when i want to add image texture , how do i do it
i did this :
pbr.albedoTexture = new BABYLON.Texture(“assets/configurator/textures/whitefabric.jpg”, this.scene);
pbr.metallic = 0.0;
pbr.roughness = 0.5;
pbr.sheen.isEnabled = true;

      element.material = pbr;

You should check the “Use roughness” setting of the “Sheen” section, to be able to set a sheen roughness different from the material roughness. If “Use roughness” is not checked, the sheen roughness used is the same than the material roughness.

Also, “Use albedo scaling” can help to achieve a more realistic looking.

1 Like