Leather Shader?

Hi,

I have need to make a leather shader and it should be as realistic as possible and run in realtime.

I have a normalmap and a basemap texture for my leather. I also have a radeon 9700 to work with. Is there any better way then just blinn-phong bump mapping? Is it for example possible to do a more complex light equation in the pixel shader to make it look better?

Any help is appreciated.

Thanks, Ninja

From what I’ve seen on leather, typical Phong is actually fairly good for it, assuming you get enough normal deviation in the veins in your normal map. I believe the trick might be to have a really high resolution normal map.

Also, make sure you balance your ambient, diffuse and specular terms (and exponent) to achieve the specific look you want. It may take a little tweaking (which is much easier if you wire the shader up to sliders in your GUI).

Ok thanks!

With Phong you mean the Blinn-Phong bumpmap with the H.L equation?

//Ninja

I think that would work, but using a reflection specular (phong lighting) would probably look better.

This paper here: http://www.cgl.uwaterloo.ca/Projects/rendering/Papers/#homomorphic

has some good BRDF leather effects. (Need a GeForce3/4 to run the demo as you need register combiner extension)

This is also discussed in the book real -time shading: http://www.amazon.com/exec/obidos/tg/detail/-/1568811802/104-4936853-0045554?vi=glance

Ok, thanks!
But why should the reflection specular (phong lighting) be better?

//Ninja

Hi,

I suggest you blend between two lighting models. When the material is viewed up close, you use a normalmap+texture combination that represents the grain. You can have a relatively high specular exponent here.

When the material is viewed so far that you can no longer see the grain, you should give up the normal map and use a lower specular exponent. Try to adjust this exponent so the highlight matches the size of the collective little highlights from the normalmapped texture. This should give a far better approximation of the material than a mipmapped hires normalmap.

-Ilkka

Ok, so if the distance is big Ill use a normal texture with less specular highlight right?

-Ninja

Not exactly less specular, but a less sharp highlight. You see, when you have lots of small bumps, the area where you get highlights will be relatively large even if the single highlights are very sharp.

When the small bumps get mipmapped out, you’ll get only one highlight which is too sharp unless you do something about it. A possible alternative for seperate shaders for different distances might be generating the mipmaps so that they still contain the same range of normals as the original map. I don’t know how good that’ll look. Quite noisy, I think, but that’s not necessarily a bad thing.

Or then just don’t use mipmaps.

-Ilkka