Jump to content

How to copy a point's movement to the closest neighbor point?


Recommended Posts

Hello,

Can you please help me a little bit? Lets say I have 8 points. four them are simulated. You can see them in the green circle. And I have another 4 close to them which are static points? You can see them in the red circles. How can I copy the movement of the animated point to the static points? I tried with attribute transfer in a solver node but I'm sure I made something wrong because it didn't work. 

 

Thank you

Gabor

points2.jpg

points.jpg

Link to comment
Share on other sites

I don't know what do you mean "transfer the animation", do you want to transfer over the velocity from the point has same name/id attribute and advect the point position by the velocity? If so, you can try something like

int pt = findattribval(1, "point", "id", @id);

vector vel = point(1, "v", pt);

@P += vel * @TimeInc ;

So this will grab the velocity attribute from the animated points with the same id attribute. But make sure the four points you want to transfer the velocity.

If you want to grab the nearest point's velocity and advect the point position, you can try something like

int pt = nearpoint(1,@P);

vector vel = point(1,"v",pt);

@P += vel * @TimeInc ;

 

Or you want to constrain your static point to your animated point, that's a slightly complicated case.

Hope this will help.

 

Link to comment
Share on other sites

Thank you for your help. The transfer animation for me  like,  the 4 animated points moving continously. I would like to take that movement and copy to the static points. So the stacis points won't be static anymore and they will move exactly same like the animated points. Maybe I can't explain well but do you get it now?

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