3D rectangle/square packing?

   203   6   1
User Avatar
Member
288 posts
Joined: June 2015
Offline
I'm trying to turn a bunch of objects into disco-balls, so far i'm just scattering points on the geo and copy-stamping squares on there that i later extrude. But i'd like to increase the density without having those tiles interpenetrating each other. I'm somewhat familiar with circle packing after watching a few tuts around but most examples are using the pscale of packed geo and not the actual copied geometries boundaries. I understand that it might get real slow to do so differently, but i only need to populate each geo once so i can afford it. Any help appreciated.

Cheers,

A.
Edited by Adriano - Sept. 9, 2019 14:33:59

Attachments:
PostFX.JPG (277.2 KB)

User Avatar
Member
605 posts
Joined: July 2005
Offline
try using ‘output radius attribute’ in the scatter sop.
User Avatar
Member
293 posts
Joined: Aug. 2015
Offline
Hi Adriano;

Take a look at “Point Relax SOP”: it looks for any points that, if they were spheres with the specified radii, would be overlapping, and attempts to move them to nearby locations that reduce the overlap:

https://www.sidefx.com/docs/houdini/nodes/sop/relax.html [www.sidefx.com]
Masoud Saadatmand (MSDVFX)
User Avatar
Member
200 posts
Joined: June 2013
Offline
You can either relax the points of fit the pscale of the current positions.
Edited by probiner - Sept. 13, 2019 13:08:11
User Avatar
Member
288 posts
Joined: June 2015
Offline
probiner
You can either relax the points of fit the pscale of the current positions.

Thank you, but that's exactly the option i mentioned and want to avoid. This works with pscale, circle packing, but with squares/rectangles it does not check for corners intersections at all. The only way to avoid intersections leaves a rather large gaps between each copy. I'd like to pack this in a more efficient fashion without having to define the orientation/normals of the distribution points. I'd like to keep the randomness of orientation and check for intersections.

I'm really looking for the same UV packing method Entagma exposed in some of their tutorials, but that would work on a 3D geometry. Their way only works on 2D planes.

Cheers,

A.
Edited by Adriano - Sept. 13, 2019 13:13:06
User Avatar
Member
200 posts
Joined: June 2013
Offline
Ok, this reminded me something I saw in odforce once, but can't find it now. But while I was looking for it, I found these.

https://forums.odforce.net/topic/6240-non-overlapping-copies/ [forums.odforce.net]
https://forums.odforce.net/topic/38857-scattering-objects-without-overlapping/ [forums.odforce.net]
https://forums.odforce.net/topic/30519-scatter-copy-to-point-without-intersecting/ [forums.odforce.net]

Cheers
User Avatar
Member
288 posts
Joined: June 2015
Offline
probiner
Ok, this reminded me something I saw in odforce once, but can't find it now. But while I was looking for it, I found these.

https://forums.odforce.net/topic/6240-non-overlapping-copies/ [forums.odforce.net]
https://forums.odforce.net/topic/38857-scattering-objects-without-overlapping/ [forums.odforce.net]
https://forums.odforce.net/topic/30519-scatter-copy-to-point-without-intersecting/ [forums.odforce.net]

Cheers

Thanks, the last two look promising. Might be a bit slow with my set up, 20 000 copies approx, but i think it's exactly what i was looking for. Thanks for googling that one for me ahaha, somewhat never came across those links when searching. Gonna give it a try, cheers.
  • Quick Links