Well, at the end I was able to achieve both Cook-Torrance model and the use of roughness in the default Phong shader in UDK, so everything is ok now :D
This thread started with an old version of Unreal, before they had PBR workflow. But nowadays, all the game engines use PBR by default. So no need for all these workarounds. What exactly do you want to achieve?
By default a one-minus node in UDK will not give you the expected inverted values of a texture sample, because the one-minus node works in linear space whereas the texture sample is in gamma space. Here is a graphic illustrating the problem and the fix: It appears you are only getting correct inverted results because you…
Awesome, looking forward to this. Btw, I just discovered how to get custom lighting to work perfectly with lightmaps (while still maintaining custom specular). While it may not be ideal for memory, the trick is to use toggleable lights with indirectlightingscale turned to 1 in their settings (they default to 0, making it…