Pattern Painter

Pattern Painter

Pattern Painter is a Unity Editor tool designed to speed up level design, prototyping, and game development workflows. It enables efficient placement of Game Objects in various geometric patterns.

  • Select a Game Object as a base surface for projection.
  • Project a pattern of Placement Points and tweak its settings to your needs.
  • Instantiate a Prefab at each Placement Point.
  • Adjust the rotation of generated Game Objects.
  • Align objects to other surfaces, like terrains and other meshes.

For a detailed guide in 🇺🇸 English, 🇨🇳 中文, 🇯🇵 日本語 , 🇪🇸 Español:
Full PDF Documentation.

Getting Started (v1.1.1)

Step 1: Placement Mode

Open the Open the Pattern Painter UI via Tools > Pattern Painter. Select a Game Object in the scene as a “base surface” (must contain a Mesh).Pattern Painter tool menu

Select a single Game Object in the scene to serve as a “base surface” onto which the pattern will generate Placement Points. The selected Game Object or at least one of its children must have a Mesh.message-example-1Select a base surface

You will see a live preview of Placement Points (green spheres) projected onto the selected Game Object.Live preview of Placement Points

If they don’t appear:

  • Move the camera closer to the object.
  • Adjust pattern settings to reduce point density.

Select a pattern and click “Calculate Placement Points”.Adjusted Placement Pointsmessage-example-3

Step 2: Prefab Settings

Set a Prefab in the “Prefab to Instantiate” field. The green spheres will update to boxes matching the Prefab’s bounding box.Projected Prefab sizes

Optionally, assign a Parent Object from the scene to keep prefabs organized.Assign Parent for Game Objects

Click “Create Prefabs at Placement Points” to generate prefabs.Create Game Objectsmessage-example-4

Step 3: Alignment Settings (Optional)

Adjust the rotation of generated Game Objects using the “Prefab Rotation Mode” dropdown, then click “Recalculate Prefab Rotation”.Recalculate Prefab Rotationmessage-example-5

Align to Terrain

To align objects to another surface (e.g., a terrain), create a temporary cube to serve as a surface to project your pattern.Temporary base for alignment

Then select the Alignment Layer of the terrain and click “Align With Surface”.Align to Terrain

Important:

  • Target surface must be on a selected Alignment Layer.
  • It must have a Collider.
  • It must be below the base surface in world-space (Y-axis).

Developer Notes

  • Pattern Painter supports Undo & Redo for placement operations.Undo Placement
  • Warning appears if the pattern is too dense or too large.Long Running Process Warning
  • Press Space Bar to cancel a long-running operation.Long running process progress bar
  • For best performance, bake meshes together instead of tracking many nested objects.
  • Base surface must have a height (may not work on a single Plane).
  • Supports only one base surface selection at a time.

Known Limitations & Recommendations

  • Currently designed for 3D workflows, not tested for 2D.
  • Not recommended for high-density, large-scale terrain object placement.
  • Base surface must have a height, for example, a Cube instead of a single Plane.
  • Current version supports only one base surface selection at a time.