Subdivide a grid into random rectangles

   924   3   2
User Avatar
Member
76 posts
Joined: Jan. 2015
Offline
Somebody must have solved it in Houdini before. I want to subdivide a grid into random rectangles (pic 1 below). It's not really a "packing" problem as I don't need to use rectangles with specific dimensions. I generated random-sized grids and used UV Layout (pic 2 below). It works, but bigger rectangles are near each other. I'd prefer a more random look.
Edited by element33 - Jan. 16, 2024 13:33:44

Attachments:
Grid2.png (2.6 KB)
_015311.jpg (30.1 KB)

User Avatar
Member
123 posts
Joined: Dec. 2019
Offline
Hello,

There's a node for this, Labs Lot Subdivision SOP [www.sidefx.com]. You need to install Labs toolset to use it.
Houdini Pipeline Supervisor @ TAT Studio
User Avatar
Member
685 posts
Joined: Sept. 2013
Offline
Hi element33,

I've translated a suitable example from Shadertoy to VEX here:
https://procegen.konstantinmagnus.de/non-overlapping-tiles [procegen.konstantinmagnus.de]

While the code can be shortened it should still work.
https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
76 posts
Joined: Jan. 2015
Offline
Thank you both!
  • Quick Links