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
Quake4
Are two for sure, i'm sure there are plenty more like most of the new UE3 powered games.
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.
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.
Yep .........................
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.
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
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!
Anyway don't get me wrong, I think it's definitely a great thing to have and in some situations really necessary!
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.
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.
^ 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
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
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
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.
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?
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.
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.
Read the rest of the thread
to be fair sometimes we do get what we ask for, but it takes some work other times (hence, thread)
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.
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.
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
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.