Do tangent vectors scale with the nurbs surface?

Do tangent vectors scale with the nurbs surface?

jmreinhart
Advisor Advisor
857 Views
2 Replies
Message 1 of 3

Do tangent vectors scale with the nurbs surface?

jmreinhart
Advisor
Advisor

I have a custom deformer which to keep things simple wraps the geo to a nurbs surface. It does this using a matrix for each vertex that is created from the tangents and normals of the nearest point. According to the documentation for the MFnNurbsSurface::getTangents()

Retrieve the tangents in the U and V directions at the given parameter value on the surface. The returned tangent vectors are normalized.

But I get different results depending on if I normalize them after retrieving them or not (see the two videos below).  I can just normalize the vector to fix the issue but I wanted to know if there was something about how surface tangents work that I'm misunderstanding. 

 

0 Likes
Accepted solutions (1)
858 Views
2 Replies
Replies (2)
Message 2 of 3

jmreinhart
Advisor
Advisor
Accepted solution

I did some testing and they are only being normalized if you query them using kWorld space not kObject space. That answers my question about how the API command works but I'd appreciate any insight into why this is the case.

0 Likes
Message 3 of 3

jmreinhart
Advisor
Advisor

I was using this feature today and discovered a little caveat that I thought I should post here in case anyone else ever runs into it. The normalization that occurs when you use kWorld does not appear to work at the very edge of the surface.