I’m trying to create a glass material. The way I configured it is the following:
Shader: Standard shader (specular)
Rendering Mode: Transparent
Albedo: black color with 90 in alpha
Specular: very dark grey with a value of 35 Smoothness: 1
I’m getting something like this on iOS for a nearly flat surface:
In the editor it shows up as a white pixel at the same average position. The white dot is due to the directional light reflecting off the surface. This dot becomes a blurred disc when you lower the Smoothness value. On iOS a lower value produce the same sort of artefacts even if those are less visible. I first used that as a workaround but it doesn’t produce the best effect.
Is there a way to prevent this reflection dot/spot/disc from happening?
I have actually got the same result with a non-transparent material some times ago. It seems to be happening every time I use standard shader, but is most visible in the case smoothness is set to 1.
By the way I’m using Unity 5.0.1, OpenGL in the editor as I’m on Mac OS and OpenGL ES 3 on the targetted device.
Without modifying unity lighting pretty much no.
It’s because the sun is treated like a infinitely small light source for specular reflections, this resulting in a dotty reflection. (And often very flickery).
One way around this is to treat directional lights as a non-point source.
Another is to clamp glossiness for the BRDF. (While still letting the ambient specular go to perfect sharpness).
My guess is that most developers/artists simply avoid using so high smoothness values.
Thank you for your response and sorry for the late reaction. I’m aware most surfaces don’t have such smoothness, at least far fewer than we think. In my case though, glass seems to me to be a good candidate. Anyway, I’m not really an expert in shaders… maybe could you give some more directions on how to tinker with BRDF… I’m pretty sure you already have posted some stuffs about that but I can’t put a hand on it right now. I suppose I need to create my own shader from the standard one and modify some parts… I’m not sure on how to do it correctly, I’ll dig deeper in the forum though! Thanks.
Oh and I forgot the essential: are you telling me the result I get, shown in the picture above, is to be considered normal? Again this is the result I get on iOS. In the editor it’s perfectly smooth, a pixel in the case of smoothness = 1, a smooth disc below… which is perfectly fine. It gives quite similar results (though a little different) until I go below the 0.4 in smoothness (where actually the disc gets totally blurred out in editor).
The setup is simple: a directional light, 5 quads, each having its own material applied with the standard shader (specular setup) (same as above actually) with the indicated smoothness value. Choosing opaque, transparent, changing to standard shader has no influence.
Umm, what comes to mind for me is how your normalmaps look?
As the size of the highlights isn’t that far off. Feels to me more like a broken/bad normalmap.
No news on the subject from Unity. I had sent a bug report and I will certainly redo some test with last version to confirm it’s still an issue. I “worked around” the problem by lowering the smoothness but never managed to get rid of it What happened for you @echo4papa ?
Just to make this more current again: I am facing exactly the same issues here, so there hasn’t been a fix yet, i believe? Running Unity 5.5, Metal deferred/linear rendering
The same thing appear for us :
Unity 5.4.4, standard shader on a flat surface, no bump just an albedo map and smoothness to 1 (metallic to 0)
when we try to do glass or chrome
Any idea of what’s happen ?
Same issue on Mobile (Andoird and iOS). Simple scene with a cam, a Directional Light, and a plane with Standard Specular Shader: Specular set to white, and smoothness at 0.9.
Same issues here on new mobile iPhone X with iOS 11.2. The directional light blob has really weird artifact with standard specular shader with high smoothness value on flat surface. Any ETA on fixing this from Unity?