binormal and tangent calculation.

Started by bobjob, January 04, 2009, 23:26:16

Previous topic - Next topic

bobjob

Hey guys,
Im having a problem regarding bump mapping. Its related to the tangents and binormals.

Iv got a little generator that creates them from the vertices and tex-coordinates. But I was wondering if there is a way to get a round about calculation not using the texture co-ordinates and the triangle structure relationship.
The problem is that when I load my objects I break up the indicies relationships and just make every triangle seperate. Its now come to backfire as when I apply the shader it doesnt have smooth shading.

Id rather not rewrite the code as I assume that "seams" in the UV co-ordinates will also probably seem solid when lit.

So is it possible get get a decent calculation using just the single triangle and its normals (that have been smoothed)?

thanx in advance.

edit: or rather just using normal values, As the aim is to get smooth shading.

bobjob