stevegh Posted May 4, 2016 Share Posted May 4, 2016 Hey all, I am trying to take a set of points and space them as evenly as possible given a boundary surface. Right now the simplest way I have for doing this is iterating over the points with a voronoi fracture sop, using the cell center as the new location for each point. Doing this a number of times yields a nice result but as the voronoi split is actually cutting geometry and I feel there should be a better way perhaps using a similar approach? Even for only 1k points and 15 iterations it takes a while. Thanks! evenlySpaced.001.hip Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 4, 2016 Author Share Posted May 4, 2016 Per info on Lloyd's algorithm I have found a faster way to do this but it is still rather slow. This is done by using a semi-dense point cloud and transferring the id of each point to that cloud, computing the center for each id and moving the point there. There still must be a faster way! evenlySpaced.002.hip Quote Link to comment Share on other sites More sharing options...
bluciensky Posted May 4, 2016 Share Posted May 4, 2016 dropdown pointsfromvolumeSOP under your vdbfrompolygonSOP. Quote Link to comment Share on other sites More sharing options...
Skybar Posted May 4, 2016 Share Posted May 4, 2016 Haven't looked at your hips, but you can take a look at the Grain Source SOP. It does some things inside to avoid overlaps with points. You can also try the Point Relax SOP that has a 3d space option. Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 4, 2016 Author Share Posted May 4, 2016 Sorry I should have been more specific. I need the same point count as the input points, and this would be used on an incoming fluid surface. The point numbers need to stay the same relative to where to points are moving as well (which is absent from my last example). Does that make sense? Quote Link to comment Share on other sites More sharing options...
Atom Posted May 4, 2016 Share Posted May 4, 2016 Have you taken a look at this article on uniform scattering in Houdini? http://schnellhammer.net/blog/2010/06/uniform-scattering-in-houdini/ Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 4, 2016 Author Share Posted May 4, 2016 I have, and again the issue is that I want to take an existing set of points and have them uniformly 'relaxed' inside a bounding object. I am familiar with a number of different methods it just comes down to what is the fastest to compute. Houdini does have the relax points sop which uses an implementation of Lloyd's algorithm but does not take into account a boundary surface. I'll keep plugging and come up with something. Quote Link to comment Share on other sites More sharing options...
bluciensky Posted May 4, 2016 Share Posted May 4, 2016 Can you post a hipfile that addresses the example(fluid) that you are talking about? Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 4, 2016 Author Share Posted May 4, 2016 Here is one such setup. Obviously I am just setting the point positions at this point so there is some weird behavior but I am trying to relax a FLIP sim's points. evenlySpaced_fluid.001.hip 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.