Overview
A jigsaw puzzle generator built in Houdini. This is procedurally generated so that any image can be used, and the puzzle size (number of rows and columns) can be adjusted.
Procedural Algorithm
1. Grid Initialization
We begin with a 2D planar Grid SOP defining the number of rows and columns. We will discard the
boundary edges and leave only the internal shared edges, since we are making a "cutter" to subtract from the
cardboard geometry.
2. Tab Attachment
Each interlocking tab is constructed from an open circular arc (derived from a Circle node):
- Centroid Attachment: For every internal edge segment, the curve centroid and local tangents are computed.
- Randomized Flipping: An Attribute Wrangle assigns a randomized binary orientation to each edge so that tabs randomly alternate.
-
Curve Reconstruction: The open arc tab is copied to the edge centroid
via a
Copy to PointsSOP, the underlying straight segment is trimmed, and vertices are merged and fused to create a continuous, non-intersecting seam network.
3. Boolean Subtraction
It is important to give a slight width (thickness) to the cutter ribbon—rather than using an infinitesimally thin sheet because we need the gaps to be big enough to be caught by the renderer. Finally, a Boolean SOP subtracts this 3D cutter from the textured cardboard geometry, partitioning it into individual puzzle pieces. 🧩
References
- Image Source: Studio Ghibli Wiki. Warawara.