Scatter and Fuse

   4326   3   0
User Avatar
Member
75 posts
Joined: July 2006
Offline
Hi,

I'm very new to Houdini so I'm sorry if my question is ridiculously silly

I'm generating scattered points using the the scatter SOP but I would like to clean up the points my consolidating ones that are quite close to each other to get a better spread of points. I notice that using snap in the fuse sop works quite well but it, of course, means that i have multiple points sharing the same location. Consolidate doesn't appear to work (all the points dissapear) in the same way as it would if i were consolidating points of a polygon object.

So, what is going on there? Is there another way to avoid points being generated in close proximity to one another?

Cheers

P
john @ goodbyekansas
User Avatar
Member
311 posts
Joined: July 2005
Offline
You're on the right track you just need to fiddle a bit more.
One method I use is after snapping, use a point SOP to get the length of the distance moved the points.

make sure in snapping that you give priority to points with highest or lowest number so they remain static.

Anyway the length can be calculated on $CR for example, then using a delete SOP cull any points with a non-zero $CR value.

I stuck together an example hip file for you.

Jerry

Attachments:
scatter.hip (44.4 KB)

User Avatar
Member
75 posts
Joined: July 2006
Offline
Cheers for the quick reply!

That's pretty much what I was trying to do. I guess the points generated by the scatter are somehow different to the points (or vetices) of a polygon mesh which in turn stops the consolidate points from working. AThat or it's a bug Ah well, i'll figure it out one day..

Thanks again

P
john @ goodbyekansas
User Avatar
Member
4344 posts
Joined: July 2005
Offline
For the Fuse SOP's consolidate function to work you need primivites instead of points. (I wish there was an option for it to run on just points).

Take a look at this sample hip.

To work around the “points don't work problem” I just use a Copy SOP to copy spheres onto the points, the do a Fuse Consolidate, then use a Add SOP to delete the primitives.

edit:
As pointed out on odforce by Simon, using an Add SOP is 100x faster than using the Copy SOP to create primitives for snapping.

Attachments:
fuse.hip (166.7 KB)

if(coffees<2,round(float),float)
  • Quick Links