Specular dot from lights when smoothness is 100%

Hello,

When using the unity standard shader, a “dot” is showing for lights when the smoothness value is set to 100%.
The screen shot is showing what is happening.

The top red circle shows the dot for a point light which is illuminating the room.
The below red circle is showing the spot light from the player’s flashlight.
I dont know if this is some error with the Unity standard shader.
There was a thread about this a long time ago, but I can’t find it.

Does anyone have any tips on why this happens?
I am using Unity 5.2.
I heard there was some correction to the smoothness calculations now in Unity 5.3+. Does this relate to this issue?

Thanks,
j

I could be wrong, but I think that’s specular aliasing. I haven’t dealt with this before but I’ve seen it around.

I do get specular aliasing. But I don’t think the two dots are from specular aliasing. The normal map is turned “off”, so there shouldn’t be anyway the aliasing would occur.

Well… Why is it wrong?

I can only assume by your comment that you’re implying it ISN’T wrong. Is this correct assumption?

If so, you could elaborate a bit more. Or simply say this is to be expected for the standard shader in Unity.

It’s the specular from the light, right? Appearing as a dot when smoothness is at max sounds “normal” to me, no?

I figured out the problems I was having with specular issues. I needed to start creating specular maps using a program like CrazyBump. The texture is inputted into the program, and the specular map is generated. The file is passed to the Unity standard shader. The specular artifacts no longer appear. When not passing in these files, the specular artifacts appear like crazy.

And then, the normal map is generated from the specular map, not the actual texture.

I have to go back to everything I’ve done here, and stop relying on the smoothness slider on standard shader.
.

Well, specular maps are slightly outdated concepts now. It’s all about the roughness maps these days.

Isn’t the roughness map a specular map, but with the alpha channel used for the roughness?
This is how the manual describes it: Unity - Manual: Specular mode: Specular Property

On the specular maps I generated, I ticked “Alpha from grayscale” on the image, now the roughness and freznel seem to be working.

The “specular” map for the Standard shader (if you’re using the standard specular setup) should usually be a flat RGB (56, 56, 56) for almost all non-metal surfaces, maybe a similarly dark slightly blue over the tiles. All the “action” is in the alpha of the specular texture, that’s the smoothness map, and that should have significantly more range in values with the grout being a noisy near “black” and the tiles being nearly “white” depending on how shiny you want them. Since you want very different values from the specular map’s color and alpha channels using the “alpha from greyscale” isn’t a great option.

1 Like

The program I’m using, which is a $200 program, does not generate information on the alpha channel. It is just generating the RGB portion of the specularity file. After almost two days, I was able to figure out how to use GIMP to copy the RGB channels to the alpha channel of a new specular map.
http://graphicdesign.stackexchange.com/questions/8397/gimp-using-an-image-as-the-transparency-layer-of-another-image
The hard part is figuring out how to not touch the RGB when adding the alpha channel in GIMP.

The tiles arent a good example, but I was able to use the process for another model. It is a metalish door, with dirt on the outside. The goal is the dirt has full roughness so it doesn’t pick up the reflection probe (the green light is light the refl probe is capturing):

I’m just happy now that I’m not getting all of the specular artifacts anymore with this approach.
I wish the process was more automated in Unity.

j

Yeah, Gimp’s handling of alpha channels is kind of terrible. That’s not really Unity’s problem to solve (pretty much all professional graphics tools handle alpha channels much more gracefully). I’ve been using Photoshop to add unique data into the alpha channel for over a decade now, and the developers of Gimp simply haven’t bothered to make that interface better.

1 Like

Absolutely agree. I find it very frustrating working with the whole layers / alpha channel in GIMP. It is very confusing. I don’t like to complain because it’s free though. . I don’t know if it’s a bug in GIMP, but if you try to lock the alpha channel from modification, you can no longer touch the RGB for some reason. If unity added an extra slot for the roughness map, it could automatically add this data to the alpha channel of the specular/metallic file, treating these as two separate files.
https://feedback.unity3d.com/suggestions/unity-5-standard-shader-smoothness-roughness-map
https://feedback.unity3d.com/suggestions/separate-property-for-roughness-texture-in-standard-metallic-and-glossiness-in-standard-specular-shader
There is alot of votes on this.

And it’ll never happen, not officially. 5.4 did add the option to use the albedo texture’s alpha for roughness, which is nice, and done for the same reason why it was in the metallic / specular alpha to begin with. Personally I’m surprised they didn’t force the AO and Height textures into a single texture too.

Each additional texture read you add to a shader slows it down a little, and there’s a limit to the number of textures a shader can read. The maxed out Standard shader already comes close to hitting that number and on lower end platforms features were cut explicitly because they’d gone over the limit.

The alpha channel is also a higher image than the RGB in a DXT5 texture.

A plausibly “better” solution, and one that Alloy uses, is to use an asset generation tool within Unity to merge textures together. Unity could conceivably do this for the Standard shader, but again this is more an issue with Gimp being terrible with alpha channel manipulation and user education than something that needs to be fixed on their side. Alloy’s method also has some possible issues with asset reuse causing memory usage bloat.

Unity should just expose a channel picker on texture inputs and then swizzle appropriately in the compiled shader. That’s much less workflow intrusive (and the last thing we need is another half-baked system tacked on).

1 Like

People are already complaining about running out of keywords, and how much space the standard shader uses in a project . (It can use almost 400 megs by itself!) Adding more options, especially an open ended swizzle option which could add several million variants isn’t a good solution for something that can be fixed trivially in the content, or by writing your own Surface shaders.