Shadowed PBR objects still display specular 'reflection'

Hi,

First off, apologies if my terminology is incorrect, but basically, I’ve run into a bug after switching over from Lux + Sunshine in Unity 4, to default Unity PBR + Shadows in Unity 5, not sure if this is intended, or if there’s any way to fix it.
Imgur
As you can see, when shadowed, the reflection/specular highlight of the directional light still displays. Previously, in Unity 4 with Lux/Sunshine (not sure which affected it), this specular highlight would (as expected) not be displayed, ie: Imgur: The magic of the Internet

So, is there any way to make shadows in Unity5 cancel out any specular/BRDF/whatever the correct term is highlight?

This depends on your scene lighting settings - even in shadow an object can still receive some specular highlight from the indirect (sky) light. Simply reduce the ambient intensity from the Lighting panel. If you have a static object then it can also depend on the General GI: direction Mode. If it is dynamic you will want to place some lighting probes to enable you dynamic object to pick up lighting, shadows and GI including specular. Further info can be found here:

This isn’t related to ambient lighting (still occurs with ambient at 0/any value), it’s exactly where it would be as a highlight from the directional light, and the highlight looks very unnatural/out of place - here’s a better example: http://imgur.com/QjuxeZa
Light probes don’t change this, and I’m not using GI at all.
You can’t see the sun’s reflection on an object when it’s in shadow, so why is this the standard here? Feels like a big step back to what 3rd party solutions can already do with Unity 4…

@OllyNicholson So, just to double check, this is intended behaviour, and just there for mobile performance reasons? Also, what would I have to look at changing to get this fixed (eg, would it be possible to fix it by editing the standard shader?)

Could be the standard reflection probe if you didn’t adjust that. The standard mat uses that.

Findus raises a good point - PBR (Standard Shader) materials reflections fall back to the skydome if there is not specific reflection probe - as defined in your lighting settings, the power of which is dependent on the physical material properties (Gloss/Spec/Metallic). You can drop reflection intensity to zero in the Lightmapping pane to check. Then to remedy this to be more physically correct properly you would add a reflection probe at this position, which if mostly in shadow would have the bright parts of the environment occluded, you could also adjust your material bitmaps or slider values accordingly to eliminate reflections if you do not want them for this material. For more info check this blog:

1 Like

Sorry for resurrecting this post but I had a similar question… is there a way, without using a bunch of reflection probes, to just have the shader dim (or remove) the reflection if it is in shadow? Is there a way to modify the Standard Shader to have it basically use a reflection intensity of 0.1 or just zero for pixels that are being affected by a shadow?

I have this same problem. Turning off environment reflections, changing intensity to 0, it doesn’t matter. This seems like a bug.

Here you can see the problem really bad with my 100% smooth black material.

Here is the sun behind a pillar, the ground is black, 100% smooth.

And the reflection below the pillar, which is in shadow, you can barely see the shadow outline but it is there.

Sorry for bumping up this post again as no actual reason is answered.
I think the reason why PBR doesn’t mask out the specular highlights in shadows is it can’t tell which shadow is casted by which light in the default render pipeline.
Let’s imagine scenes like these:
The ball is in the second point light shadow but it should have highlights from main light.
7755081--976113--Snipaste_2021-12-22_16-36-00.png
And vise versa. The ball is in the main light shadow but should still have highlights from the second light.
7755081--976119--Snipaste_2021-12-22_16-42-06.png
So in this situation Unity think you should use reflection probe to weaken the wrong highlights.
(UE4 also uses SSR to do it)
Well if you ensure you only got one directional light, you can just remove the highlights in shadows.

But in theory we CAN tell which shadow is casted by which light because they are calculated from different shadowmaps.
But the render pipeline is mixing all the attenuations into one value.
Maybe they will fix this or maybe it’s not worth fixing.