Jump to content
  • Advertisement
Sign in to follow this  
golgoth

Specular Map!

This topic is 5061 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Herr_O got it...

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

anyone tried this?

THX

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!