Hey to all,
I was recently trying to recreate a Half-Lambert shader, but for some reason, can't seem to be able to execute it properly.
What I mean is the darker areas of my model stay dark.
I'm guessing, that I need to use CustomDiffuse slot? However, I seem to be lacking in tutorials which actually explain how the CustomDiffuse and CustomLight slots differ in use or compliment each other, especially since most tutorials only deal with the CustomLight.
Anyone has any info in this regard? Cheers and thanks in advance.
Replies
Then just use a dot product of light vector and surface normal, clamp it to 0-1 range, multiply with diffuse texture and plug it in CustomLighting slot.
Now since you're doing half lambert you just have to alter/bias the value that dot product produces.
Here's an example for phong: http://udn.epicgames.com/Three/CustomLighting.html#Reconstructing the Phong lighting model for dynamic lighting
Try placing your object in a map with your shader on it to ensure how it looks. IIRC the material viewport shadows the object even when its a custom type, so you may not be seeing accurate results.
Related to the previous question, does UDK allow custom light attenuation and transmission?
I'm having problems with these two, I'm getting a transmission like effect on my model without evening having a transmission network setup, and my attenuation is radioactive.
My shader is a standard Lambert with added Specular, Gloss and Ambient.