How to get rid of directional light reflection on 3D Meshes

Godot Version

<4.2

Question

How do i get rid of the light reflection that is aparant on all 3D mesh objects in godot?

In the image i have a basic CSGBox with albedo set to black, and im getting a light reflection i need to get rid of. It happens in both editor viewport and also while running the game.

1 Like

Give it a new material and mark it as unshaded in its shading mode options.

Okay, so doing that did get rid of the directional light “reflection”, however as the option says, now i don’t have shadowing or real time shadows. Any thoughts?

Shadow is the absence of light. You can’t have shadow without light. What was your purpose? Explain what you want in detail.

Okay, so i am trying to get rid of this weird effect on all surfaces that godot comes with by default.
So in the image here i set the terrain albedo to black so you can better see the “reflection” from the directional light. It has this weird effect that is gradient like. it spreads out from the camera position outward. Almost is if thee was some hidden specularity setting that’s not letting me turn off. Not sure how i can further explain this. Maybe its a default shader feature or something, but it really meses with the color when you are closer to the surface.

That is called “banding” and it is actually a problem with the ways colors are encoded in computers. For games, there is no reason to “fix” this, as it would make everything else very complicated. But that said, there is a thing called “dithering” that can help a lot with this. There are many algorithms to do dithering and Wikipedia has a rather good explanation of the idea and pictures of the results.
In your particular case, it is only noticeable because your mesh is a flat-ish, dark, untextured surface. If that is the intended look, dithering will mitigate the problem. If you intend to have more colors on there it shouldn’t be much of a problem, but you can still do it if you want. You can implement it in a shader and I bet there are some in Shadertoy that have the right thing already.

So read up on banding and tell me if it’s gonna be a problem and if you want me to get you further into that particular solution. It’s a bit complicated, but I’m sure you can manage.

You can disable specular lobes on a single material by setting its specular mode to Disabled (insead of the default Schlick GGX). This also provides a small performance boost. On top of that, you can also set Specular to 0.0 in the Metallic section.

For avoiding banding, see the documentation: 3D rendering limitations — Godot Engine (stable) documentation in English