• Create Account

## Why to we need per vertex tangent?(normal mapping)

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1noatom  Members

919
Like
0Likes
Like

Posted 02 July 2012 - 04:00 PM

I just started learning about normal mapping and I can't understand why do we need tangents for every vertex?

So in the plane of a triangle we have the texture space or tangent space.Where we can move the texture in all directions,rotate it etc.

But in my book says: if we use texture space for normal mapping,we will get a triangulated appearance since the tangent space is constant over the face of the triangle.(This is if we use tangent(or texture) space per TRIANGLE!).

So how does using a tangent per vertex fix this? And what does "triangulated" mean?
I can't understand why rotating and translating the texture using just texture space per TRIANGLE.

### #2zacaj  Members

663
Like
0Likes
Like

Posted 02 July 2012 - 04:06 PM

When you have it per vertex the tangent is interpolated over the triangle like the normal is. Triangulated probably means it looks flat shaded

### #3mhagain  Members

12439
Like
2Likes
Like

Posted 02 July 2012 - 06:15 PM

You can't send per-triangle attributes to the GPU. Well, you could probably hack something up with instancing and/or a GS, but it seems of dubious benefit and just adding the attribute per-vertex is the simplest solution.

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.

### #4Matias Goldberg  Members

9069
Like
3Likes
Like

Posted 02 July 2012 - 09:22 PM

Because vertex shaders only look at the vertex they're processing, not at the other vertices they're connected with.
The Geometry shader is able to do that, but it breaks a lot of concurrency which is the strong point of GPUs, and hence that's why GS are so slow and rarely used (that, plus other factors in the GS break parallelism).

This is also why two triangles can share the same vertex, yet duplicate that vertex because they need totally different normals (unless you're using carefully layed out vertices using flat shading).
A cube only needs 8 vertices yet the traditional way of rendering it is using 24 vertices (again, unless you're using flat shading and carefully connected vertices; the order becomes important because the normal of the leading vertex, which is the first vertex being processed, is used).

### #5Dawoodoz  Members

468
Like
0Likes
Like

Posted 03 July 2012 - 06:56 AM

If you bake a model space normal map in Blender, you don't need tangent space but that method is less reusable because you need one normal map per model.

"App". is an acronym and must always be followed by a dot.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.