MENOZ Posted September 14, 2015 Share Posted September 14, 2015 Hello, I was wondering how could be replicated the attribute reorient in vex? what is the math behind it? how does it figures out how the geometry is oriented? my guess is that it calculate the normals, and somehow tangent for both geometries, and uses the matrix generated from it to orient the vector attribute. if that's the case, how does it calculate a tangent that is consistent during deformation? thanks Quote Link to comment Share on other sites More sharing options...
anim Posted September 14, 2015 Share Posted September 14, 2015 (edited) even if you take direction to first neighbour as tangent you should have consistent results as long as your geos have the same topology so in other words use N as main direction and vector to first neighbour as up vector for your reference frame transform for both geos, then transform your desired attrib from one to another Edited September 14, 2015 by anim 1 Quote Link to comment Share on other sites More sharing options...
MENOZ Posted September 14, 2015 Author Share Posted September 14, 2015 ah, I was thinking to use the neighbour, but i remembered that with neighbour() the order is not fixed. but then I looked at the help and it says it's consistent for consistent geometry, so it might be good! neighbour VEX function Returns the point index of the neighbour of the point. The order is undefined, but will be consistent for consistent geometry. Returns -1 if the neighbournum is out of range for that point, or the point is out of range for that input, or the input doesn’t exist. thank you! Quote Link to comment Share on other sites More sharing options...
SamStark Posted July 21, 2018 Share Posted July 21, 2018 Were you able to replicate the function? I'm very interested on how it works. How do u construct the matrix from normal and up vector? and also why would I need an up vector for it to work? Been spending hours trying to wrap my head around this, would be great if you can shine some light. Thanks. 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.