Follyx Posted November 18, 2017 Share Posted November 18, 2017 ok: a curve with i.e. 10 points. I want to achieve that the normals of the curve are pointing to the next point on the curve. I want to realize it with a point wrangle node AND VOP's I think thats an old problem but I didnt know how to search for it:-) Thanks in advance Quote Link to comment Share on other sites More sharing options...
MrScienceOfficer Posted November 18, 2017 Share Posted November 18, 2017 PolyFrame works well in this situation, just change the tangent to 'N'. A vex solution would look like if (@ptnum != npoints(0)-1) @N = @P - point(0, "P", @ptnum+1); else @N = point(0, "P", @ptnum-1) - @P; @N = normalize(@N); . This handles the case of the last point by inverting the vector towards the previous point. 1 Quote Link to comment Share on other sites More sharing options...
djiki Posted November 18, 2017 Share Posted November 18, 2017 (edited) If you want to achieve that in VOP just subtract NextPointPosition and P, normalize result, and connect result to N. NextPointPosition you will get with ImportPointAttribute node whre you will feed in ptnum increased by one. Thath increment you will do for all points except last one. Anyway you didnt defined where last point normal should point to. Suppose you want last point normal to point to zero point then you can use conditional to detect such case (in example it is pointvop2) CustomNormals.hip edit: @MrScienceOfficer, you were faster I didnt see you already reply Edited November 18, 2017 by djiki 1 Quote Link to comment Share on other sites More sharing options...
Follyx Posted November 18, 2017 Author Share Posted November 18, 2017 Thank you to both. 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.