I am trying to implement bump mapping with mulitexturing and normals are taken from texture color values (normal texture) to the light equation. Now when I rotate my camera over the surface of that object I can see some specular highlights with the rotation of camera and I can see these highlights at different part when I rotate my camera. Is it correct implementation of bump mapping?
0
votes
Does not sound like it. Normally you define your normals in tangent-space and then either transform them into object/world/view-space during lighting or transform all of your lighting vectors into tangent-space such that the orientation of the camera and rotation of the object produces consistent results.
- Andon M. Coleman
i saw some of the codes but could not figure out how to calculate tangent attribute?
- debonair
1 Answers
0
votes
Tutorial for bump-mapping http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-13-normal-mapping/
i saw some of the codes but could not figure out how to calculate tangent attribute?
Calculating tangent is explained in the same tutorial (http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-13-normal-mapping/#Tangent_and_Bitangent). It is based on texture coordinates which are usually attached to the model.