Maxc Posted February 4, 2017 Share Posted February 4, 2017 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 Quote Link to comment Share on other sites More sharing options...
rich_lord Posted February 4, 2017 Share Posted February 4, 2017 Heres a simple way. Create a point with an add sop Add a normal to that (I've used a point wrangle) Use either VEX or VOPS to copy that normal onto all the points of you original geo. In this file is both the VEX and the VOPS way. copy_normal_from_point.hiplc Quote Link to comment Share on other sites More sharing options...
Maxc Posted February 4, 2017 Author Share Posted February 4, 2017 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. Quote Link to comment Share on other sites More sharing options...
rich_lord Posted February 4, 2017 Share Posted February 4, 2017 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 Quote Link to comment Share on other sites More sharing options...
Maxc Posted February 6, 2017 Author Share Posted February 6, 2017 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. Quote Link to comment Share on other sites More sharing options...
ashkan rahimi Posted August 1, 2019 Share Posted August 1, 2019 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 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.