Scattering Objects without Overlapping

   7224   4   1
User Avatar
Member
48 posts
Joined: Feb. 2018
Offline
Hi,
how is this possible?

thanks.
User Avatar
Member
37 posts
Joined: Aug. 2015
Offline
One method I use is culling objects that overlap after scattering them. You can use the point's scale with pcopen to find overlaps. Its pretty quick. Careful that when comparing a point cloud with itself with pcopen, the closest point found will be itself. You could also use this method to push objects out instead of culling, since you could have the radius and relative pos of overlapping objects.

Another method (i haven't tried yet) is maybe using a grain solver to push objects apart based on their scale. Maybe not as fast and will require simulating.
User Avatar
Member
37 posts
Joined: Aug. 2015
Offline
So i tried the grain solver method for fun and it works really nicely.

Attachments:
ScatterGrainSolveOverlaps.hiplc (652.0 KB)

User Avatar
Member
8555 posts
Joined: July 2007
Online
you can as well do Point Relax SOP, which pushes points away from each other using their pscale with optional surface to slide on
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
2 posts
Joined: Jan. 2018
Offline
The Houdini community's helpfulness never ceases to amaze me! Thanks Tomas and Nicolas.
  • Quick Links