Oren-Nayar is another alternative diffuse model. It takes the roughness of the surface into account, making it quite suitable for brick, concrete, sand, or numerous other materials. By parameterizing the roughness , we can have a suitable model for everything from a perfectly smooth surface (like lambert) to a rough surface like concrete or chalk.Below you can see Oren-Nayar with 100% roughness on the left and Lambert on the right. Rougher surfaces have a slower falloff which Oren-Nayar takes into account. If we were to go back to 0 roughness it would regain the hotspot like lambert, simulating a smooth surface.

Here it is applied to the brick i use way too often to test things. As you can see, Oren-Nayar gives us the matte look we would expect from brick.
Unfortunately it is somewhat expensive (pushed me into SM 3.0 with no spec…Yikes!) so i’ll be looking for cheaper alternatives.

Maya CGFX File:

orennayar.cgfx
File Size: 6 kb
File Type: cgfx

Download File


Unity SHADER File:

orennayar.shader
File Size: 9 kb
File Type: shader

Download File


Leave a Reply

Your email address will not be published. Required fields are marked *