LaidlawFX Posted December 7, 2011 Share Posted December 7, 2011 Hello, I am trying to get a 90 degree angle to a normal to re-orient my normal so I can use a peak sop tangential to a curve. If needed I can provide the upvector, which by default is in the positive Y direction. My test case is that I have a circle(curve) with each point normal looking at the next point in the circle(curve), via point sop with a sort or vop sop. My circle(curve) is on the XZ plane, and my upVector is pointing up in the positive Y by default. So I should be able to find a 90degree angle to my normal that I can peak something along, call it finding a Z-axis for each points co-ordinate system. I believe this is a simple vector match problem for vop sops, but I'm stumped at the moment, how to get this Z-axis as a second vector. As for cheats I do not want to use another curve scaled in to orient with because with complex shapes you can not get an even angle set on the normal's. Thanks -Ben Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted December 7, 2011 Share Posted December 7, 2011 I am trying to get a 90 degree angle to a normal to re-orient my normal so I can use a peak sop tangential to a curve. If needed I can provide the upvector, which by default is in the positive Y direction. If Y is always up, then a simple VEX SOP can transform the normal by 90' on the Y axis. Just take the P normal from the global input, and then use a VEX transform. Optionally write out the new value to an attribute instead of replacing the input normal. Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted December 7, 2011 Author Share Posted December 7, 2011 If Y is always up, then a simple VEX SOP can transform the normal by 90' on the Y axis. Just take the P normal from the global input, and then use a VEX transform. Optionally write out the new value to an attribute instead of replacing the input normal. Thanks... lol, one node, how sad... Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted December 7, 2011 Share Posted December 7, 2011 Thanks... lol, one node, how sad... Actually, i was wrong. There is a Rotate node. See the attached example. Attribute "R" is rotated by a parameter, based upon the UP and Normal vectors. vector-angle.hip Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted December 7, 2011 Author Share Posted December 7, 2011 That's def a more tool worthy solution. I think this was something more of what I was originally looking for, for versatility, since it is capable of calculating the inbetweens. Thanks again. Quote Link to comment Share on other sites More sharing options...
sam.h Posted December 7, 2011 Share Posted December 7, 2011 A cross product gives you a vector perpendicular to both input vectors. I think of it as the the two input vectors defining a plane, then the result of a cross product is the normal of the plane. Also, if all you want is a tangent, use the polyFrame SOP to give you tangentu and/or tnagentv. Quote Link to comment Share on other sites More sharing options...
gaurav Posted December 7, 2011 Share Posted December 7, 2011 Just to add few things. 1. Order matters in cross product. Up X N or N x Up will determine the direction of resulting orthogonal vector. 2. Polyframe is handy yet mysterious Cheers!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.