Jump to content

How to make a point's normals pointing to another point


ghang

Recommended Posts

Hi,

I would like to know how to make a point's normals pointing to another point

as follow image, i would like to let the point number 0 's normals pointing to point number 1.

ps: this 2 point are create by different ADD SOP.

i use POINT SOP and select add normals with expression as bellow

(-point("../point1",0,"P",0))+point("../point2",0,"P",0)

&&

(-point("../point1",0,"P",1))+point("../point2",0,"P",1)

&&

(-point("../point1",0,"P",2))+point("../point2",0,"P",2)

but the angel of pointing was not exactly correct.

==========================================

question 2:

sorry for 1 more question, i would like to know how to mesure the 2 point distance, i would like to use it as my object scale value.

i search in the help context with "point distance, point to point distance" but i only get point to primitive distance solution.

Thanks Very very very much

post-4016-125839373022_thumb.jpg

Link to comment
Share on other sites

An easier way to do this is using the second input of the point sop. Connect the point you want normals to point towards to the second input, and then select add normal and set its parameters to $TX2 - $TX, $TY2 - $TY, $TZ2 - $TZ. The $TX etc variables are the position of your current point, $TX2 etc the position of whats connected to the second input.

Link to comment
Share on other sites

To get the distance between the 2 points you can add an attribute after the step Peter suggested. Create a float point attribute and put:

length($NX,$NY,$NZ)

into the first value.

this will return the distance based on the normal you created in the previous step. Hope that helps.

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