Search points along a specific direction

   1855   3   0
User Avatar
Member
20 posts
Joined: April 2015
Offline
Hello everybody!
Is there a way to use the nearPoints function or the pcfind to search points in a specific direction?, i need to make a growth wich is shaped in lines and not in the usual organic look, and i would like to use the bitangent to add some streaky motion to the growth.
I think it should not be that hard, but i need an hint!!
Thanks alot!
Carlo
User Avatar
Member
2528 posts
Joined: June 2008
Offline
You can always run a wrangle or VOP over a group.

Here is a simple way to collect points along the view of the camera. Parent a cone to the camera and colorize all points that fall within the cone. Add the colorized points to a group and then process only that group with a VOP or wrangle.

Attachments:
Untitled-1.jpg (239.3 KB)
ap_process_points_in_view.hiplc (266.1 KB)

Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
16 posts
Joined: Dec. 2015
Offline
Hey, you can draw a curve, set normals along the curve, then use an attribute transfer to transfer the curve normals to the grid points, create a direction vector for the points to grow from and use a dot product to check if the normals of the neighbors points are in the same direction so they just grow in the direction of the curve you draw.

Good luck!
Edited by Jose Zalez - Nov. 16, 2018 10:50:31
Vimeo: https://vimeo.com/josezalez [vimeo.com]
User Avatar
Member
20 posts
Joined: April 2015
Offline
Hi!
thanks alot for the reply!
I have no problems creating groups, and also to select wich particles must start the grow.What i should do is casting rays from the point using the vector as Jose suggested, and than select the point found on that vector, and so on for the next particle, using a loop.
So the question is….how to cast a vector from a point and select the intersecting point with that vector?:-)
Now i have used a more raw way that is an attribute tranfer from a curve to the row of point, wich result good, but it would be nice to fin the wrangle way..
I saw an intersect function but not sure if works with points, checking right now…
C.
  • Quick Links