Jump to content

aligning normals


O.Heid

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

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.

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