Weird "shading" on tree leaves.

Hello! My leaves turn white in the sunlight. Im using HDRP and the trees from book of the dead. Subsurface scattering is turned off.

Hi! Did you manage to solve this problem?

Those tree meshes have manipulated normals at their leaves, you need to recalculate them.

Just assign the foliage diffusion profile in the material of the leaves…that does the job

Nope, that won’t fix it.
it’s correct that there’s no diffusion profile applied, but that only fixes the greenish transmission, not the incorrect lighting on directly lit surfaces, which is caused by the mesh normals.

How?) Is it in the model import settings?

Yes, set Normals to “Calculate”, that should fix it.

1 Like

Most likely you won’t be able to fix it, it comes from the PBR specular shading.
The only way to fix it now is to go to the directional light and disable affect specular.

With forward path, the shader can be changed to disable this spec shading, there there is not way (not that I know of) to disable it on the shader level.

It’s definitely caused by the mesh normals in this case, I had the same issues with those trees from the book of the dead and recalculating the normals fixed it.

Not always. Here I have the unity plane, so the normals are correct.
Here is how it looks from the front:
7736034--972018--upload_2021-12-14_19-25-11.jpg

And here is on the back:
7736034--972021--upload_2021-12-14_19-25-51.jpg

Directional Light - Affect Specular disabled:
7736034--972024--upload_2021-12-14_19-26-41.jpg

There were plans to add support to disable the spec on the shader level, but it seems it is on hold:
https://github.com/Unity-Technologies/Graphics/pull/2556

If you crank up the normal map strength to over 1 the lighting is incorrect too (if the normal map is correctly baked and matches it’s source mesh), so that behaviour is expected.

Agree :wink: But still, the option to completely disable the spec would be nice too.

Hi! Actually, I’m here because of these highlights on the shaders to Tve))) How can we contribute to fixing this problem as soon as possible?

Hey, well there are a few options on our side and a few on unity side:

On our side with tve:

  1. Better meshes and normal maps
  2. Reduce the Main Normal Intensity on the material
  3. Play with Render Normals - set them to Flip or Mirror
  4. In BIRP/URP, I added an option to Disable Specular on the material

On unity side:

  1. In HDRP, Disable Affect Specular on the directional light
  2. If something like this is implemented: https://github.com/Unity-Technologies/Graphics/pull/2556
    This could be added as a toggle same as the Affect Spec on the material.

The biggest problem right now is that some assets are created in BIRP with a Blinn Phong shading, especially stylized assets, and Blinn Phong doesn’t have the PBR implementation of specular highlight, so no issues there. As soon as you convert some assets to HDRP Subsurface Scattering, based on the mesh normals and normal map, you might see these artifacts.

I just got the Terrain Sample Asset Pack from the unity store, and some of the meshes still have these issues.
7736535--972138--upload_2021-12-14_22-2-16.png

But the normal map isn’t the best (way to exagerated)
7736535--972141--upload_2021-12-14_22-3-1.png
compared to some better normal maps
7736535--972144--upload_2021-12-14_22-3-35.png

And all go away by disabling this option. As a tradeoff, I would like to be able to use this on the material.
7736535--972147--upload_2021-12-14_22-5-16.png

1 Like

Thanks! It feels like Unity Technologies does not understand how much these reflections spoil the graphics, we are waiting for corrections…

I don’t think it is unity fault, I think that minimum reflectance value of 0.04 for dielectric specular is the standard implementation of PBR in many engines, probably in all of them, I don’t know all the technical details. But since there are options to disable it, it would be nice to have it :wink:

As mentioned above, a good option is to recalculate the normals, but there are assets where trees are represented only by meshes without .fbx file and such a function disappears, changing the material settings to different normal map modes also fails to get rid of, disabling specular at dir light is also a bad idea because lighting completely disappears from many important areas)))

1 Like

I know, I’m dealing with this every day :smile:

WE NEED MORE TOPICS AND MAYBE THE DEVELOPERS WILL HEAR US AAAAAAA!!!11 :smile: