Reflection based on environment texture

Hi, Please have a look into the link shared below.

In this PG, I have added two planes with different materials into the scene. Both are black color. One is made as unlit and another one is not. While rotating the camera, based on the environment texture lights, the color of one plane is changing to grey color like specular reflection. How to control this. I don’t need this much of reflection. how to handle this.

Maybe tweaking environmentIntensity could be enough for your need?

Also, if you don’t want PBR rendering, don’t forget that you can also use StandardMaterial

2 Likes

Since this is black color, we can adjust the environmentIntensity of the material. But, if the color is any Bright Color, then we can’t use this method.

I am curious why you want to control this. If you are using a PBR material, I’m guessing you want this material to behave physically which is what the shaders will try to do for the settings you’ve provided.

If you want to stay physical but really want to change the reflection behavior, the only way I know of is to change the F0 factor which will modify the amount of dielectric specular. I don’t know what kind of materials you are trying to represent, so it might not make a lot of sense to do this.

@sebavan in case he has other thoughts.

1 Like

I would not use a pbr material for full black as full black at least in any environments with light does not exist.

As @bghgary mentioned you might trick it, but it is still an expensive (perf wise) black material :slight_smile:

1 Like

Note that the “blackest black” material even made can capture 99.995% of light :smiley:

4 Likes

I am sorry, I think I missed to communicate the right thing, My aim is to not achieve the black color. Actually all the materials are affected by the environment texture light heavily. I need to just reduce that reflection. For example purpose only, I just made it with black color material.

I can’t speak for other people, but I understood what you meant. I don’t, however, understand why you want to.

1 Like

@bghgary . It is very happy to know that you are understanding my requirement. Actually, I am having a Platform model. Platform is within a city. I am having a car model near to the platform. An arc rotate camera is placed and the target of it is fixed at the car. I have applied an albedoTexture for that platform model and the roughness of that has been set as 1. This is my scene. Now If I rotate the camera around the car, the platform is being very darker in one angle, and very very brighter in another angle. And the environment texture is having a yellow tint. So that is also mixed in some angle. I know, this is the reality. Everything will be changed in different different angle based on the environment light. Still, it is looking awkward in the project. So I want to have the effect, but not as that much it is giving normally. I just want to reduce that.

This PG https://playground.babylonjs.com/#BH23ZD#364 uses:

  1. a composite of a hemispherical light with a StandardMaterial just below your current PBRMaterial
  2. the hemispherical light only lights the StandardMaterial not the PBR
  3. and set the PBRMaterial alpha to something less than 1.

So you get some of its PBR effect lighting but not as strong as before. Is this closer to what you want? If so then maybe others can figure out a more elegant way of achieving this…