Jump to content

Align normals of a primitive to a single point of another primitive


Maxc

Recommended Posts

Is there away to align the all the normals of one primitive to a single point of another primitive? I am trying to achieve a bulge type deformation with a point VOP using the normals as a vector.  Currently I can align the normals of the first primitive only if the second primitive has the same number of points. I only need one point for them to align to. Thanks.

046 displace_along_vector.hiplc

Link to comment
Share on other sites

Hi Rich,

Thanks, that's great  and gives me some new ideas but not quite what I mean in this case I don't want them all to have the same normal direction. I want  each point to have a normal  derived from it current position subtracted  from the single point.  In the same  way you can use a  wrangle  with @N = @P;  this makes the normals directed to the zero. I don't quite understand how this works admittedly, I just want to control where "zero" is and have all the normals point there.

I'm after a more efficient way of what my VOP is already doing.   My issue is that I have to have the same number of points in each. 

vop normal 01.jpg

vop normal 02.jpg

Link to comment
Share on other sites

Hi Rich,

That's brilliant. I didn't realise you have to initialise the add point position and also in the VOP add a constant ptnum. Thank you for your help. I've still got away to go before I understand the vex wrangles, but this helps makes sense.

Link to comment
Share on other sites

  • 2 years later...
 
 
 
 
 
 
 
5
On 2/4/2017 at 6:46 PM, rich_lord said:

Ohhh, I see.

Ok, here is your answer. Its done with some vector math. If you subtract two position vectors from each other, you get a direction pointing from one to the other. Then you normalise that vector to get them all be of length 1.

Here it is done with VEX and VOPS.

normals_point_away_from_point.hiplc

hi guys. I had the same question and it's solved. thank you, Richard, I just don't understand what does that constant node (that you add to ptnum node) do. I appreciate if you would describe it. thanks a lot

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