/
News

# Feature: 'Messing with Tangent Space'

What is tangent space, and more important, what is its relevance to game design? In this in-depth feature, FXLabs programmer Siddharth Hegde discusses both tangent space a
What is tangent space, and more important, what is its relevance to game design? In this in-depth feature, FXLabs programmer Siddharth Hegde discusses both tangent space and its practical uses, and why it is such an important consideration in many of today’s pixel shaders. In this excerpt, Hegde explains the obvious benefits of utilizing tangent space: "Why use tangent space in the first place? Why not just declare all positions and vectors in world space? Certain per pixel lighting techniques and many other shaders require normals and other height information declared at each pixel point. This means that we have one normal vector at each texel and the n axis will vary for each texel. Think of it as a bumpy surface defined on a flat plane. Now if these normals were declared in the world space coordinate system, we would have to rotate these normals every time the model is rotated even a small amount. Remember that the lights, camera and other objects also involved in these calculations will be defined in world space and will move independent of the object. This would mean thousands or even millions of object to world matrix transformations will need to take place at the pixel level. We all know matrix transformations don't come cheap. Instead of doing this, we declare the thousands of surface normals in the tangent space coordinate system. Then we just need to transform the other objects (mostly consisting of lights, the camera, etc) to the same tangent space coordinate system and do our calculations there. The count of these objects won’t exceed 10 in most cases. So it’s 1000000s vs 10s of calculations. Hmmm… It’s going to take a while to decide which one would be better." You can now read the entire feature with more on the practical uses of tangent space, along with many pseudocode examples (no registration required, please feel free to link to this feature from external websites).

### Latest Jobs

#### Glowstick

Remote
1.18.23
Mid to Senior-Level Unreal Developer - Glowstick

Remote
1.19.23
Senior Producer

#### Anne Arundel Community College

Arnold, MD, USA
1.30.23
Instructor/Assistant Professor, Game Art

#### Night School Studio

Los Angeles, CA, USA
1.09.23
Level Designer / Scripter, Games Studio
More Jobs

#### Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio