← Back to Projects

Procedural Jigsaw Puzzle

2026 • Technical Art • 3 min read
Procedural Modeling Houdini
View Source Code
Procedural Jigsaw Puzzle Preview

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.

Grid Initialization and Internal Edges
Planar grid with internal shared edges.

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 Points SOP, the underlying straight segment is trimmed, and vertices are merged and fused to create a continuous, non-intersecting seam network.
Parametric Arc Tab and Neck Geometry
Open arc tab profile
Grid with Randomized Interlocking Tabs
Randomized alternating arc tabs

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. 🧩

Extruded 3D Jigsaw Cutter Ribbon
Extruded 3D cutter
Procedural Jigsaw Puzzle Exploded Piece View
Subtracted pieces

References

  • Image Source: Studio Ghibli Wiki. Warawara.