Home Technical Talk

How do Specular Level, Specular Color, and Gloss Maps work together?

madmuffin
polycounter lvl 7
Offline / Send Message
madmuffin polycounter lvl 7
I have a glass dome on my car model that I wanted really shiny but with a pin-point specular reflection, like high gloss. My problem is I've only ever used specular maps before, nothing else, and a mostly white spec map alone on the glass results in a very large washed out specular circle, not the effect I wanted at all. I've never used Gloss or Specular Color or pretty much anything besides Specular Level so I am completely lost what to do here.

Are there any good resources or tutorials that break down exactly how all the values of these channels work together?

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    http://wiki.polycount.com/SpecularColorMap
    http://wiki.polycount.com/SpecularGlossMap

    Level is the same control as Color, except it's only brightness of the specular. Color gives you brightness, as well as hue and saturation.

    Edit... some general texture-type resources here:
    http://wiki.polycount.com/CategoryTextureTypes
  • madmuffin
    Options
    Offline / Send Message
    madmuffin polycounter lvl 7
    I had just gotten finished reading over all the links in both those pages but sadly they left a lot to be desired, unlike say the page on NormalMaps which were super inclusive.

    There seemed to be a lot of conflicting info on Spec whether or not you should color correct the gamma thing by making your spec the inverse of the difuse to get white highlights. Some said do it other said don't. I guess that varies from engine to engine.

    I couldn't find any solid examples of how each channel changes what, and my own experimentation didnt yeild much either. Full white spec and gloss is just super bright, full white gross with very low spec just looked like a spec with no gloss at all, so did the reverse of this, high spec low gloss. I can't figure out how they correlate to the Specular Level and Glossiness sliders built into max.

    Checking out that textures type link though. I feel like my fundamental understanding of spec maps is severely lacking. If you are supposed to use the opposite color of the difuse, if the difuse is very bright, wouldnt your spec be very subdued then? If thats the case how would you get something highly specular and lets say neon yellow? I feel like I need visual examples of every possible situation and combination or something.
  • disanski
    Options
    Offline / Send Message
    disanski polycounter lvl 14
    The best think you can do is observe the materials you want to recreate.
    I am definitely not the best person to explain this but i will try any way:
    Specular - brightness determines how strong your specular is- if it is white it will be very strong if it is black - there will be no specular.

    Gloss determines how wide the specular highlight is - if it is white it will be very spread out and wide and if it is black it will be very tight.
    That's about it but in order to understand this you should grab a sphere and apply just simple colors on those maps slots and see what does what.
    Start with no gloss and add white for specular, change that to gray and see what happens and then go to black when you understand that add the gloss map. That should help you understand what is doing what.

    The part with the inverting the specular is done because most surfaces are giving neutral specular color but not all. for those that are when you invert the hue of the specular you get neutral color when you combine it with the diffuse. It also depends from your engine I guess- i use 3 point shader and they have the option where you can determine the specular color without it being influenced from the diffuse so there is no need to invert anything.

    I hope this was at least a bit helpful :)
  • madmuffin
    Options
    Offline / Send Message
    madmuffin polycounter lvl 7
    disanski wrote: »
    Gloss determines how wide the specular highlight is - if it is white it will be very spread out and wide and if it is black it will be very tight.

    Maybe I am doing it wrong because for me, white gloss resulted in an even wider spec then when there was no gloss map like you said, but black did nothing at all. The spec remained huge and washed out as if there was no gloss map applied what so ever. I'm not using the default max shaders, its the xoliul shader 2 that does this. Should I try it with default viewport?

    The rest of your info was very informative though!
  • EarthQuake
    Options
    Offline / Send Message
    Tweak your gloss setting in addition to your gloss map, that may be your problem.
  • Daelus
    Options
    Offline / Send Message
    Depending on the material gloss may work in the opposite way described above. I know the materials in Marmoset work from 0, not shiny at all, to 255, completely glossy.

    In Maya, the blinn shader works from 255 to 0, where as the phong works from 0 to 255. So it does vary, and I'd recommend just trial and error when starting with a material or program you haven't used before.
  • Tavor
    Options
    Offline / Send Message
    Tavor polycounter lvl 8
    It would useful to know how spec maps and gloss maps usually get sampled and interact. Are gloss maps and spec maps just sampled once per pixel to do math or are neighboring/adjacent verts being sampled to get the final result?

    Just recently I had a school assignment where we implemented a (very) basic phong shader, and I just added the spec to the base color.
  • Eric Chadwick
    Options
    Offline / Send Message
    madmuffin wrote: »
    Checking out that textures type link though. I feel like my fundamental understanding of spec maps is severely lacking. If you are supposed to use the opposite color of the difuse, if the difuse is very bright, wouldnt your spec be very subdued then? If thats the case how would you get something highly specular and lets say neon yellow? I feel like I need visual examples of every possible situation and combination or something.

    Artists typically use the opposite specular color because their game renderer isn't set up to use gamma properly. Some info here. http://udn.epicgames.com/Three/GammaCorrection.html

    If you're working in a gamma-corrected game renderer, you usually only color the specular if you have a metallic surface, where you want the reflection to be a different color because some metals bend the color wavelength (gunmetal blue).

    Specular is usually additive, so it brightens the diffuse, it doesn't replace it with another color. To get shiny yellow neon, you would use yellow emissive and a white specular color and a high specular power (gloss).

    I've been hoping to add pictures to the wiki, since pictures are generally better than text. Maybe someday. :(
  • madmuffin
    Options
    Offline / Send Message
    madmuffin polycounter lvl 7
    I think I've figured out how it works now. There is Specular which is how shiny it is over all, then Gloss, which is actually only really more like an alpha map for the Value gloss has, which can go from 0 to 200, the areas on the glossmap which are white are fully effected by whatever value is in that number, and the areas in black are completely unaffected by whatever number I set that value to. Interesting.
  • Eric Chadwick
    Options
    Offline / Send Message
    madmuffin wrote: »
    I think I've figured out how it works now. There is Specular which is how shiny it is over all, then Gloss, which is actually only really more like an alpha map for the Value gloss has, which can go from 0 to 200, the areas on the glossmap which are white are fully effected by whatever value is in that number, and the areas in black are completely unaffected by whatever number I set that value to. Interesting.

    (Oops, yes, you got it.)

    Gloss controls how wide the specular highlight is. Gloss is the same as Specular Power. A high gloss value (generally, white in the map) means the highlight is small and tight. As you lower the gloss value (generally, as you go darker in the map) the specular highlight gets wider and wider. At the lowest gloss value (generally, black in the map), the specular highlight covers the model completely! It almost looks like diffuse lighting.

    Gloss (Power) only affects the size of the highlight, the width. Not the intensity or brightness. Changing the gloss does affect the intensity a little, but not nearly as much as specular level (color).
Sign In or Register to comment.