PDA

View Full Version : Calculating tangent space in LW



AndrewShpagin
05-07-2008, 08:17 AM
Now I am making possibility to export vector displacement from 3D-Coat to LW. I am using DP_Kit->Displacement->Vector Map for displacement in LW. Displacement in World Space works fine, but I have problems with tangent space. Does anyone knows how tangent space in LW is calculated? There is many methods to calculate tangent space, does anyone knows what method is used in LW?

Phil
05-07-2008, 11:33 AM
Ping Chuck Baker (chuck_baker (at) newtek (dot) com) - he should be able to get you the answers you need.

Chuck
05-07-2008, 12:16 PM
I've moved this thread to a better location. I'll check with the development staff and we'll either post here or if you email me I'll send the reply that way.

goodrichm
05-07-2008, 01:07 PM
Thanks for your help Chuck. Here's 3D-Coat's tech support email:

[email protected]

Just a happy LW9 & 3D-Coat owner trying to marry my two favorite apps together...

AndrewShpagin
05-08-2008, 02:46 AM
Thank you! This question is very important for me. I hope this addition will make easy for LW users usage of such a great thing like a vector displacement.

dpont
05-08-2008, 08:09 AM
Since the Vector Map node is mentioned here,
I'm surprised to read that it could use "LW tangent space".

Denis.

AndrewShpagin
05-08-2008, 11:59 PM
What do you mean? There is option to choose space - "Object" and "Tangent" in Vector Map node. I think that LW has pre-calculated tangent space that is used by this node. I need to know the precise algoritm how it is calculated. I know at least 6 differnt methods.

dpont
05-09-2008, 01:22 AM
What do you mean? There is option to choose space - "Object" and "Tangent" in Vector Map node. I think that LW has pre-calculated tangent space that is used by this node. I need to know the precise algoritm how it is calculated. I know at least 6 differnt methods.

I mean that LW has not accessible "pre-calculated" tangent space
in its SDK, node or shader.
Vector Map node calculates its own tangent space, and
I'm agree there are a few other method to get this texture space.
The purpose of this node was only to be compatible with the
Vector Cast node baker tool, the first idea came from an XSI tool,
which have been modified to get negative values.
Then we saw that fortunatly Modo uses the same way to code
vector, but I'm not Modo so I don't know about its own tangent
space.
The only LW tool which uses actually tangent space is the
LW Normal Map node and there's an option in DP Kit Normal Cast
to match this space (only by testing).
But if NT Dev Team will inform 3rd party about its tangent space
method, I'm curious too...

Denis.

AndrewShpagin
05-09-2008, 02:16 AM
It is really interesting. Are you developer if DP_Kit? If so, can you tell me what method do you use? I have checked, my exported vector maps are compartible with Modo, but in LW it looks strange. I will make several new tests, but if you know please tell

1) Is tangent space orthogonal in DP_Kit?
2) maybe you can send me code sample that is used to calculate tangent space ([email protected])

dpont
05-09-2008, 03:13 AM
Yes I'm the developer of this node.

I think you should keep your compatible
Modo "tangent space" code for Vector Map,
but it will not be compatible with mine, until
I could add another mode and update this node,
may be like the option, I made with Normal Cast,
I don't know about orthogonal tangent space,
but rather about "handedness" correction for
binormal.

I guess that your program will export Vector Map
for huge geometry, this could be a problem in
the DP Kit Vector Map node,
because its scan process is probably slower and
more unstable than a native LW tool (but it doesn't
exist yet) ...or you could try to code your own.

Denis