Help with finding point in the middle of a grid space

   745   2   0
User Avatar
Member
6 posts
Joined: June 2025
Offline


So this is an unfinished castle wall generator that I made, been around 3 weeks since I started using Houdini. I was wondering how I could generate a point in like, the middle of the space where most points are the furthest (so I can put the main structure in there), referring to that red circle. I used a resample yes. And, for any extras, how would I make it so like it would also generate points on smaller spaces? (referring to the slightly yellowish circles for like, smaller structures)

My idea is to make like the main structure for the castle and it's other structures. The main structure will be on the spot where the space is biggest. Eventually ill connect these points to form a line so that the buildings would be able to connect. :S

Much help is appreciated!

Attachments:
Screenshot 2025-07-10 000951.png (1.1 MB)
Recommendations2.png (1.2 MB)

User Avatar
Member
173 posts
Joined: Aug. 2017
Offline
Try using different sort of Cluster K. Maybe!!
FeELib-for-Houdini find on Github.

Attachments:
kl.gif (68.3 KB)

Conservation of Momentum
User Avatar
Member
5095 posts
Joined: Feb. 2012
Offline
Hi,

You can scatter points inside the shape and use a Ray SOP with "Minimum Distance" mode to get distance to the walls. Make sure the second input is an open polyline version of the boundary. I used a Convert Line SOP but you can use Ends SOP too. Also disable "Transform Points" so they stay in place, and you just get the distance.

Then sort by distance and keep the point with the max distance: that's where the biggest circle fits.

Attachments:
largestcircle.png (826.6 KB)

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com] https://lnk.bio/animatrix [lnk.bio]
  • Quick Links