it's wrong. gloss is important. they are all channels for per pixel lighting. you can't pick and choose; they all belong together in a package. you either enable a model to have the engine do the lighting on it or not. in order to let an engine do the lighting you need all the channels. if you leave some out you could possibly end up with something that looks worse than when the engine did no lighting effects and everything was baked in. just imagine if you had only diffuse and normals, how would you get that to do everything? you couldn't; it would look stupid.
F.E.A.R. has all these channels including gloss and so does FarCry 1 and Unreal Engine 3. what made you think that gloss is not important? just coz Doom3 didn't have it? you're all letting yourselves be influenced by this mistake. i knew this would happen. if that game didn't come out you would all be doing your models correctly now.
i couldn't keep quiet anymore.
Replies
As we discussed it already my personal opinion, based on doom3/Q4 experience and specifix 3dsmax shaders, would be:
Normal+diffuse+spec is great to describe a wide array of materials from wood to metal and plastics. Yet it has shorcomings that gloss *seems* to be able to paliate... However for complex materials I feel like just another map is not the holy solution. IE to look good nextgen skin need a dedicated shader. And skin is not glossy is it?
Plus I don't think that 2 engines handle spec+diffuse in the exact same way.
But then again - I have no experience with Ue3, and have no idea what the math behind gloss is. But I still want to play with that gloss-ready engine you are coding.Come on Vipr! Pictures!
As for Doom3, well the Id guys simply created the engine they needed didn't they? Their game takes place in a Mars space station, and I can tell it looked just like that. Why bother adding features if it's already good enough? Any engine is still a hack to fake reality anyway, no matter how many textures are being processed. And one more map to be hand painted for each and every asset means hundreds extra hours spent on the project, which is simply a loss if it's for the sake of a mere tiny cosmetic improvement.
Pfiew.
and pior, i showed you screenshots of my engine but i'm waiting for someone to make models that will really test it and show it off. so far basically everyone is doing everything with gloss missing. aaargh! so annoying.
skin has various gloss levels and when it's wet or has baby oil on it, it appears to have high gloss. gloss is actually the smoothness or rougness of surfaces and the skin may not get smoother but the liquid on the skin will have a smooth surface because it is liquid and it seems to become the skin as far as the light is concerned. i THINK this is some of the science of it. some light will reflect going from the air to the liquid surface but not really from the liquid to the skin because the liquid and skin have pretty much the same index of refraction. there is also some skin on a part of our body that basically changes gloss because it changes how much it is stretched. the stretching causes the tiny wrinkles to flatten making the surface smoother.
and actually about the mathematics. there isn't really an exact way of doing these things. i myself keep changing my shader algorithms and i've come to the conclusion that what the industry needs is to create texture compilers or something where artists create textures in super high res at 64bit float per channel (or something high) and some scripts add, subtract, multiply divide, etc numbers and other textures to them and basically do brightness contrast and gamma adjustments or any mathematical operations or filters whatever to get the textures adapted to a particular game engine or so the programmers can change their shaders and the artists don't have to get all stressed out.
"just because you can create something that looks good and realistic without gloss maps doesn't mean it's not wrong."
and yah i know not everything needs a gloss map but i'd say most things do. some things could do with just a uniform gloss level stated in the material. that would be 1 number instead of loads of different numbers as the texels of a texture.
In my book that statement is wrong actually. If it works for most people, it's right. I don't know who you are, but no matter how skilled a programmer you are I think you're failing to understand the entire spectrum of factors that go into making a videogame. Diminishing returns ViPr.
You keep talking about what is right and what is wrong and I'm afraid that's just a totally nonsensical way of looking at it. It's just not that binary. If you can 'sell' a 3D scene to a player, then it's right, no matter what code is going on under the hood. There *IS* no right or wrong.
When I look at the world around me I don't see polygonal edges everywhere, so when I see the same in a videogame do I decide in my head that it is 'wrong'? No, I accept that it's a computer generated world and that there are certain limitations and I look at it with a more forgiving perception.
I'm not disputing that gloss mapping is the technically correct way to go, but posting about it in such a condescending arrogant way is probably not likely to get you too far. Now, if you'd posted something that was far more mature, polite, informative and possibly accompanied by helpful explanatory diagrams, people might actually sit up and take note. Your approach feels all wrong to me.
Honestly I've never worked with a gloss map. I've never been asked to make one. I'm not even sure what one looks like. It probably something I should look into more (along with ambient occlusion, which seems to be growing in popularity). Because one must always get with the times.
if you can save memory space by leaving out a gloss map, and getting the same result, then it makes more sense to do it that way.
simple as that.
I have to say that a lot of things are going the way of having their own special shader, so it doesn't matter so much.
what the industry needs is to create texture compilers or something where artists create textures in super high res at 64bit float per channel (or something high) and some scripts add, subtract, multiply divide, etc numbers and other textures to them and basically do brightness contrast and gamma adjustments or any mathematical operations or filters whatever to get the textures adapted to a particular game engine or so the programmers can change their shaders and the artists don't have to get all stressed out.
[/ QUOTE ]
That's the basic idea of what we're doing here, and it is not a trivial task. We've barely scratched the surface. But the idea is a solid one, if you can get it working well.
Gloss is a nice tool to have, but ultimately I have to make tradeoffs... do I want to incurr another pass for this particular effect, or do I want to spend that pass on something else like a sub-scatter effect? Does that super-duper shinetastic shader end up slowing down the framerate on my target hardware?
For a "star" item though, like the closeup emotional scene where the babe is glistening with blood, sweat and tears, then the cost is worth it while you dial everything else way down.
That super-duper specular is only going to show up on the high-end Xbox360 sku, but it's gonna go bye-bye for the inevitable Xbox/PC/whatever port.
Got any pics to share?
i wrote this explanation a long time ago. don't get furious with me if it's not accurate:
http://www.geocities.com/vi_pr/gloss_explanation/gloss_explanation.htm
and when i say things like "correct" or "wrong" take it to mean "relatively more correct" or "relatively more wrong" instead of absolutely correct and absolutely wrong.
Also, I'd be interested in seeing an asset done using spec, then done using gloss and see the differences side-by-side.
Gloss Map:
Specular Map:
I like the gooey parts better with the gloss map, however since the spec level is the same throughout the whole model the normal flesh looks way too shiney.
with the shader i like, generally for this model you'd want the wounded part to have parts that go to maximum gloss and the rest to be kinda low gloss. high gloss would make things look wet while low gloss would make things look dry. high specular would make things look more metallic.
Yeah, found what I was thinking of:
http://itchstudios.com/psg/art_tut.htm
and of course you can do things to create the illusion of something but it won't be the same and under certain conditions or if people decide to check they'll notice something is not right. or lets put it this way; it's a much better more robust and more correct way of creating the illusion of realism to use gloss maps.
If by correct you mean as how its accomplished by physics in reality than this is the way. If I had time I would demonstrate today.
the most important thing is not exactly how the computer calculates these effects. what's important is that it at least prompts the artists to create art assets in a way which is highly universal and can be easily convertible or portable between different engines/shaders. making textures the Doom3 way means much of the textures will have to be probably scrapped and redone from scratch instead of converted.
just create all the assets as though they are for a hollywood movie and then at the end create all the lowpolys and have the software generate all the textures for the lowpolys from the highpolys.
this way is extremely convenient if you will have sequels or if the there is a cg heavy hollywood movie related to the game.
You for real or..?
Are you seriously also suggesting using a gloss map, *isntead* of a spec map? Any decent engine will have gloss settings per mesh chunk/shader. How you could posibly go without the detail and color of an actual spec map is beyond me, your asset would look like shit. Gloss is not a replacement for specular value by any means.
[edit]
Also your solution is completely useless in a situation where you have mutliple materials in a single texture, say, metal, wood, and cloth. All of these have different spec values and different gloss values, but in this case the spec value is going to be way more important, not to mention spec color. And you can easily find a mid-ground gloss value that will look decent on all of these materials if you've got a proper spec map. The same can not be said in the inverse, you could never have the same spec value on metal as on cloth even if you had a good gloss map..... And even if you somehow managed to get that to work right, you're missing the detail you would get from variation in the spec map as well. You would get gloss variation at best and that is nowhere near close to being "right"
[ QUOTE ]
F.E.A.R. has all these channels including gloss and so does FarCry 1 and Unreal Engine 3. what made you think that gloss is not important? just coz Doom3 didn't have it? you're all letting yourselves be influenced by this mistake. i knew this would happen. if that game didn't come out you would all be doing your models correctly now.
[/ QUOTE ]
This also makes me want to punch you in the face, just fyi. Learn to write without coming off like a fucking asshole and try again please.
Don't most people have that in their shaders these days? A spec map, a spec strength and a spec falloff?
[/ QUOTE ]
Anyway, stuff like this is all just hacks and tricks.
As Daz and others mentioned, as long as it looks fine and runs fast, who cares what maps, parameters, hacks and tricks it uses. A gloss map is just another hack, ideally you'd just control the bumpiness of the surface on a really high level and have a map to specify the brightness and colour of the highlight, as has already been said.
Rick: Surely spec maps and spec strength are the same thing?
[/ QUOTE ]
You think that, but no. The strength is basically just a multiplier that works with the map.
I don't think it's some huge amazing thing - most people use it already, see almost all 360/PS3 videos, the artists are controlling the size of the spec (probably on a per material basis). And most art packages already support it and people use it, perhaps not knowing they are.
If your specular strength is simply a 0% - 100% range, then brightness of the spec color map does the same thing as the multiplier. You're double-multiplying it, which can be nice I guess, it doesn't all have to be in the bitmap.
[/ QUOTE ]
It can be very nice, because if you are using a fairly grey and dim spec map then DXT compression noise can be large compared to the image signal. In bad cases the result is an awful greeny/purple mess.
Throwing a multiplier in there means you can use the full range of an 8 bit image format and still get dim spec values, crushing compression noise right down to non-visiblity (and improving precision to boot). This works quite nicely in doom 3.
no i'm not suggesting gloss INSTEAD of spec map. i want both but i'm saying gloss can be more important than spec.
[/ QUOTE ]
Only if you were doing a flat material that didnt need any specular detail. Thats the only way i see that being benificial at all.
if you just had a spec power map ie a texture and a numerical value for the specular intensity, then this would look very similar to doing it the other way around?
the subtley here is lost on me and is very confusing
gloss stretches/compacts the width of the bell curve.
specular stretches/compacts the height of the bell curve.
in some shaders:
gloss stretches/compacts both width and height of the bell curve in opposite ways while specular stretches/compacts the height again more after that.
in answer to your second question. no it's not the same.
specular falloff stretches/compacts the width of the bell curve.
specular map/strength stretches/compacts the height of the bell curve.
Or am I missing something?
btw i suspect, in actuality, with most shaders, the width of the bell curve is not actually changed but a gamma adjustment is done to the curve.
SpecularValue = (pow(saturate(dot(Normal,HalfAngle))),SpecularPower) * SpecularColour
and that's it.
Find the amount the surface would reflect the light source (N dot HA), raise that to some power (either a shander const or a map controlled value) - this shrinks the width of the bell curve as you call it, then scale it by your specular colour (scales the height, and biases it into a colour if it's tinted).
In use, you also have to scale the specular power by a constant to get it into a useful range (and we picked it to match Maya's Phong shader), because cosine power is usually in the range of 0-100 and the map is 0-1. Scale & bias on the spec colour can help if you're running into precision problems in the lower end, but we don't to maintain compatability with Maya's hardware viewport for quick prototyping.
Again, I'm not sure why this was brought up and made a big deal, it's super simple, well-known and common in engines/renderers.