Jump to content

defining normal direction with wrangles


Recommended Posts

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

Link to comment
Share on other sites

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);


    @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. 

  • Like 1
Link to comment
Share on other sites

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)




@MrScienceOfficer, you were faster I didnt see you already reply

Edited by djiki
  • Like 1
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...