Specular Map!

Started by
11 comments, last by azjerei 19 years, 5 months ago
Hi all! I m trying to get specular(on a mesh) affected by a gray scaled texture map! using multitexturing and GL_SEPARATE_SPECULAR_COLOR // Specular after texture if you prefere... but in one pass... I only want a see specular throught a grayscale map... black = no specular at all and white = maximum specular any sugestions? THX
Advertisement
I am not quite following you on what it is that you are trying to achieve here :)

Want to elaborate a bit plz?
sure!

the idea is to control the amount of specular a mesh will recieved with a texture map...

with a texture map all black 0,0,0 (r,g,b)... the mesh will recieved no specular highlights at all...

opposite...
with a texture map all white1,1,1 (r,g,b)... the mesh will be fully exposed to specular highlights!

the plan is... to use grayscale values of a texture map to control the specular intensity... from black(intensity = 0%) to white(intensity = 100%)...

Makes more sense?

THX

I can think of a REALLY easy way of doing this with a texture unit and a fragment shader.
see www.delphi3d.net
theres a demo with a glossmap on a pair of scissors perhaps this is what u want to do
You can't have vertice based specular highlighting with seperate specular color in one pass. I've asked the same question right here :( The scissors demo at delphi3d doesn't use SEPARATE_SPECULAR_COLOR, instead they have a second "specular-texture" and do it with multipass. Not the same thing unfortunately.
_____________________________
www.OddGames.comwww.OddGames.com/daniel
Hmm, if I am not mistaken, the "amount of specularity", by your reference, would mean the shininess, right? If that is the case, you could make due with a pre-specular calculation that calculates and stores each face's specular "saturation" based on something. For example: the alpha channel of a TGA texture applied to it, or perhaps a number indicator in the texture name. I dunno. Whatever you would decide to use there, I think it would work. Then you simply use the glMaterialfv(GL_FRON_AND_BACK, GL_SHININESS, object->face.specularSaturation); call to use that face's particular specular shininess value.

Is this somewhere near what you are looking for?
I wasn't very clear in my post I think. I'm talking about masking the specularity/GL_SHININESS in glMaterialfv with a texture. Are you saying I can mask a material property?
_____________________________
www.OddGames.comwww.OddGames.com/daniel
Herr_O got it...

the master plan is to MASK specularity and/or any material attributes with a texture...

anyone tried this?

THX
I am not sure if i understand you but i think you can do it very well with a shader. It would be something like a bumpmap but for the specular component only. So use the bumgmapping technique for your specular light computation.

This topic is closed to new replies.

Advertisement