Having some trouble getting the two specular slots to behave the way I want them to in UDK.
By my understanding, Specular should be specular color, and with a texture map plugged into it, should control the per-pixel color of any specular highlight. Specular power should be just that, a grayscale map that controls the intensity of the specular highlight on a per-pixel basis.
What I'm actually getting is that when I plug anything into just the Specular channel (either the diffuse, multiplied to brighten it up), or my plain grayscale spec power texture, I get a soft highlight with strange falloff that has no color and doesn't seem to actually be affected by the Specular texture.
When I put anything into the Specular Power channel, I get an insanely blown-out specular highlight that has no color and has strange gaps in it as if it has a 1-bit alpha mask over it.
I'm just trying to get basic control of the specular intensity and color on a per-pixel basis.
Absolute bliss would be mixing in a fresnel term so that the falloff would behave properly according to illumination angle. I tried that with the Fresnel expression and one of the Light / Camera / ReflectionVector expressions, but none of them seemed to produce the correct result (and some of them didn't even work at all).
Some moderate googling keeps turning up the same "basic materials in UDK" tutorials. : \
Replies
spec power is from 0-100 so you'll need to add a multiply node with a large value (eg 50) to get a normal highlight.
Oh and I'd suggest having a look at the existing materials that are in the example levels that come with the UDK. They'll give you a better idea of what sort of thing is possible.
So how the hell do I separate out those specular terms? Say I want to fake some sub-surface scattering cheaply with a wide, soft spec using a slightly brighter color as the spec color, or a surface that flouresces when light falls on it (large spec highlight, relatively low spec power, bright neon spec color)? You can't do that without separate control of spec color and spec power...
In Flight Sim we had separate control of spec color and spec power using the RGB of the _spec texture as spec color and 8-bit alpha as spec power (there was a numerical setting for intensity scale). We could also dictate a 4x128 pixel fresnel ramp to control falloff of the specular highlight according to view angle.
That's the kind of control I'm aiming for at the moment.
What you have described is sounding quite possible with the unreal shader editor or did I miss something important?
The gloss map goes into the Alpha of the lerp then you make 2 constant nodes plugin the highest spec value in A and the lowest in B.
I belive thats how it works.
I'm sure it is, I just can't make it work. Assume user error for now... :poly142: With a little more experimenting, I have gotten some noticeable color in the specular highlights, but I'm still not getting much of a distinct per-pixel response from the highlight itself. It almost looks like it's calculating the highlight per-vertex. I'll try and get some screenshots.
Thanks! I'll give that a shot...