# What's the difference between UV space and tangent space?

After thinking a while about UV space and tangent space it seems to me that those two spaces are identical. Both use the shading normal as Z axis und both use the U axis of the UV map as X axis und the V axis of the UV map as Y axis.

So what is the difference between UV space and tangent space?

• In general computer graphics, tangent space doesn't use the U/V axis of the UV map as X/Y axis. Does Blender do it like that for some reason? Commented May 18, 2022 at 16:35
• Yes, it needs some space as a reference for the tangent and bitangent Commented May 18, 2022 at 16:39
• so editing the UVs messes up tangent space? Commented May 18, 2022 at 16:40
• Well what do you mean by mess up? It just changes them. That's also why we have a UV map input for the normal map node, which uses tangent space. Commented May 18, 2022 at 16:43
• No that is actually done by the vector input of the image texture conatining your normal map. Commented May 18, 2022 at 16:45

## UV space

A UVMap basically assigns a (u,v) coordinate to every point on a mesh. You can think of this as a function that assigns to every point on a mesh, a point in a plane. That plane is UV space. It is not a part of the XYZ space the mesh exists in. There's only one UV space for the whole mesh.

## Tangent space

Every point on a mesh has a different tangent space. The tangent space can be thought of as all the arrows rooted at that point that lie in the tangent plane (ie. that are perpendicular to the normal). Sometimes a third dimension (the direction of the normal) is added. Unlike UV space you can think of the tangent space as embedded in the same XYZ space the mesh exists in. The zero point in the tangent space at point p would correspond to p itself.

• Would the Z axis in tangent space be the same vector as the shading/split normal (are those the same thing?) in global space. Commented May 18, 2022 at 17:10
• It's the split normal, yes (not sure what the shading normal is). Commented May 18, 2022 at 17:11
• In blender.stackexchange.com/questions/263698/… you said that the X and Y axis of tangent space are computed fro the UV map, such that the tangent and bitangent go in the direction of those lines. But when I think of it wouldn't that mean that the X and Y axis of the tangent space aren't orthogonal to the Z axis if the split normal isn't orthogonal to the underlying geometry, as is usually the case with shade smooth? Commented May 18, 2022 at 17:14
• The idea is to project the lines into the tangent plane (whatever that plane is). Commented May 18, 2022 at 17:20
• Oh ok so it's way simpler than i thought thanks! Commented May 18, 2022 at 17:22