View Full Version : what is cosine power texture?
02-07-2008, 06:59 AM
i have been seeing these cosine power maps on a few things, most recently call of duty 4, and i have no idea what they are, and when i search it i just get a bunch of trigonomety stuff.
so could anybody help me out as to what it is, it would be much appreciated.
02-07-2008, 07:06 AM
Cosine is a material expression. Usually used to animate certain things. A simple example of a shader that uses a cosine expression is an emmissive light that fades in and out over a certain period of time.
02-07-2008, 09:13 AM
thanks for the reply, but im still not really good on the map, if it isnt too much trouble could you go more indepth with the example.
in my experience the maps are grayscale, how would you go about using it to animate something if its a single image (unless its a series of images, but im pretty sure its not actually animate, but really have no idea), and if its a single image how would it control things over time, considering to my knowledge an image cant controll the way something looks and a time setting in the same image?
02-07-2008, 09:56 PM
It's not a map. As bbox85 said it's an expression. In the shortest use of terms it's a wavelength with a peaks and valleys (trigonometry). Say you have a glow/emissive map, you turn it on and your model will have glowy parts. Now say you want those glows to flash ON then have that glow steadily ramp down toward OFF and then ramp up again toward ON, like a slow strobe light ( LIGHT ON > ramp down > LIGHT OFF > ramp up > LIGHT ON...)
This is where you add the cosine function (a sine function will work as well)
In your shader network the cosine wavelength expression will be added to your glow/emissive map. The peak of that wave will be "1(on)" the valley will be "0(off)" . As the wave moves along the peaks this will ramp ON your glows, as the wave moves toward the valley this will will ramp off your glow.
I hope that explains it.
02-08-2008, 07:05 AM
a cosine power map or a glossiness map is used together with a specular intensity map to describe the surface attributes of a material.
a glossiness map and a specular intensity map can either be stored in two separate grayscale images, or together with a freznel map in an RGB image, where (for example) the red channel controls the specular intensity, the green channel controls the glossiness, and the blue channel controls the freznel term.
09-09-2008, 05:39 PM
but...what IS it :D ? Like, aside from the mechanical mathematical explanations of the waves and sines and whatnot, I think he's looking ( as am I) for a layman's understanding of why I would want to use this expression instead of a regular light, or an animated gif, or a million other things. Is it particularly resource efficient? what sort of fancy effect does this method add to a regular old scene? If all it does is add strobing light, why wouldn't I just add a strobing light, or adjust my slider on the texture, etc. etc. Thanks!
09-09-2008, 08:02 PM
They have been saying what it is all along. It is simply a specific mathmatical function of triganometry that I can't find any better way of explaining then what has already been said.
As to its uses, the term "cosign" does not do anything specifically, it is simply a mathmatical expression that determains a kind of fall off in the same way that the fresnel effect is not exclusive to reflectivity, and so a "fresnel" map or node can be pluged into any other map in the shader to acheive a certain effect.
Probably the easiest thing to see what a "Cosign" can do in effect is to look at a Phong shader in maya. They have an expression named "Cosign Power" but in actuallity, this material slot acts much like what the "Gloss" node in max does. But they use a Cosign of an imputed angle to determain the results in the calculations of what the light does to the shader. So while the name "Cosign" is in the name, It does not mean that the Cosign has anything to do with any specific thing. It is just another mathmatical way of getting a certain result in the same way that the fresnel falloff equasions are nothing more then math in order to get yet another result.
They are just different algorithms to do different things. But you as an artist can stick different variables in it in order to change anything from speculer fall off, reflections, or even color or luminosity effects. So it doesn't do any "SPECIFIC" thing as far as the shader goes. But it is a "specific" algorithm to get a "specific" effect that you can use in any spot of your shader to get its effect.
Thats honestly the best I can explain it. If you want to know more, then I would take a quick look at some common Triganometry equasions (http://en.wikipedia.org/wiki/Cosine) to get an idea of what they do more specifically.
09-09-2008, 09:03 PM
A cosine map (/powerspecular/gloss map) descripes the tightness of a specular highlight. An apple and a pool ball are both quite specular objects but the tightness of their specular highlights are very different and this is what a cosine map defines :)
03-08-2009, 11:29 PM
Sorry for the resurrection, but can someone give me an example on how to create such a map? because I haven't had much luck with the greyscaled images I tried to create.
03-09-2009, 01:24 AM
It's usually fairly simple.
Specular controls the brightness (and sometimes colour) of the specular highlight.
Gloss (or spec power, specular exponent, cosine power... there's lots of different names for the same thing) controls how sharp or diffuse it is. Basically how matte or glossy the surface is.
So on a gloss map, black would be a very wide, dull, diffused highlight while white would be a very tight, thin and sharp highlight. And various shades of grey get you the values in-between those.
Here's a spec and gloss map I made for use in the Source engine. (http://www.hull-breach.com/Talon/portfolio/infiltrator/infiltrator_specular.jpg) With most of it being a dark grey to get a broad highlight and some areas a bright white so they appear to be very glossy, with the material areas black so they appear to have a matte texture to them.
03-09-2009, 01:24 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.