markinglevfx Posted May 29, 2018 Share Posted May 29, 2018 I have 2 sets of points: 'parent' and 'child'. Both have the same number of points. I need each parent point to have a unique child assigned to it - no duplicates. I need to be able to animate in an active value for the parent points, so that they all become active in 3-4 frames. When a parent point becomes 'active', it needs to search for its nearest available animated point and set that animated point's id number as 'child_id'. An animated point is only 'available' if it doesn't already have a parent point, or in other words: if the child_id is currently unused. My issue comes from the VOP I've set up within a SOP solver. If there is more than one parent point becoming active on a single frame, I get multiple parent points assigned with the same child point. I need to be able to write to 'child_id' and read from it on the same frame, to make sure that I am not getting multiple parent points with the same child points (leaving some very lonely, parent-less child points ). Please take a look at my attached file. I've highlighted the important nodes, and the Find Attribute Value VOP in red is where the issue is originating. find_unique_child.hip Quote Link to comment Share on other sites More sharing options...
vijayakumar Posted June 2, 2018 Share Posted June 2, 2018 Hi mark, I have done similar test long back. There is a target(parent point) and points(child) coming towards the target(both have the same point count). When a child point acquires a target point the other child point doesn't query the same point. have attached the file.runs pretty fast. make sure the active distance is less. Since i have used array it is pretty heavy when there are more points to query at that instant(when active distance is more).Also you can disable attract in sop solver and get the positionId(posid) and use pop attract. nearbyattract.hipnc FX TD Dneg 1 1 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.