"Follow nearest point" set up troubleshoot

   1756   0   0
User Avatar
Member
2 posts
Joined: Jan. 2017
Offline
I'm quite new to Houdini so forgive me if I'm overlooking the obvious here, but weird little bug I haven't been able to solve…

- I scattered points inside a grid.
- I split that into two transforms, one is static, one is rotating.

The goal is to have the static points, search for the closest point in the rotating geo at each frame, and translate it's pos to the new nearest point pos.

- So I created an attribute wrangle on the static points to fetch the nearptnum of the rotating geo, second input being rotating points, Vexpression as follows :
i@nearptnum = nearpoint(1, @P);

- Then I created a point vop, from the current ptnum I get the nearptnum, nearptnum to P vector (of rotating point, second input), then used that pos to drive the new point Pos (see image).

The set up works!… kinda, the points follow but every once in a while they “jump” to what is clearly not the nearest point. I think maybe it's still searching for the nearest point to it's pos at frame 1? Can anyone share some insight? Pics and file below. Thank you!

Attachments:
nearpttest01.PNG (52.1 KB)
nearpttest02.PNG (40.8 KB)
nearpointfollowtest.hiplc (98.0 KB)

  • Quick Links