victorrijo Posted February 5, 2016 Share Posted February 5, 2016 Hi everyone! I just started learning houdini and I'm trying to copy a line and orient it along the points normals but I can't get it to work. I tried doing the same with a torus instead of a line and it worked fine using the "orient to Z" parameter. The line doesn't have the orient attrib. Any help will be appreciated. Quote Link to comment Share on other sites More sharing options...
Atom Posted February 5, 2016 Share Posted February 5, 2016 Add a polyframe node after the sphere with the settings shown in the image. 1 Quote Link to comment Share on other sites More sharing options...
victorrijo Posted February 5, 2016 Author Share Posted February 5, 2016 Add a polyframe node after the sphere with the settings shown in the image. It worked great! thanks, Can you explain the logic behind it? Quote Link to comment Share on other sites More sharing options...
Atom Posted February 6, 2016 Share Posted February 6, 2016 (edited) I can't. I got the information from a post a few months back. But basically the polyframe allows you to change normal orientation. It is very useful before a copy, especially when you need to generate UVs along a copy that is followed up by a skin. Edited February 6, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 7, 2016 Share Posted February 7, 2016 (edited) Line primitive oriented along Y axis by default. Set the Direction parameter to 0 0 1. You also can pre-rotate it in Copy directly (disable "Transform Cumulative") or just by adding a Transform, rotating it by 90 degrees around X axis in both cases. There is handy Floating Gnomon on the vieport's corner. Copy does the orienting itself. It expects input geometry logically oriented along z-axis, which is common for such tools. Logical orienting is ambiguous, so, this is user's job to determine if the human heads needed to be face-forward or vertical-oriented when copying. Copy builds custom spaces for each point, with axes x and y used as tangential directions and z as depth/up. And then just transform copies into that spaces. All orienting automatically computed by Copy internally for user's convenience. You may override it by providing custom N (vector direction only, arbitrary roll), up (will be used as constraint for roll, which will complete the orientation), orient (full orientation, quaternion), other common attributes (UP: full list). They are all partially or fully interchangeable. They can be computed in different ways with different results. As an example, PolyFrame uses several algorithms itself. Stupid example of constraint working: if you point your hand up, you still can turn around while pointing up. Then you point your other hand on the west, and you cannot change your position anymore without breaking the rules, you are oriented. Cross product of your hands will give you the third axis. You then normalize and make orthonormal all the stuff and store resulting matrix somewhere, to rotate somebody else in that position later. This is common when building matrices and orients from directions like velocity vectors and the world's up {0, 1, 0}. Copy computes the constraint, but does it in different manner, that why the results are different. Both are correct, however, suited for different cases. Edited February 8, 2016 by f1480187 1 Quote Link to comment Share on other sites More sharing options...
victorrijo Posted February 8, 2016 Author Share Posted February 8, 2016 Really valuable information. I also found this really interesting thread about the copy SOP and axis alignment. LINK - Good to understand whats going on under the hood, still trying to get my head around the PolyFrame SOP. Quote Link to comment Share on other sites More sharing options...
edward Posted February 8, 2016 Share Posted February 8, 2016 http://www.sidefx.com/docs/houdini15.0/copy/instanceattrs Quote Link to comment Share on other sites More sharing options...
f1480187 Posted February 8, 2016 Share Posted February 8, 2016 (edited) Thanks for the links. PolyFrame uses geometry features of points - edges and attributes. Help page has some descriptive images and info. It computes a usual vectors, not some special values for Copy SOP. It also helpful to compute tangential vectors in general purposes, mostly for polygon lines. You can name this vectors to special names which can be picked by Copy SOP. Or you can compute any instance attribute using them, for example orient. You can visualize everything and just play with parameters interactively. Copy SOP is not very intuitive, but Transform Pieces can be modified to be synced with true PolyFrame output. polyframe.hipnc Edited February 8, 2016 by f1480187 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.