Home Technical Talk

no games use coloured specular

134
mod
Offline / Send Message
rooster mod
this is what a programmer said today. Maps that is, spec maps.

what games do you guys know for sure use coloured spec? I'd like to make a list..

is it really just something we indulge in for our competitions? who uses them in production on what game?

Replies

  • Ark
    Options
    Offline / Send Message
    Ark polycounter lvl 11
    Doom3
    Quake4

    Are two for sure, i'm sure there are plenty more like most of the new UE3 powered games.
  • vahl
    Options
    Offline / Send Message
    vahl polycounter lvl 18
    yeah Doom3, Quake4, ETQW, UT3, GoW1&2, Bioshock...seriously, he bullshitted you man

    is that a lame ass excuse he tried to find to avoid programming color spec you asked him for ?

    I personally used this in production for the past 5 years, only 1 game out of 6 I worked on didn't handle them.
  • monster
    Options
    Offline / Send Message
    monster polycounter
    We had color specular in Bloodrayne 2, Infernal Engine. So you can probably count in any game by Terminal Reality since that game was released.

    Also, at Robot we use the Vision Engine. The spec map's RGB is the color and the alpha is the power. Link.

    When you talk to the guy again, don't rub his face in any information you find. Just present the information and maybe make a comparison image of a render with spec color and without it.
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    And then once you show him an long list of AAA games using them, he will ask you to prove him that you really needs them, because after all, an object shines or not, period. And then! He will start telling that maybe you should have a different shader for each material type because REALLY colored spec doesn't make sense.

    Yep .........................
  • eld
    Options
    Offline / Send Message
    eld polycounter lvl 18
    maybe he had a point, but put it out in a really dumb and unfactful way :)

    coloured specs are awesome, but a 1 channel spec saves quite some memory!

    monster, your post sounded like a nice way to have the best of both worlds.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    perna wrote: »
    Don't. Let an art lead deal with it

    hmm not really the way it works here.. art manager tends to agree with what's easiest (which tends to be what the programmers dictate). you have to stick up for these things if you want them
  • Mark Dygert
    Options
    Offline / Send Message
    I think it would be easier to put together a short list of games that don't.

    Colored spec is a hack fix for poor material definition and lighting in real time games right?

    He will take the path of least resistance if you present him with two options.
    1) Come up with some revolutionary way of handling materials and lighting something that hasn't been done by armies of programmers.
    2) Allow you to hack fix the spec to make up for the engines poor lighting and material def.

    But it sounds like he has the super sneaky 3rd option, of "I don't have to do jack and you'll like your shit on a shingle lowly artist".

    Kidding aside, I agree with Monster he sounds kind of set and you need to tread lightly when dealing with people who pride themselves on how much they know, especially when delivering news that they don't know as much as they think they do.

    If you can come up with a way to make it look like he made the discovery and then you can praise his "vast bounty of never ending knowledge", you'll get em and more.

    Programmers seek to make their lives easier. Making the lives of other people easier, is more work for them and there has to be some extra incentive for them to go after it. It's why they get paid so much... badda bing ching!
  • vahl
    Options
    Offline / Send Message
    vahl polycounter lvl 18
    and by the time he wasted defending the fact he knows what artists need and don't, he could have done it...which he may end up doing anyways...
  • EarthQuake
    Options
    Offline / Send Message
    Darkest of Days, IE an engine and game programmed entirely by about 2 guys made in iowa, uses full color spec.
  • Brice Vandemoortele
    Options
    Offline / Send Message
    Brice Vandemoortele polycounter lvl 19
    perna wrote: »
    At least artists realize they don't understand programming, but a great deal of programmers, like most people, believe they understand art.
    This sounds like a big evidence but I actually never phrased it out this way, sorry i had to say something, this is sooo true :D
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    single channel spec is probably used whenever textures themselves or memory is very limited.
  • Peris
    Options
    Offline / Send Message
    Peris polycounter lvl 17
    I'd gladly kick out colored spec if that means we can have more content because of memory honestly. Colored spec is nice but most assets don't really need it. I think also having colored spec with a deferred renderer means that the framebuffer (or whatever its called) will take up alot more memory? This can be a big problem on consoles, a deferred renderer can easily eat up 80 mb of video memory afaik!
    Anyway don't get me wrong, I think it's definitely a great thing to have and in some situations really necessary!
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    If I understood your question correctly.

    Most, even if not all engines support coloured specs, but they're not being used on production that much. but yes, shitloads of games use them, and there's a few examples posted above.

    We rarely use coloured specular in Crysis 2. We just place the spec on the diffuse alpha map, and we colourize the specular using the material editor. Saves memory and get's the job done almost the same way as you would got if you used a seperate specular bitmap. Unless of course, you need more than one color on your spec.
  • EarthQuake
    Options
    Offline / Send Message
    Peris wrote: »
    I'd gladly kick out colored spec if that means we can have more content because of memory honestly. Colored spec is nice but most assets don't really need it. I think also having colored spec with a deferred renderer means that the framebuffer (or whatever its called) will take up alot more memory? This can be a big problem on consoles, a deferred renderer can easily eat up 80 mb of video memory afaik!
    Anyway don't get me wrong, I think it's definitely a great thing to have and in some situations really necessary!

    Generally speaking, you arent saving ANY memory using grayscale spec, unless you use uncompressed textures for everything.

    There is no compressed format to save a single channel image supported by video cards, so you compressed full color spec map is actually 1 half the size of your uncompressed single channel image. You can add the spec to an alpha channel of say your normal map, but this makes the image twice as large, or exactly the same memory usage as using a full color image.

    I think where the real saving comes with using single channel spec is you can throw it in an alpha, and cut down on texture reads in the shader, it has little to do with memory(or if your programmers think it does, they dont understand how compression works =D).

    I'm not sure on the deffered rendering thing, however.
  • EarthQuake
    Options
    Offline / Send Message
    [HP] wrote: »
    We rarely use coloured specular in Crysis 2. We just place the spec on the diffuse alpha map, and we colourize the specular using the material editor. Saves memory and get's the job done almost the same way as you would got if you used a seperate specular bitmap. Unless of course, you need more than one color on your spec.

    ^ Usages exactly the same amount of memory =)

    There is some more info here for anyone who cares: http://boards.polycount.net/showthread.php?t=64286
  • Peris
    Options
    Offline / Send Message
    Peris polycounter lvl 17
    EarthQuake wrote: »
    Generally speaking, you arent saving ANY memory using grayscale spec, unless you use uncompressed textures for everything.

    There is no compressed format to save a single channel image supported by video cards, so you compressed full color spec map is actually 1 half the size of your uncompressed single channel image. You can add the spec to an alpha channel of say your normal map, but this makes the image twice as large, or exactly the same memory usage as using a full color image.

    I think where the real saving comes with using single channel spec is you can throw it in an alpha, and cut down on texture reads in the shader, it has little to do with memory(or if your programmers think it does, they dont understand how compression works =D).

    I'm not sure on the deffered rendering thing, however.

    Well There's more stuff a material needs than spec usually, like gloss and maybe an extra mask for tints, alpha or cubemaps. At GRIN we used to work with a "gsm"-texture, gloss, spec and extra mask all put in one texture, each going one one channel, and compressed as dxt1. If you want colored spec you need to find two more channels so it adds up pretty fast, and usually isn't really worth it for the difference.
  • EarthQuake
    Options
    Offline / Send Message
    Yeah that is a valid point, if you can cram more into a spec/gloss/general effect texture, than you will be saving memory over a full color spec.

    But in a straight up comparison, its a very common misconception to think that using a single channel grayscale image for spec saves memory, and it just isnt the case.
  • eld
    Options
    Offline / Send Message
    eld polycounter lvl 18
    yep, at first we had a whole dxt5 for diffuse and specular, the alpha is not compressed, so the specular took quite some memory, later on we moved to a dxt1+dxt1 combo as bram said.

    the dxt1+dxt1 was about the same memoryusage as a single dxt5 if I remember correctly, only we had access to the three channel diffuse, and the three channel material map, that we used for specular, glossiness, and the third channel for special shader use (transparency, cubemap etc).

    imo also; I'd rather have glossiness than coloured specular.

    EarthQuake wrote: »
    ...But in a straight up comparison, its a very common misconception to think that using a single channel grayscale image for spec saves memory, and it just isnt the case...

    Yep, along with tons of other stuff,

    this is why I advocate teaching artists HOW things work, not that "it just works this way", otherwise they just take stuff for granted, when it is more complex than that.
  • EarthQuake
    Options
    Offline / Send Message
    I think for some assets, lets say a character(skin, cloth, leather), or a FPV weapon(various metal types, rubber, various plastics), assets that are likely to contain many different material types, color spec is generally needed. For things that tend to be a single material, obviously not so much. I've also found that for some things that really do not have much specular, like concrete, old worn/natural wood or rocks, you can get away without using a specular texture at all, just a spec/gloss value in the shader, because it should be so subtle anyway.
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    EarthQuake wrote: »
    Generally speaking, you arent saving ANY memory using grayscale spec, unless you use uncompressed textures for everything.

    There is no compressed format to save a single channel image supported by video cards, so you compressed full color spec map is actually 1 half the size of your uncompressed single channel image. You can add the spec to an alpha channel of say your normal map, but this makes the image twice as large, or exactly the same memory usage as using a full color image.

    Not so sure about that. I just tested:
    saving a grayscale and a color image (just render>clouds) to DXT1 in Photoshop resulted in the same filesize, but in UDK there was about 30-40% filesize difference (between the saved packages, I don't know if there's another way to check).
  • EarthQuake
    Options
    Offline / Send Message
    File size on disk isnt really relevant, its file size in video memory, i assume UDK packages are compressed in some way?
  • Stickmoose
    Options
    Offline / Send Message
    perna wrote: »
    but a great deal of programmers, like most people, believe they understand art
    But I do understand art...and programming :\
  • ZacD
    Options
    Online / Send Message
    ZacD ngon master
    Someone should do a basic test in the UDK, lots of large textures, and test out the frame rate differences between colors and B&W spec.
  • Xoliul
    Options
    Offline / Send Message
    Xoliul polycounter lvl 14
    Ah you're right, I overlooked that detail. Still I'm not all convinced, the tech artist at work used to keep telling me it's better to go grayscale and multiply with a solid color.
  • EarthQuake
    Options
    Offline / Send Message
    What i've been told, by the graphics programmers on dod/marmoset(and various other people) is this:

    Take a Single, uncompressed 24 bit image
    Save it as single channel, and it will be 1/2 the size
    Save it as a 3 channel compressed image, and it will be 1/4 the size
    Save it as a 4 channel(IE spec+gloss alpha)compressed image and it is 1/2 the size, the same as a single grayscale image

    This is how it ends up in video memory, you may be able to find a compression format that will save a single channel image compressed, but your video card isnt going to support it, so loaded into memory it is still 1/2 the size of the full uncompressed image, larger than a 24 bit compressed color image, and the same size as a 32 bit compressed color image.

    I didn't beleive this at first when i was told either, because it seems a little mind blowing that no video cards support single channel compressed images, but that is the way it is.

    Now, if you're only talking uncompressed here, your tech artist is right. So say just creating your content in max and not thinking of compression, you see how easy it would be to come to that conclusion, just looking at size on disk and not thinking of how it will be loaded into video memory.
  • Justin Meisse
    Options
    Offline / Send Message
    Justin Meisse polycounter lvl 18
    yep, Warhammer Online uses colored spec
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    EarthQuake wrote: »
    What i've been told, by the graphics programmers on dod/marmoset(and various other people) is this:

    Take a Single, uncompressed 24 bit image
    Save it as single channel, and it will be 1/2 the size
    Save it as a 3 channel compressed image, and it will be 1/4 the size
    Save it as a 4 channel(IE spec+gloss alpha)compressed image and it is 1/2 the size, the same as a single grayscale image

    This is how it ends up in video memory, you may be able to find a compression format that will save a single channel image compressed, but your video card isnt going to support it, so loaded into memory it is still 1/2 the size of the full uncompressed image, larger than a 24 bit compressed color image, and the same size as a 32 bit compressed color image.

    I didn't beleive this at first when i was told either, because it seems a little mind blowing that no video cards support single channel compressed images, but that is the way it is.

    Now, if you're only talking uncompressed here, your tech artist is right. So say just creating your content in max and not thinking of compression, you see how easy it would be to come to that conclusion, just looking at size on disk and not thinking of how it will be loaded into video memory.

    What... the fuck! I bet 95% of the artists don't know about this. I really gotta speak with the guys around about this topic.
  • Peris
    Options
    Offline / Send Message
    Peris polycounter lvl 17
    haha yeah I remember not wanting to believe it first as well when I first heard :D. It's really strange there's no way to do single channel compression. It has to do with how dxt compresses each channel differently right?
  • JordanW
    Options
    Offline / Send Message
    JordanW polycounter lvl 19
    ZacD wrote: »
    Someone should do a basic test in the UDK, lots of large textures, and test out the frame rate differences between colors and B&W spec.


    If the BnW spec and the color spec are both separate textures then you will save nothing in framerate. If the BnW spec is stored as an alpha you may save some in frame rate but it's relatively useless because the saving would most likely be small, the gain in memory would be aweful (DXT5 is twice as big memory wise as a DXT1). Now if you pack 3 BnW specs for separate objects in a DXT1 then you would save memory.
  • arshlevon
    Options
    Offline / Send Message
    arshlevon polycounter lvl 18
    we take one map, called the expensive map, and put the spec in the red channel, the incandescence in the green channel, the parallax in the blue channel, and a detail map mask in the alpha,... we can tint the spec a color, but we don't have full on colored spec. seems to work out well and i have had no problems making what i want, or getting the results i want.

    we also have custom compression modes written by our engine team so if you only use one channel of a map, the others are dropped and not loaded into memory at all.

    textures are pretty expensive memory wise with our engine, but shaders are super cheap, so its not uncommon to use 5 to 12 shaders on a character.. based on the number of different materials.

    i never worked this way before i got here, but it seems to work out well, and i can notice a big difference in the amount of stuff we do on screen versus other engines i have worked on, so to me not having real colored spec doesn't matter so much.

    we can also write our own shaders with a custom graph shader program, so if i ever really wanted colored spec it would be very easy to make a shader to that, i just haven't really needed to.
  • [HP]
    Options
    Offline / Send Message
    [HP] polycounter lvl 13
    Yeah, we use to do the same in the previous company I worked at. but if I remember correctly, the R channel was used for the AO. For some reason the coders asked us to do that, so they can control the AO per texture.
  • EarthQuake
    Options
    Offline / Send Message
    Arsh brings up a very good point. If you are using an engine that uses defered shading(?) for example, extra materials and draw calls tend to be less of an issue, so using multiple materials instead of extra texture memory is a good thing.

    In an engine that is draw call dependent, any extra materials are always a bad thing, so the more you can do with less chunks, less materials, however you want to say it is a good thing, so its more common to have one material applied to the entire object, and a simple spec tint might not be enough for a lot of assets.
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    We use full-on coloured spec for everything here. For assets where they have multiple materials (eg. something like a gun or costume with rubber, plastic, metal, fabric and whatever else) it really makes a big difference IMHO.

    The amount of variation you can get in materials by using coloured specular is way wider than just greyscale specular. For example, the "beetle shell" kind of effects, fancy shimmering fabric, or any sort of metallic material will benefit from coloured spec. Without it stuff will usually tend to look more like plastic unless you tint your whole spec in the shader (at which point you lose surface variation).

    You probably won't lose much quality if you're doing tiling textures with coloured spec, if they're all one material - eg. flat metal panels spec can just be tinted in the shader.

    Personally if the main constraint is texture memory, I'd rather have a half-resolution coloured specular map than a full-resolution single-colour (for character/weapon/firstperson assets anyway, less so required for environment work and tiling texture).

    But yeah, for the original topic question, you could bust that guy's claim a thousand ways, there are tons of games over the past few years which use coloured specular and use it well.
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    dxt1 (RGB) compresses 6:1
    dxt3 (RGBA) 4:1 (sharp alpha)
    dxt5 (RGBA) 4:1, (smooth alpha)
    3dc (RG) 2:1 (for 8 bit data) 4:1 (for 16 bit ), compresses 32 bit better (2x16bit), ie higher quality normals

    there is no mainstream single channel compression.

    storage on disk is typically the same as in memory + a few bytes describing the file + potential all mipmaps already stored as well. That gives the main benefit of really fast loading times, as the driver doesn't have to compress anything or generate mipmaps himself. (that makes the file actually a bit bigger than what you may have expected)

    sampling compressed textures in runtime is also faster than uncompressed data. This at first may sound weird, but computing stuff is generally quicker than reading data.

    in deferred shading keeping the per-pixel colored specular is indeed very "fat", hence avoided.

    http://en.wikipedia.org/wiki/S3_Texture_Compression (they write dxt1 as 8:1 but they assume 32 bit input pixels, which is not the case for a 24-bit RGB image)

    more info on internal formats
    http://developer.download.nvidia.com/opengl/texture_formats/nv_ogl_texture_formats.pdf
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    EarthQuake wrote: »
    Generally speaking, you arent saving ANY memory using grayscale spec, unless you use uncompressed textures for everything.

    There is no compressed format to save a single channel image supported by video cards, so you compressed full color spec map is actually 1 half the size of your uncompressed single channel image. You can add the spec to an alpha channel of say your normal map, but this makes the image twice as large, or exactly the same memory usage as using a full color image.

    I think where the real saving comes with using single channel spec is you can throw it in an alpha, and cut down on texture reads in the shader, it has little to do with memory(or if your programmers think it does, they dont understand how compression works =D).

    I'm not sure on the deffered rendering thing, however.

    if you need to use a colour GBUFFER for your specular in your deffered shading (a single rendering of the screen that can then be composited together) then that uses three times the memory as a single channel, and yes you could render out a glossiness GBUFFER and an emissive GBUFFER for the same cost.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    so in deferred shading it's doable but costly (I'm fairly sure I was told not doable full stop)
    for selected items it can be done, but not advised in general use- is that the gyst of it?

    something to worry about if you're pushing the memory limit, but if you've plenty to spare for whatever reason should be ok?
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    rooster, yep, that's pretty much it. Deferred shading does not make coloured specular impossible, just makes it more expensive texture memory-wise (for the frame buffers I guess as well as the actual extra texture channels)
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    yep, the texture memory doesnt need to be a problem as you can use a selection of methods (no colour, single colour multiplier, full texture colour) to acheive the results, so you would only use a full colour texture on main character perhaps, while useing shader based values for props and envs.

    But if you are using defferered shading for spec (even if you have a deffered renderer, the spec does not nessesarily have to be deffered, unless you are spec lighting with the deffered) then it will be at a BUFFER cost, whever your using it for every object or not.
  • bugo
    Options
    Offline / Send Message
    bugo polycounter lvl 17
    Here's a lesson I learned: Don't listen to programmers when they say "doesnt exist" "not possible at all" "it's limited". Not saying its not true, but they try to optimize their work, or sometimes they dont work in the industry to see how things are possible. Sometimes coders try to create what is not logical for artists, and even hard to work with. As they dont know the tools that we are used to use. So, if that happens, just go to google and show him.

    It all depends on what project you are, and most of the times concerning about optimizations they are right. But for the side of the art, you have to push as hard as possible to make what looks good to show off somehow.

    But yes, one channel for spec saves a third of memory! So he had a point, he just didnt say it in the right manner.
  • Eric Chadwick
    Options
    Offline / Send Message
    No, the lesson should be... develop a rapport with your graphics programmer, because when you need a particular effect that you don't have, you'll need to work with them to get it. Just like you communicate with the rest of your art team, your graphics programmer is a member of the art team too, so keep them in the loop.
  • EarthQuake
    Options
    Offline / Send Message
    bugo wrote: »
    But yes, one channel for spec saves a third of memory! So he had a point, he just didnt say it in the right manner.

    Read the rest of the thread =)
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    As usual, Eric is the voice of reason :)
  • rooster
    Options
    Offline / Send Message
    rooster mod
    yes, I agree in principle with eric, but rapport comes slowly when you hear phrases like 'can't do' 'not getting' 'make do' etc :). very slowly..

    to be fair sometimes we do get what we ask for, but it takes some work other times (hence, thread)
  • GarageBay9
    Options
    Offline / Send Message
    GarageBay9 polycounter lvl 13
    Every aircraft and most environment pieces had per-texel spec color in FlightSim X.
  • Eric Chadwick
    Options
    Offline / Send Message
    Yeah, I hear you. There's a lemon at every studio. IMHO bad communication breeds problems every time, and the problems multiply as it gets worse. I would try another tack, just get conversational about other stuff, and I bet it'll improve. Programmers are humans too :) even though they talk funny.

    I think coffee machine/water cooler talk is much more important than people sometimes realize. For example... if someone got a poor impression of you from your last conversation, like you were disappointed or ended it abruptly, they're not likely to expend any effort on your behalf in the future. It's that gut feeling.
  • Eric Chadwick
    Options
    Offline / Send Message
    I'd love to a side-by-side or two of a model that uses colored spec already, alongside the same model with the specmap desaturated but multiplied by a constant color. Same lighting. I bet it's a subtle thing in most cases, except for scarab beetles and the like.
  • Marine
    Options
    Offline / Send Message
    Marine polycounter lvl 18
    glass the fucker, roo, that's how things are down up north
  • Zack Fowler
    Options
    Offline / Send Message
    Zack Fowler polycounter lvl 11
    If you're using a deferred shading render system, that right there is the main source of the issue. Most likely what your programmer friend was referring to is lack of deferred shading games in particular having support for full color spec, not games in general. I'm not aware of any deferred shading games that support full-color specular as opposed to some method of uniform per-material tinting. There are of course plenty of traditional forward-rendering games with full-color spec map usage, but the way that deferred render systems are setup makes it much more expensive than just in terms of traditional texture memory. This is because specular intensity gets rendered as a separate framebuffer from diffuse, normals, glossiness, etc. and there are only so many bytes of framebuffer around to allocate (on the consoles, particularly). The fact that all lighting and materials get mushed down into a single final composited render pass is what gives deferred rendering its advantages, and to free up enough framebuffer bytes for full-color specular lighting you'd have to do something like decrease the accuracy of the normals or diffuse, which would probably be much much more noticeable.

    The thing to keep in mind with little conflicts like this is that often times you can have a situation where both people are right in a sense, but just speaking a different language. Try to find the common ground and see things from their point of view.
  • rooster
    Options
    Offline / Send Message
    rooster mod
    what do you think of this example i threw together?
    spec_colour.jpg
    you'd have to cut the design into geometry if you wanted to do that without a map

    I think the effect is even more pronounced if you're multiplying env maps by specular map in a shader
  • Zack Fowler
    Options
    Offline / Send Message
    Zack Fowler polycounter lvl 11
    If that's the kind of thing you're looking for, one possible solution is to tint the specular via the diffuse. It can be an expensive operation (involves filtering out the bright/dark information from diffuse) but much easier to fit in the framebuffer limitations.

    If you wanted the red metal to have an orange spec and blue metal to have a green spec though, you'd be SOL without full color spec map support.
134
Sign In or Register to comment.