Bump and Invironment Mapping

Started by
11 comments, last by Kest 18 years, 7 months ago
Quote:Original post by Mezz
I did see your other post, and you continued to talk about bump environment mapping.

Maybe you were having a bad dream? :) I don't mention environment mapping at all. I'm actually now trying to find a method to use vertex shaders with the tangent space normal maps. The only way I can imagine doing it would be to stash an entire matrix transform in every vertex. Doesn't seem like a very reasonable thing to do. I'm thinking maybe two floats instead, to define the texture's oriented rotations on the vertex. Or maybe I'll just say the heck with it and work in object space. I'm still trying to figure out if a matrix per vertex is better than not mirroring textures onto both sides of some models.
Advertisement
Quote:Original post by Kest
Maybe you were having a bad dream? :) I don't mention environment mapping at all.


I was at work (bad), but it was no dream.

Quote:Original post by Kest
It appears to be an invironment mapping only situation in DirectX. I always thought that invironment maps made things look shiny. What if you just want a rough look and don't want it shiny? Shininess just won't cut it for my game world. It will be a very rustic setting. Old wood, concrete, rusted metal.


Anyway.

Doing tangent space normal mapping requires the tangent basis per vertex ( matrix transform), however this isn't too bad, since it's made up of the tangent, bitangent and normal, you will typically already have the normal, and if you really want to, you only need one of the other vectors as you can generate the third from within a vertex shader if you want.

-Mezz
Quote:Original post by Mezz
Quote:Original post by Kest
Maybe you were having a bad dream? :) I don't mention environment mapping at all.


I was at work (bad), but it was no dream.

Quote:Original post by Kest
It appears to be an invironment mapping only situation in DirectX. I always thought that invironment maps made things look shiny. What if you just want a rough look and don't want it shiny? Shininess just won't cut it for my game world. It will be a very rustic setting. Old wood, concrete, rusted metal.


Anyway.

Errm, for what it's worth, I was referring to another post; not my reply in this thread. Bad wording on my part. I wouldn't have asked if you had seen it if it was on the same page. The thread titled "Ambience with normal mapping". It's on the second forum page now, though.

Quote:Doing tangent space normal mapping requires the tangent basis per vertex ( matrix transform), however this isn't too bad, since it's made up of the tangent, bitangent and normal, you will typically already have the normal, and if you really want to, you only need one of the other vectors as you can generate the third from within a vertex shader if you want.

I hadn't thought of that. But considering you wouldn't want to infuse the vertices with useless information, you'll want to modify the mesh data to add the tangent or bitangent only if normal mapping is enabled. So you don't even need the original normal if normal mapping is enabled. You just need to know the orientation of the texture on the vertex. I believe it could be calculated with two floats. So vertices become one float smaller per vertex with normal mapping.

This topic is closed to new replies.

Advertisement