PBR material "glossiness"

I’m having issues with PBR material glossiness/reflectance while using directional lights.

I’m using directional lights to generate shadows to make the 3d model look more realistic, but these directional lights seem to make my PBR material look shiny. Screenshots attached show how my material looks when the camera is facing towards the directional light, and away from it. Basically I would like to get rid of the reflectance in the 1st image (the material should look like a carpet, so no reflectance).


The PBR material has an albedo texture, emissive texture and bump texture applied (I took pictures of the material with my smartphone and created the bump texture using Materialize, link here: Bounding Box Software - Materialize). I’ve tried playing with the “roughness” parameter of the PBR material, but it doesn’t seem to resolve the issue. I’ve also tried adding a clearCoat layer, and setting the roughness of the clearcoat to 1.

Here is a PG of my environment: https://playground.babylonjs.com/#ENLTM1#1

What about modify specularIntensity of the material. and add a emmssive color ? https://playground.babylonjs.com/#ENLTM1#2

Adding @PatrickRyan :slight_smile:

@MaticErznoznik, in looking at your playground, there are a couple of things that stand out to me. The first is that you have an emissive texture on your material, which seems like the texture may have been loaded into the wrong channel mostly because the emissive color is black meaning your emissive texture is doing nothing for your material. This is the emissive texture loaded into the material:

Maybe that texture is supposed to be a reflective flake in the textile/thread but if that were the case, you would want this loaded into the metallic channel.

The second thing I noticed is that you have no roughness texture on the material. If you are setting a factor for roughness, you will get the same roughness across the entire surface, no matter what the normal looks like, which will make the material feel like plastic. For almost every material I make, I will use a roughness texture to control how the light reflects off the surface as a roughness factor really isn’t enough to make a material feel like a PBR material.

As an example, I had done a textile example for our sheen feature in PBR, and this is the roughness texture I authored for it:

Notice in all cavities in the surface (where surface normals are pointing toward other surface normals), I have a higher roughness causing a broader specular highlight and on the convex surfaces, I am using a lower roughness value tightening he specular highlights. None of these values are below 0.5 for roughness as it is a textile (the cotton parts at least) and still needs broader specular highlights. The more plasticy parts of this technical fabric do have a lower roughness to show contrast and feel a bit more like a coating on the fabric.

It looks like Materialize creates a smoothness texture (which is the standard used by Unity) where we use roughness. Simply inverting that texture should give you the correct input for roughness on the material. But if you don’t have a roughness texture generated from Materialize, it would be best to author one. If you can use your normal texture when authoring, you will be able to use the surface bump to reinforce your texture, but even creating a roughness texture out of layered noise to break up the regularity of the specular reflectance will help sell the material as a textile.

I hope this helps, but please feel free to ping back with more questions.

4 Likes

Thank you for your inputs, a combination of musk and Patrick’s answers seems to work well. I set the specularIntensity and created a roughness map with Materialize.
PG: https://playground.babylonjs.com/#ENLTM1#5

It’s still a bit unclear to me, what the roles are of emissive color and emissive texture. In the PG above, I’m setting both the texture and the color. So if I understand correctly, the color should completely override the texture? But then if I comment out the part where I’m setting the texture, the material looks completely white.

1 Like

@MaticErznoznik, the two parameters, emissive color and emissive texture, are both used in the render calculation by multiplying together. In this sense, you could use a texture as a mask for your emission by passing a black and white texture. Only the areas of white will be emissive. Then when you assign an emissive color, the two are multiplied together and you are able to color areas of emission within the material. This allows you to do things like animate the color of your emission based on scene input while only needing one emissive texture.

In your case, your emissive texture had areas of white, grey, and black in it, but your emissive color was set to black so when they are multiplied together it is like there is no emissive texture at all. This is certainly a valid path if you wanted to control the level of emission with the color and in some cases eliminate emission all together, in which case you would pass a black emissive color. However, if you aren’t doing that, and your emissive color is black in all cases, your material won’t be optimized because it is doing an extra multiplication on every step that isn’t needed as well as requiring the download and storage in memory of the texture.

I hope this clarifies what is happening with emission in materials, but feel free to ping back with more questions.

4 Likes

Ah of course, makes sense. Thanks again for all the help.

1 Like