PDA

View Full Version : Specular Map



paolom
02-18-2000, 04:45 AM
A specular map should be a texture map, with its data used as an intensity of the specular color in a specific point. Combining this with the separate specular color, would allow for polygons where there is a texture map, and a specular map that is used for calculating the factor of added specular color. So I could have 1 simple quad representing, for ex., the front side of a building: I'd use a single texture for representing wall, windows and the doors. By using a specular map I'll mark brick zones with dark grey, and the window zones with bright white, to have a glass-like material with high specularity.

MikeC
02-18-2000, 05:56 AM
Surely you can do this already? (I think they're usually referred to as gloss maps.) What new functionality do you need?

Or maybe I'm not understanding something.

dmy
02-19-2000, 06:46 PM
even better would be to generalize things...

opengl uses the standard lighting algo, with ambient, diffuse, ... components.

with multitexturing, it would be good to have the ability to specify from wich component take the fragment color.
with this scheme, one can create a tree of texture units and achieve more effects with a single pass.

think about this:
a lighted landscape, with lakes, rivers, trees.
the sky is partially cloudy and the clouds are moving.
the trees cast a bit of shadow.

a way to implement this scene could be the following.

ambient, diffuse and specular components are fixed.
maybe the specular component could be a function of the overall sky coverage (if the sun is occluded by a cloud, highlight are not so strong)

attach a texture reproducing shadows to the ambient component.

attach the texture with the aspect of the landscape and a clouds texture (behaving like a shdowmap) to the diffuse component, also make the cloud texture move with some texture matrix math.

attach a texture of the rivers lakes and whatever is shiny AND the cloud texture of the previous stage to the specular component.

what we get is a landscape with faked shadows projected by the clouds, and this shadow modifies the gloss appearance of our lake.

...put a lens flare here and some halos there and we just created eden! http://www.opengl.org/discussion_boards/ubb/smile.gif

also the emissive component could be used with textures, maybe to simulate light gloom from the windows of a wooden house on the lake of the river...

well, it's something like MAX, isn't it...

what do you think?

Dolo/\/\ightY

CitiZen X
02-19-2000, 06:53 PM
Does this effect specular intensity/color or the specular "shinyness" value?

[This message has been edited by CitiZen X (edited 02-19-2000).]

dmy
02-19-2000, 06:57 PM
i think it would be better if the gloss texture modulates the specular color.
it's more effective this way.

Dolo/\/\ightY