I have the problem with seams with calculating a tangent basis in my application.

I'm using a seems to be right algorithm, but it gives wrong result on the seams. What am I doing wrong? Is there a problem with an algorithm, or with the model? The designer says that our models with our normal maps are rendered correctly in Xoliul Shader Plugin in 3Ds Max, so there should be a way to calculate correct tangent basis programmatically.

Here's an example of the problem I'm talking about.

Steps, I've already taken:
- Tried different algorithm (from Gamasutra, I can't post the link because I don't have enough reputation yet). I got wrong, much worse, results;
- Tried to average basis vectors for vertexes are used in multiple faces;
- Tried to average basis vectors for vertexes that have same world coordinates (this would be obviously wrong solution, but I've tried it anyway).

  • \$\begingroup\$ Can you give more details on what steps you've taken already to solve the problem? It would help guide the answers to be more relevant to you. \$\endgroup\$
    – House
    Aug 1, 2013 at 15:25
  • \$\begingroup\$ that link is the perfect reference \$\endgroup\$
    – Charlie
    Apr 24, 2017 at 1:43

1 Answer 1


Unfortunately, there is no really standard way to handle seams when generating tangent bases, and different applications do different things. If the method used in the engine differs from that used by the baking tool then you'll get problems like this.

The way I've solved this type of issue in the past is to use xNormal for normal map baking, as it lets you write a plugin in C++ to provide the tangent basis, and you can make sure to do it the same way you do in the engine. That should eliminate any issues with the seams.

I'm not familiar with the Xoliul Shader Plugin, but if it offers a way to specify your own tangents or export the tangents it's using, that should also enable you to get the tangents matched between the tool and the engine.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .