Okay so yeah, A friend of mine asked me a simple question. “How can we change the specular color?” Sooo… after a bunch of experimentation and searching around the net, I just couldn’t help them out very well.
I’ve been moving a project over from UDK for the past 10 months, and I have not had time to look at the specular aspect of the unreal 4 shader system yet since the materials I set to this point have not needed any specular at all. Although some future materials will need the colored specular. And my friend is coming over from Unity, and we both want to be able to match our previous shader styles, We are not going for photorealistic physically based results here!
We really need to find out how to control the specular color so that it can changed independently to the color that we like. I noticed that the specular color can be changed by adjusting the metallic attribute, but it only seems to be changed based on the base color of the material.
So for example, if I have a blue base color than a blue specular is produced as the result…
(Also looked at lights, sure we can change the light color to affect spec color, but I don’t see a specular color independence from main light color there either, unless I missed something.)
Id like green Spec! Yes Green!, or black,or, or, or, yellow spec with the blue base! yay!
(nice color choices, huh?)
I was wondering if anyone has any suggestions or workarounds for the issue, because i’d really like to know where our artistic freedoms have wandered off too with the removal of the spec color input vs UDK?!
Yes, I figured as much, but there must be some kind of hack like work around.
I’m sure, that there must be some people working on projects that don’t really need that type of rendering, and perhaps they’ve found some way around it.
Fortnite actually used to allow for separate color specular a few years ago but they changed it to be like the rest of the engine now.
If you wanted to try this out, you could actually make it work by taking in the Subsurface Color pin since that is unused for the standard shading model. Then it should be relatively straightforward to access the subsurface (aka CustomData.RGB) values and use them to replace (or maybe just multiply by) specular.
But Kalle is definitely right that you can’t do this using the Custom Node because of the deferred renderer. It may be possible with forward rendering but the way its set up doesn’t make it easy to add per material lighting tweaks yet AFAIK. That is something I would like to do research on for other reasons though - such as writing a custom texture based BRDF shading model that could help to have more unified methods between programs that have more advanced shading capabilities. Having a texture based BRDF would actually allow you to have any kind of specular response you want, its just a bit trickier to use BRDFs as actual texture maps because then you need something called Spatial BRDFs that allow the shading to vary per pixel.