I've been using Houdini now for a few months but mostly worked with heightfields. So I wanted to create something relatively simple during my free time but ended up scratching my head longer than I would've liked. The hardest part for me is to find solutions in Houdini I would otherwise find easy to solve using Blueprints or coding. I think I sometimes rely too much on VEX.
I'd like to create a simple LEGO tool since I saw a few popping around here and there and it seemed like a good practise project.
However instead of using only one kind of block I would like to use different kinds. Maybe a 1x1, 2x2 and a 3x2.
But I'm having problems figuring out how to detect these shapes in my point grid, how to isolate them properly and then merge them together.
What I currently do is iterate over every row(layer) in the point cloud(which is evenly spaced). Then I let a bounding box iterate over every point and see when the box has an equal amount of points inside it as the pattern. This part kind of works, but I have trouble with the next part. I need to isolate these points and keep them “aside” as to not generate false positives in the next iteration, since some of the points are already part of the found pattern.
I find the for loops a bit confusing tbh..
I also tried with a point wrangle, but then I was hard coding the patterns which also seemed like a wrong approach. And I also didn't get that to work.
Here is a screenshot of what I have:
I think understanding these kind of problems better would help me for future projects I wanted to do. Like some kind of tile based city generator.
Any help would be highly appreciated!
Have a nice weekend