Sign in to follow this  
dbh

(Basic) Glossmap / Specularity Questions

Recommended Posts

I'm at the point in my engine where I have lighting functional (using simple DX9 point lights). I've played with the attenuation to the point where I like how the lights gently light up the scene and how the textures on my objects darken as they become further away from a light source. So that all makes sense. But now I'm disgruntled with the flatness of my textures-- as many of you graphics programming gurus know, textures without lightmaps look flat! But I've never worked with lightmaps/glossmaps/specularity maps, etc. so I don't even know where to begin. I've done some searching on the forums, and on google, but I've come up with articles that are either way too far above what I want, or simply don't cover enough of what I want. I'm not looking for an extreme, bump-map, reflection, specularity calculation; just something simple that will add a simple specular highlight to my models. Final question: Since I am using 3dsmax7 to generate my models (I'm also using it to texture them) and export with Pandasoft's .x file exporter, can I somehow generate a specular highlight in 3dsmax and have it magically appear in my game? I'm sure it's not that simple, but it's worth a shot ;) -dbh

Share this post


Link to post
Share on other sites
If you really want your textures to not look flat, normal maps are the way to go.

But if you want to get specular maps working first, I'll outline basically what they are: a way to modulate the specular highlight with a texture. I don't know how you'd do it with the fixed function pipeline (though there might be some way), but if you have a pixel shader and you can compute a specular level, just multiply it by a texture (which is different from the diffuse texture) before you add it to the output color.

What you say is a little confusing, because you say you want a simple specular highlight, but you also mention glossmaps and specularity maps. You don't really need those to produce a specular highlight. In fact you can produce a simple (vertex lit) specular highlight with the fixed function pipeline.

You cannot precompute a specular highlight or put it in a lightmap, because they are view dependent - they move around as the camera moves.

Share this post


Link to post
Share on other sites
What he said, if you arnt going with per pixel bump/displacment/parallax map, there is no need for a specular map. Just caculate the speclar highlights per-vertex using some sort of lighting model like blinn's.

Share this post


Link to post
Share on other sites
Quote:
You cannot precompute a specular highlight or put it in a lightmap, because they are view dependent


What do you mean, cannot? Sure you can! Anyone want to do an 8-dimensional texture to prove this guy wrong?

And like the above guys have said normal mapping will add the greatest detail to your textures/images. After that, I'd say specular power/coef maps to have a seperate per-pixel specular value.

Share this post


Link to post
Share on other sites
Sounds like any of those would serve my purpose... I'd be happy to dig deeper into shaders, but I don't think I have the timeframe to do that right now. So I'm really just looking for a cheap, quick fix to make my textures less flat.

Where can I go to read up on normal maps, or blinn lighting? Has anyone written up a decent tutorial on this?

Thanks for the discussion, by the way... I've already had several misunderstandings on the subject cleared up :)

-dbh

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this