connected points?

   5137   4   1
User Avatar
Member
88 posts
Joined: March 2010
Offline
Hi

Does Houdini maintain a list of connected points of any given point on any mesh? I am working on path traversing on a mesh so I am trying to build a list points that I can use to query connections. I guess one way is to use some kind of point cloud method to figure out closest points but that rather complicates my effort since I want to write this in Python, and it seems like some of similar “closest points” methods are not implemented to Python as of now according to the help. Also any closest point approach might not guarantee a physical connection to the point in focus. Traversing through an existing list of connected points will be much quicker.

thanks
User Avatar
Member
1922 posts
Joined: Nov. 2006
Offline
If you want a pure Python approach there isn't much you can really do except write code that manually loops over ever primitive and vertex and constructs a data structure of points and their neighbors. There have been various discussions about this on this forum, as well as odforce. If you can compile HDK code, you can write a c++ function using inlinecpp.py that will allow you to very quickly return to Python a list of connected points. There is the pointneighbours() expression function that will give you a space separated list of points that share primitives with a point, though sharing primitives is not the same as directly connected with an edge. People have also used VOPs to build lists of connected points as well.
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
88 posts
Joined: March 2010
Offline
graham
If you want a pure Python approach there isn't much you can really do except write code that manually loops over ever primitive and vertex and constructs a data structure of points and their neighbors. There have been various discussions about this on this forum, as well as odforce. If you can compile HDK code, you can write a c++ function using inlinecpp.py that will allow you to very quickly return to Python a list of connected points. There is the pointneighbours() expression function that will give you a space separated list of points that share primitives with a point, though sharing primitives is not the same as directly connected with an edge. People have also used VOPs to build lists of connected points as well.


Graham thanks for the speedy help here.

Odforce was down so I could not get anything from there and most of the point promiximity issues were related to point clouds in these forums.

I guess for the starter I will embed pointneighbours() in Python code to see if I get anywhere with that. It probably will be cheaper than trying to create an assocation dabatase in Python. I have also seen examples of the inlinecpp, which sounds like a great idea. Time to dig into hdk for real this time I guess

edit: I just checked the help for the inlinecpp and impressive documentation there. Kudos



k
User Avatar
Member
1922 posts
Joined: Nov. 2006
Offline
I believe if you check the Python Module of this asset it has a method for building connected neighbors using inlinecpp.
http://houdinitoolbox.com/houdini.php?asset=39 [houdinitoolbox.com]
Graham Thompson, Technical Artist @ Rockstar Games
User Avatar
Member
88 posts
Joined: March 2010
Offline
graham, thanks for pointing out. That is a great head start for me.
  • Quick Links