# Tangents/normal calculation at the vertices of a subdivided mesh

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

## Recommended Posts

Hi,

I've implemented Catmull-Clark subdivision in my app. The only thing left is to compute the tangent space vectors at the subdivided mesh vertices. Temporarily, the vectors (tangent and normal) are interpolated from the vectors at the base mesh vertices. As expected, this gives noticeable artifacts where the surface curvature is high. Internet searches returns a lot on Catmull-Clark and subdivision, but strangely very little on this topic.

What I'm looking for is a method that does two things :
1) provide tangent vectors at subd surface vertices close enough to the tangent plane of the (exact) subd surface (the normal is computed by cross product of the 2 tangent vectors)
2) make it so that these tangent vectors (or vectors derived from them) correspond to the tangent space needed to apply correct bump mapping.

I could of course compute the tangents and normals of the subdivision mesh the same way I compute them for the base mesh, but the CPU cost is prohibitive.

Some details regarding the app :

- polygonal mesh (triangles and quads)
- shaders supporting lighting, color textures and bump maps
- texture coordinates are simply linearly interpolated during subdivision
- sharp and semi-sharp creases (for the former, normal discontinuity across the crease)
- for the base mesh, tangent space vectors at vertices are computed as follows :
- compute normals for each polygon
- compute tangent for each polygon as explained in http://www.terathon.com/code/tangent.html
- average those values at vertices, taking into account normal and texture discontinuities (creases, mesh edges and seams)
- orthogonalize and normalize the vectors (only tangent and normal are stored per vertex, the binormal is computed in the vertex shader).

Any link / suggestion / hint would be welcome.

1. 1
2. 2
3. 3
Rutin
20
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633657
• Total Posts
3013193
×