Home Technical Talk

Specular Material/Surface Examples

polycounter lvl 18
Offline / Send Message
odium polycounter lvl 18
Hey guys,

I'm trying to put together a list of example, default variables for people to use with our material system, so that surfaces will at least look some what decently. At the moment I'm usuing set values for power/scale (as well as in some cases a gloss map) for a whole host of different surface types, such as metal, wood, paper etc.

Granted I won't be able to get the exact values, simply because this is for my own engine, and I'll have to re-make them. However, what would be great is at least some pictures oh how certain specular effects look, or examples of them in real time? Are these availble anywhere?

I'm finding a lot of my surfaces tend to look the same or a little off, and would love a better base for myself to work from.

Thanks guys.

Replies

  • Farfarer
    Options
    Offline / Send Message
    How are the shaders set up?

    Depending on how complex and realistic the shader is (i.e. spec? roughness? gloss? fresnel?) you'll get pretty different results for the textures.
  • equil
    Options
    Offline / Send Message
    one of the dontnod programmers released a sort of ok chart of some gloss values for use with your typical "physically based" shader. http://seblagarde.wordpress.com/2012/04/30/dontnod-specular-and-glossiness-chart/. I think kodde made a chart like this with his similar shader.

    what i usually do when i'm unsure is find a material that's pretty close to what i want with a known IOR (index of refraction), perhaps using wikipedia or this site http://refractiveindex.info/, and then i just calculate the correct specular value using a simplification of fresnel's law

    (1-IOR)^2 / (1+IOR)^2 = f0
    where IOR is a number over 1
    and f0 is the resulting spec value

    for example water has an IOR of 1.333. if you plug that into the equation you get 0.02. to translate this into an rgb value you do this little funky thing to it

    pow(f0,1/2.2)*255
    1/2.2 is needed to move this to gamma space. textures are usually authored in that space so only remove it if you know what you're doing.
    this gives you a (grayscale) value between 0-255, which i'm sure you know how to use. in this case we get 43.

    that's sort of the physical base for specular values at least. of course it depends on how ~correct~ your shaders etc are, but it's a good reality check. obviously you shouldn't feel restrained by the laws of physics, and if you're not using physically based shaders then there isn't really a base to go by beyond reference.

    btw, this only holds for objects without colored specular (or technically "conductors"), but calculating it for those is pretty complex.
  • odium
    Options
    Offline / Send Message
    odium polycounter lvl 18
    That may be a good pic to use, thanks.

    And as for what we use, we use colour spec, with gloss maps, as well as specular power and specular scale. We also allow bump mapped env mapping as well.

    EDIT: Of course, normal mapping, rim lighting, parallax, subsurface scattering etc are all in too.
Sign In or Register to comment.