O.Heid Posted January 18, 2013 Share Posted January 18, 2013 Please, how could I aligning normals on a spline to the next point, or point before. Is there a ready expression anywhere? I already figured the solution with point/oppoint out but I''m sure there are more solutions, arent it? Thank you in advance. Cheers Quote Link to comment Share on other sites More sharing options...
kgoossens Posted January 18, 2013 Share Posted January 18, 2013 Use the Polyframe sop node. change the tangent name to "N". That is a know attribute in houdini for setting the normal attribute. Quote Link to comment Share on other sites More sharing options...
O.Heid Posted January 18, 2013 Author Share Posted January 18, 2013 cool great. Nevertheless I'm also in a scripted- or expression solution interested. Any Idea? Quote Link to comment Share on other sites More sharing options...
kgoossens Posted January 18, 2013 Share Posted January 18, 2013 For something like this you should have a look into vopsops This allows you to create your own solution. There is also a script node that you can use. And you can build your own nodes "Digital assets" If you go to File->New operator type. Quote Link to comment Share on other sites More sharing options...
gui Posted January 19, 2013 Share Posted January 19, 2013 The idea is simple, you have to take the position of one point and subtract from the position of the previous pt. You can do with vops, just add a import attribute node, pick up the pt number from globals and subtract one. Then subtract the global position from the import attribute node, and plug it in the normal output. You can do the same with expressions, just use a point() expression, use $P as point number and grab the "P", 0 (first float from the vector "P" = x), then subtract the same expression, but with $P -1 as point number. Do the same for y and z. I´m new in python land, so I will have to search for the function, but the idea remains the same. Quote Link to comment Share on other sites More sharing options...
O.Heid Posted January 20, 2013 Author Share Posted January 20, 2013 (edited) cool, thanks a lot for your help But as I'm still a bloody starter, would you mind to write me the expression down? so I'm sure to learn much more. Thanks in advance. Edited January 20, 2013 by O.Heid Quote Link to comment Share on other sites More sharing options...
Scratch Posted January 20, 2013 Share Posted January 20, 2013 use a point sop, "add normal", delete channels and use this expressions (HScript) on the normal's X Y and Z field. (by default there is standing $NX, $NY, and $NZ). Replace it with this: point("../" + opinput(".", 0), $PT + 1, "P", 0) - $TX point("../" + opinput(".", 0), $PT + 1, "P", 1) - $TY point("../" + opinput(".", 0), $PT + 1, "P", 2) - $TZ Quote Link to comment Share on other sites More sharing options...
O.Heid Posted January 22, 2013 Author Share Posted January 22, 2013 thanks a lot for this expression. Quote Link to comment Share on other sites More sharing options...
woodenduck Posted January 23, 2013 Share Posted January 23, 2013 Here is another very simple method. Shift the points with a sort sop then subtract one from the other. See attached. WD normals_follow_curve.hip Quote Link to comment Share on other sites More sharing options...
O.Heid Posted January 23, 2013 Author Share Posted January 23, 2013 @ woodenduck: also a really handy solution. Thanks a lot. Thats so strange for a beginner as me that there exist always a couple of solutions.... 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.