hmihalis1 Posted August 12, 2020 Share Posted August 12, 2020 Hi all, i've got some points with trails and i'm filtering them randomly to leave some behind as the trails move forwards. each trail is split into a leading point and the trailing points, and each trail and its leader have a unique id. what I want to do is take the points i've left behind and remove them if they come into contact with another point trail that has a different id. so something like an attribute transfer but with a condition that checks the near points id and only transfers some attribute if that id is different. so the white points from trail 1 would exist until the come in contact with the red points from trail 2. Any ideas how to do this in vex or vops? Many thanks, Quote Link to comment Share on other sites More sharing options...
Gorrod Posted August 12, 2020 Share Posted August 12, 2020 Take a look at the nearpoint or nearpoints functions, these will do exactly what you want to I assume. Just write something like this into a pointwrangle int npt = nearpoint(0, "@id!="+itoa(@id), @P, chf("maxDist")); if(npt != -1 && @id > point(0, "id", npt)) { removepoint(0, @ptnum); } nearpoint.hipnc 1 Quote Link to comment Share on other sites More sharing options...
hmihalis1 Posted August 13, 2020 Author Share Posted August 13, 2020 (edited) amazing thanks so much Gorrod, that little bit of syntax in the nearpoint function was i'll I needed I put it into a sop solver and multiplied the pscale down instead of removing the point just in case it results in drops popping out of existence when meshed. Edited August 13, 2020 by hmihalis1 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.