Back to Node List

Grid Pattern

grid_pattern

Fills a canvas with repeated blocks, dots, diamonds, checker cells, or an optional stamp image.

Reviewed
Guide available
The node name and summary are available in English. Port, parameter, and article details are currently shown in Japanese.

Input Ports

NameTypeDescription
スタンプ画像
stamp
Image
「スタンプ」方式で各セル全体へ最近傍ストレッチして敷き詰める画像です。未接続なら四角で描きます。
fill_color
Color
並べる形の色を外から差し替えます。
背景色
background_color
Color
並べる形と、スタンプの透明部分の後ろに敷く色を外から差し替えます。

Output Ports

NameTypeDescription
画像
output
Image
規則的に敷き詰めたパターン画像です。
サーフェース
surface
Surface
並べた形と背景の高さ・暗さ・ざらつき・素材IDを持つサーフェースです。

Parameters

NameTypeDefaultRangeDescription / Options
並べる形
pattern
Enum
Block

キャンバス全体にどの形を並べるかです。

  • ブロックBlock
    各セルを四角いブロックで埋めます。
  • チェッカーChecker
    2色を交互に並べた市松模様を作ります。
  • ドットDot
    各セルに丸い点を1つ置きます。
  • ひし形Diamond
    各セルにひし形を1つ置きます。
  • スタンプStamp
    接続した画像を各セル全体へ最近傍ストレッチして敷き詰めます。
width
Int
1281–2048

作る画像の幅です。

高さ
height
Int
1281–2048

作る画像の高さです。

セル幅
cell_width
Int
161–512

繰り返し1マスの幅です。

セル高さ
cell_height
Int
161–512

繰り返し1マスの高さです。

横のすき間
gap_x
Int
00–256

横方向のセル同士のすき間です。

縦のすき間
gap_y
Int
00–256

縦方向のセル同士のすき間です。

Xずらし
offset_x
Int
0-2048–2048

パターン全体を左右にずらします。

Yずらし
offset_y
Int
0-2048–2048

パターン全体を上下にずらします。

行ずらし
row_offset
Int
0-512–512

1行おきに横へずらします。半マスにするとレンガ状に並びます。

左右ループ
wrap_x
Bool
false

左右の端がつながるように横方向の繰り返しを出力幅に合わせます。タイル素材向けです。

上下ループ
wrap_y
Bool
false

上下の端がつながるように縦方向の繰り返しを出力高さに合わせます。タイル素材向けです。

fill_color
Color
[0.7200000286102295,0.7200000286102295,0.7200000286102295,1]

並べる形の色です。

もう1つの色
alt_color
Color
[0.36000001430511475,0.36000001430511475,0.36000001430511475,1]

チェッカー模様で交互に使う色です。

背景色
background_color
Color
[0,0,0,0]

並べる形と、スタンプの透明部分の後ろに敷く色です。透明にすると形だけを出せます。

形の素材ID
shape_material_id
Text
core:stone

サーフェース出力で、並べた形に割り当てる素材IDです。

もう1つの素材ID
alt_material_id
Text
core:brick

チェッカー模様のもう1つの色に割り当てる素材IDです。

背景素材ID
background_material_id
Text
core:default

すき間や背景に割り当てる素材IDです。

形の高さ
shape_height_value
Float
0.560–1 / step 0.01

並べた形に入れる高さです。背景より高くすると、光で浮き上がって見えます。

背景の高さ
background_height_value
Float
0.40–1 / step 0.01

すき間や背景に入れる高さです。形より低くすると溝や下地に見えます。

形のAO
shape_ao
Float
0.960–1 / step 0.01

並べた形の暗くなりにくさです。1に近いほど明るく残ります。

背景AO
background_ao
Float
0.750–1 / step 0.01

すき間や背景の暗さです。低くすると形の周りが暗く締まります。

形のざらつき
shape_roughness
Float
0.750–1 / step 0.01

並べた形の光りにくさです。高いほどマットになります。

背景ざらつき
background_roughness
Float
0.90–1 / step 0.01

すき間や背景の光りにくさです。高いほど乾いた下地に見えます。

Overview

Fills the canvas at regular intervals with blocks, dots, diamonds, checks, or image stamps. Use it for floor tiles, simple wall patterns, rows of dots, and orderly decorative patterns.

Use row_offset to shift every other row horizontally. A half-cell offset creates a brick-like arrangement. Connect an image to stamp and set pattern = Stamp to place that image in every cell.

Usage tips

  • pattern = Stamp is the most versatile option. Draw a small flower, stone, or icon and tile it for an instant background pattern. The image is stretched over each full cell with nearest-neighbor sampling, then its transparent and translucent pixels are composited over background_color with straight-alpha SrcOver.
  • Checker with two colors is the shortest route to a transparency-check background or checkerboard floor.
  • For a tileable asset, turn wrap_x/y ON and inspect it with tile_preview, following the same workflow as brick_pattern.
  • For rows of dots such as a stippled star field, use Dot + a large gap + a transparent background_color.

Common pitfalls

  • Cell dimensions change slightly: with wrap ON, dimensions adjust automatically so a whole number of periods fits the output (see below). For exact cell dimensions, make the canvas a multiple of the pattern period.
  • A stamp's aspect ratio changes: every stamp is stretched to the full cell with nearest-neighbor sampling. Match the source aspect ratio to cell_width / cell_height when you need to preserve its proportions.

Compatibility

  • v4 composites transparent and translucent Stamp pixels over background_color. Keep background_color transparent to preserve the transparent-pixel result from v3 and earlier.

Examples

  • Create a checkerboard floor with pattern = Checker, cell_width = 8, and cell_height = 8.
  • Create a regular dot background with pattern = Dot, gap_x = 8, and gap_y = 8.
  • Set row_offset to cell_width / 2 for a wall base with half-cell-shifted blocks.
  • Connect a small decorative image to stamp and place it evenly with pattern = Stamp.
  • Connect surface to Surface Light Preview and inspect tile relief from the difference between shape_height_value and background_height_value.
  • With pattern = Checker, assign different materials to shape_material_id and alt_material_id, then use the material-ID preview to confirm that they alternate.

Looping

When wrap_x / wrap_y is on, the pattern is cropped at a period that makes its edges more likely to join when tiled in every direction. If width or height is not an exact multiple of the cell period, the node does not simply crop an infinite pattern at the specified cell width. Instead, it stretches or shrinks the cells slightly so a whole number of repetitions fits the output.

Because Checker and row_offset can shift color or row phase at the edge, looping internally selects a period with an even number of repetitions.

Related nodes

  • brick_pattern — block walls with mortar and color variation
  • path_array — place along a path rather than a grid
  • pixel_canvas — supplies stamp artwork
  • tile_preview — check looping
Back to Node List
Grid Pattern — PixPipeline Node Reference