UDK Custom Lighting Material examples

Here are several material examples that I have of my UDK Cook-Torrance Direct Lighting shader.  It works great for non-reflective surfaces.  The images in the gallery below have more information as to what is shown in each.

One of the main things I want to show with these images is how the F0(SpecAlbedo) and Gloss value impact these materials.  I have left up the material instance that is assigned the spheres shown so that the values can be seen for different looks.

I also have an image showing the 3blend material that I used on the Sphere with the grass, dirt and concrete.  This isn’t an especially complicated shader but it does have threshold based vert painted blends.  Another thing that I want to mention is how I am pulling my F0 values.  Since one of the main advantages of a shader like this could be the physically based nature.  If you pair a solid ruleset with this, you can control all of your specular response in your game/scene etc.  I wasn’t able to find an easier way to setup a list to pull F0 values from so I made a 32 x 2 pixel image with each pixel being a different surfaces F0 value.  Now that I have a controllable list to pull values from, I just offset my UVs a fraction.   As the F0A parameter value goes up, so does the pixel that is being looked at on that texture.

Another part I would like to talk about on the 3blend material is how the glossMask works.  In that image you will see description tags for glossMaskA, glossMaskB etc.  These are textures that give me a 0 to 1 range in specular response across a surface.  In a perfect world a surface might consist of just a single surface type but with games, being able to sell layered surface types can be a huge visual gain.  This also allows for easy iteration since material tuning may only require adjusting some values instead of changing a texture!  I now take this glossMask and use it to LERP between 2 parameters.  For the Gloss this would be GlossValueA and GlossValueB.  Wherever my glossMask is black I will have my B value and where white, the A value.  Another thing is that this only needs to be a mask so you could combine several masks into a texture and save on texture fetches.

 



Comments are closed.