Subdivide a grid into random rectangles

   874   3   2
User Avatar
Member
76 posts
Joined: 1月 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 - 2024年1月16日 13:33:44

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

User Avatar
Member
119 posts
Joined: 12月 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
682 posts
Joined: 9月 2013
Online
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: 1月 2015
Offline
Thank you both!
  • Quick Links