I like to have multiple uv-sets in my models. Therefore I made two texture projections in XSI. One cylindrical, the other unique uv, for rendermaps.
First Question:
When I export my model, with generate Tangents options, I don't think that they are actually created. The debugger shows, that
Code: Select all
pMesh->buildTangentVectors(src, dest);Code: Select all
if (pMesh->suggestTangentVectorBuildParams(src, dest))Code: Select all
if (!pMesh->suggestTangentVectorBuildParams(src, dest))Second Question:
Now to the really weird stuff. When I generate tangents, the result still looks wrong. The tangents should be in TEXCOORD2 since 0 and 1 are the normal uvs. I adapted the shader to reflect this. The result looks messed up (Picture2)
But when I turn of generate tangents now, and export the model again, it suddenly looks right!? (Picture 3). And the fun part, when I reboot the computer (or sometimes also when displaying other graphics) the tangents are lost again and it looks like Picture 1. It drives me crazy
Are this texcoord somehow cached in the graphics card?!
I am kind of desperate...
I included the material/shader/declaration links at the end of this post.
Thanks everybody for the help!
Some screenshots:
Picture 1:

Picture 2:

Picture 3:

Resources:
Cg-Shader
Program decl
Material