Smooth Tangent Space Normals for Enhanced Bump Mapping
In an attempt to enhance the visual quality of 3D models, many graphics applications employ bump mapping techniques. However, achieving smooth and realistic results can pose challenges when tangent space normals are calculated solely based on face data.
Calculation Details
The current approach calculates tangent, binormal, and normal vectors on a per-face basis, neglecting the normals already present in the model file. This technique utilizes edge data and texture space vectors to determine these values, relying on a cross product to ultimately derive the normal.
Facet Problem
This approach often results in a faceted appearance, with sharp edges and unnatural transitions between faces. This occurs because the calculated normals are not continuous across vertices, causing abrupt changes in lighting and shading.
Solution: Vertex-Based Normals
To address this issue, the solution lies in calculating normals on a per-vertex basis. This can be achieved by utilizing the normals provided in the model file or smoothing them out to prevent faceting.
Algorithm
Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.
Copyright© 2022 湘ICP备2022001581号-3