Pancho Posted March 10, 2016 Share Posted March 10, 2016 I got a small rotation problem. What I want to achieve is that the blue square's end position is exactly the same as the red square's. The values I got for each square is the position (center), the normal and the up vector. So far I tried my luck in the attribute vop with the align node with little luck. So, open for every idea. What I need is something like and align node with input for the two up vectors. Cheers! Tom Quote Link to comment Share on other sites More sharing options...
Pancho Posted March 10, 2016 Author Share Posted March 10, 2016 (edited) O.k., what I achieved so far in an attribute vop I pump both primitive normals into an align node > matrix to quaternion > quaternion rotate > rotate the blue primitive points. So far, so good. Both primitives are aligned in such a way that both normals point into the same direction. Excellent! Since I rotated the blue primitive, I also rotate it's upvector which I imported via a promoted parameter. Next step is to pump both up vectors into an align node > matrix to quaternion > quaternion rotate > rotate the blue primitive points. Quite good. In most cases now both primitives are properly aligned, BUT as soon as the dot product of the both up vectors seems to be -1 (so far that's the only idea I have), flipping is occuring (180° on the normal axis) or the rotation axis flips and isn't anymore the normal of the primitives. So, it seems to me that the align node in some circumstances isn't working correctly? Or what am I missing? This is really a pain in my behind since I waste hour after hour to solve this simple task. At least it should be simple..., isn't it? Cheers Tom P.S.: The center of both primitives in my case is in the center of the coordinate system. Edited March 10, 2016 by Pancho 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.